jquery - Get specific sibling with an index-number -
I'm working on a banner-slide show, but I'm working with navigation, which I'm having trouble with Is:
function slide switch (item) {if (item) {// problem var $ active = $ ('# banner div'). Index (item); Var $ activeImage = $ ('# banner img'). Index (item); } And {var $ active = $ ('# banner div.active'); Var $ Active Entrepreneur = $ ("IMG [src $ = '/ Picture / Active Page']"); If ($ active.length == 0) $ active = $ ('# banner div: last'); If ($ activeImage.length == 0) $ activemaze = $ ('# banner img: last'); }} $ ("# Banner img"). Click (function () {slideSwitch ($ (this));}); The problem is that when IMG is clicked in the # banner, I want to get the status of the transfer (navigation indicator) and thus be able to fade in the selected banner. It is possible. The problem here is:
var $ active = $ ('# banner div'). Index (item); Var $ activeImage = $ ('# banner img'). Index (item); I am not using index () after selecting the object .. How to do this?
I "$ ('#' banner div ') [item]" but it still does not return anything.
[] In a jQuery object list, the underlying HTML node for that condition gives you that you want to wrap that node again in jQuery.
Try "$ ($ ('# banner div') [item])"
Comments
Post a Comment