Forums

wordpress welcome page (2 posts)

  1. strugglefish
    Member
    Posted 6 years ago #

    Is the image swapper on http://wordpress.org/ , a plugin, or is that hand coded? Just wondering before I hand code something that uses the same type of swapping.

  2. petit
    Member
    Posted 6 years ago #

    It's not a plugin - only Javascript dhtml. View source reveals:
    <div id="featured"><img id="screenie" src="http://two.wordpress.com/style/screenshots/ss-1.png" /></div>

    <div id="others">
    <span><img onmouseover="document.getElementById('screenie').src='http://two.wordpress.com/style/screenshots/ss-1.png'" src="http://two.wordpress.com/style/screenshots/ss-1-thumb.png" /></span>
    <span><img onmouseover="document.getElementById('screenie').src='http://two.wordpress.com/style/screenshots/ss-2.png'" src="http://two.wordpress.com/style/screenshots/ss-2-thumb.png" /></span>
    <span><img onmouseover="document.getElementById('screenie').src='http://two.wordpress.com/style/screenshots/ss-3.png'" src="http://two.wordpress.com/style/screenshots/ss-3-thumb.png" /></span>
    </div>

    The <div id="others"> has <span>'s, that when rollover'ed changes the image src of the <img id="screenie"> using the DOM access method getElementById.

    Good luck!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.