jQuery script for image overlays

Out of context: Reply #5

  • Started
  • Last post
  • 15 Responses
  • kalkal0

    Seems almost there but still not quite. I have no idea how to put anything together in jQuery but how I'd have it work would be like:

    jQueryfader.js
    1) find any div with images in it and with the id="herebesomefaderimages"
    2) append a "fader" class to images
    3) if mouseover a fader class, initiate fade

    mypage.htm
    <div id=herebesomefaderimages>
    <img src="http://bla.com/image1.jpg />
    <img src="http://bla.com/image2.jpg />
    <img src="http://bla.com/image3.jpg />
    </div>

    Which would be change by the script into:
    <div id=herebesomefaderimages>
    <img src="http://bla.com/image1.jpg class="fader" />
    <img src="http://bla.com/image2.jpg class="fader" />
    <img src="http://bla.com/image3.jpg class="fader" />
    </div>

    And it'd be done in this way because it's dynamic content and I'm lazy so I don't want to change the WordPress template which I'm using (which is already super complicated for a wordpress template to be honest)

    • As you can see with all the missing "" I have here, I'm really lame at this sort of thing.kalkal

View thread