SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Nov 2005
    Location
    Huntington Beach, CA
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery image swap

    I am attempting to implement this code here : Bridgford :: Ready to Eat - Products.

    I am utilizing this tutorial : jQuery Tutorial – Image Swap On Click Design Chemical – jQuery, Wordpress, Tutorials & Plugins

    I have successfully implemented the hover but need to have the image stay when clicked. Can someone see what I am doing wrong?

    Thanks in advance!
    Rob
    Pier Marketing ◄ Printing and Marketing Collateral - Order Online
    Pier Technologies ◄ Web Development & IT Solutions
    And That's News? ◄ My NEW Blog!!

  2. #2
    SitePoint Zealot
    Join Date
    Nov 2005
    Location
    Huntington Beach, CA
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone???????????????
    Rob
    Pier Marketing ◄ Printing and Marketing Collateral - Order Online
    Pier Technologies ◄ Web Development & IT Solutions
    And That's News? ◄ My NEW Blog!!

  3. #3
    SitePoint Enthusiast rainner's Avatar
    Join Date
    Apr 2011
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bridgford :: Ready to Eat - Products

    Error: imgSwap is not defined
    Line: 26

    Code:
    $(imgSwap).preload();
    You need to select something the same way you do with CSS, or pass in a DOM object.

    Code:
    // select by ID 
    $( '#imgSwap' ).preload(); 
    
    // select by ClassName 
    $( '.imgSwap' ).preload();

  4. #4
    SitePoint Zealot
    Join Date
    Nov 2005
    Location
    Huntington Beach, CA
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome, I got the pre-loader to work but now I cannot get the image swap onclick to behave properly. Can you possibly see what I am doing wrong with this now?

    Thanks again for the help!
    Rob
    Pier Marketing ◄ Printing and Marketing Collateral - Order Online
    Pier Technologies ◄ Web Development & IT Solutions
    And That's News? ◄ My NEW Blog!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •