javascript - How to call a function on body load -


hi using script add social media icon site.

<div id="menu" class="shareselector" style="width:250px; height:250px;"></div>  $(document).ready(function () {      $('.shareselector').socialshare({         social: 'facebook,google,pinterest,twitter',         whenselect: true,         selectcontainer: '.shareselector'     });  }); 

div gets content upon clicking on it.can call function without clicking div means on bodyload?

regards:ali

the $(document).ready(function () {}); function should run when page loads.

have got jquery in <script> tag?

if so, bindings setup socialshare plugin, may need @ that.

what whenselect option do?


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -