directorySlider icon indicating copy to clipboard operation
directorySlider copied to clipboard

Link the images

Open chrisdraperdesigns opened this issue 8 years ago • 1 comments

How do I link the images? I tried the following but it only goes to the first image link.

$(document).ready(function(){

var img = $('img');

img.attr("src", "http://www.gojetairlines.com/New%20Slides%20Folder/Slider1.jpg").click(function(){

    window.open("http://www.gojetairlines.com/aboutus");

});


img.attr("src", "http://www.gojetairlines.com/New%20Slides%20Folder/Slider2.jpg").click(function(){

    window.open("http://www.gojetairlines.com/careers/Pages/Pilots.aspx");

});


img.attr("src", "http://www.gojetairlines.com/New%20Slides%20Folder/Slider3.jpg").click(function(){

    window.open("http://www.gojetairlines.com/careers/Pages/Flight-Attendants.aspx");

});


img.attr("src", "http://www.gojetairlines.com/New%20Slides%20Folder/Slider4.jpg").click(function(){

    window.open("http://www.gojetairlines.com/careers/Pages/Maintenance.aspx");

});

chrisdraperdesigns avatar Aug 08 '16 04:08 chrisdraperdesigns

To link images, you'd need to either change the code or loop over the slides. The above code isn't selecting individual slides. It's selecting all of them.

justinwhall avatar Aug 08 '16 14:08 justinwhall