Mouse Over always out

They have: 9 posts

Joined: Mar 2005

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 -->

He has: 698 posts

Joined: Jul 2005

Replacing the onmouseover="..." with onload="..." should do the trick, though I haven't checked too thoroughly into your code. Wink

Kurtis

They have: 9 posts

Joined: Mar 2005

didnt work Sad any other ideas?

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. Wink

Kurtis

decibel.places's picture

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.

He has: 698 posts

Joined: Jul 2005

decibel.places wrote:
I don't think the anchor tag <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's picture

He has: 1,494 posts

Joined: Jun 2008

Kurtis-

I always forget that certain elements don't support all events;

That is why I refer to W3Schools about a 100 times a day - just to check syntax etc... Wink

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.