directorySlider
directorySlider copied to clipboard
Link the images
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");
});
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.