Код
$('#gallery a#next_g').click(function(next){
next.preventDefault();
var imgPath=$('#gallery a#foto').attr('href');
var Oldimage=$('#gallery a#foto');
var next=$('#images a[href="'+imgPath+'"]').next('#images a').attr('href');
if (next==null) {next=imgPath;}
var Newimage=$('<a id="foto" href='+next+'><img border=0px src='+next+'></a>');
Newimage.hide();
$('#gallery').prepend(Newimage);
Newimage.fadeIn(1);
Oldimage.remove();
});
next.preventDefault();
var imgPath=$('#gallery a#foto').attr('href');
var Oldimage=$('#gallery a#foto');
var next=$('#images a[href="'+imgPath+'"]').next('#images a').attr('href');
if (next==null) {next=imgPath;}
var Newimage=$('<a id="foto" href='+next+'><img border=0px src='+next+'></a>');
Newimage.hide();
$('#gallery').prepend(Newimage);
Newimage.fadeIn(1);
Oldimage.remove();
});
#gallery - блок отображения картинок
#gallery a#foto - ссылка на текущую картинку.
#images - блок с урлами картинок
a#next_g - кнопка "вперед".
alert(next) выдает в internet explorer значение undefined.
Как добиться обхода по значению атрибута в IE 7?