Codeinwp / Nivo-Slider-jQuery

Nivo Slider - The Most Awesome jQuery Image Slider
http://docs.themeisle.com/article/485-getting-started-with-the-nivo-slider-jquery-plugin
MIT License
1.25k stars 605 forks source link

Extra request from img src error #304

Open eduardochico opened 12 years ago

eduardochico commented 12 years ago

On the line 77 initially is set the src of the image to "#" causing the browser to set the src to the actual page URL where nivo-slider is loaded, causing also to make an extra request and load the entry html code of the site again and trying to interpet as a image. // Set first background var sliderImg = $('<img class="nivo-main-image" src="#" />'); //<-- problematic line sliderImg.attr('src', vars.currentImage.attr('src')).show(); slider.append(sliderImg); If you change to: var sliderImg = $('<img class="nivo-main-image" />');

And the issue is gone.

didgiman commented 12 years ago

Yes, I have this issue too. Removing the src="#" part seems to solve it. Thanks eduardochico!

sherlock-holmes1 commented 12 years ago

I also got this problem. Could you add the fix into the source code?

kevinhq commented 10 years ago

I think this is fixed on most recent update ?

I fixed this on my own by doing what's suggested above.

On file jquery.nivo.slider.js at line 77 (jQuery Nivo Slider v3.1)