i have 16 images on image slider div. have written code dynamicaly add img in different classes. need check if image last 1 add in last class.
i have written code display alert if user clicks on last image .
if($(this).is('img:last')) { alert('last child'); } else { alert("atleast nooooooooooooooo"); } this not working . have created fiddle http://jsfiddle.net/edgbh/9/ 
last-child property working in fiddle in slider not working .please help.
thanks , regards,
you have problems in code:
does not include jquery library can choose sidebar in
jsfiddleyou have redundant closing
})@ end of code.to determine whether element last child or not, can use:
if($(this).is(':last-child'))
Comments
Post a Comment