Mouse Over always out
I am using the AddThis button on my site. You can see a demo here http://www.addthis.com/ mouse over the button and a bunch of social bookmarking thumbnails appear. im trying to make it so that on my site, it is expanded by default. i see the mouse over to expand it, is there some way to make it so that on the page load it is expanded?
thanks
here's the code:
<!-- AddThis Button BEGIN -->
<script type="text/javascript">var addthis_pub="fdfdies";</script>
<a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" border="0" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script>
<!-- AddThis Button END -->
kazimmerman posted this at 03:12 — 27th January 2009.
He has: 698 posts
Joined: Jul 2005
Replacing the
onmouseover="..."
withonload="..."
should do the trick, though I haven't checked too thoroughly into your code.Kurtis
the311guy posted this at 05:08 — 27th January 2009.
They have: 9 posts
Joined: Mar 2005
didnt work any other ideas?
kazimmerman posted this at 12:40 — 27th January 2009.
He has: 698 posts
Joined: Jul 2005
Try also completely deleting the
onmouseout="addthis_close()"
part. I think that's still causing it to close instead of remaining open.Kurtis
decibel.places posted this at 21:08 — 27th January 2009.
He has: 1,494 posts
Joined: Jun 2008
Try this (tested)
note that onmouseover and onmouseout are eliminated
AND
id="addthis" is added to anchor tag
function expand() is added
onload=expand; is added
<!-- AddThis Button BEGIN -->
<script type="text/javascript">var addthis_pub="fdfdies"; function expand() {addthis_open(document.getElementById('addthis'), '', '[URL]', '[TITLE]'); setTimeout('expand()',1000);} onload=expand;</script>
<a id="addthis" href="http://www.addthis.com/bookmark.php" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" border="0" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script></div>
<!-- AddThis Button END -->
I don't think the anchor tag
<a href=...
supports the onload method.onload=expand;
occurs when the document is fully loaded.kazimmerman posted this at 22:05 — 27th January 2009.
He has: 698 posts
Joined: Jul 2005
<a href=...
supports the onload method.onload=expand;
occurs when the document is fully loaded.I always forget that certain elements don't support all events; not to mention the fact that my JavaScript skills are rusty anyway...
Kurtis
decibel.places posted this at 22:09 — 27th January 2009.
He has: 1,494 posts
Joined: Jun 2008
Kurtis-
That is why I refer to W3Schools about a 100 times a day - just to check syntax etc...
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.