user2518391
user2518391

Reputation: 11

foundation orbit not working after I added other jquery

I'm working with Foundation to build a site, part of the site was a Foundation orbit slideshow, which was working perfectly until I added a jquery code for an image swap. The image swap is on the social buttons on the bottom of the page and that is working correctly. I've searched around and found similar topics, I tried to work through their solutions but could only get the opposite to occur (orbit started working, image swap stopped working). The site can be viewed here

Upvotes: 1

Views: 151

Answers (1)

Daniel
Daniel

Reputation: 579

Give this a go. jQuery:

jQuery.noConflict();
jQuery(function(){
    jQuery(".img-swap").hover(
        function(){
            this.src = (this.src == "img/facebook.png")?"img/facebookgrey.png":this.src;
            this.src = (this.src == "img/yelp.png")?"img/yelpgrey.png":this.src;
            this.src = (this.src == "img/googleplus.png")?"img/googleplusgrey.png":this.src;
        },
        function(){
            this.src = (this.src == "img/facebookgrey.png")?"img/facebook.png":this.src;
            this.src = (this.src == "img/yelpgrey.png")?"img/yelp.png":this.src;
            this.src = (this.src == "img/googleplusgrey.png")?"img/googleplus.png":this.src;
    });
});

Upvotes: 1

Related Questions