jQuery Find Selector Not Selecting Array Item -
I am trying to access a list of photos using the jQuery search selector, but are not visible due to some reason I'm using jQuery 1.8.
Ideal code:
$ (this) .siblings (images_container) .find (photo); Current code:
$ (this) .siblings (images_container). children (). ("Photo"); The current code does not work either. Choosing children like:
$ (this) .siblings (images_container). Children () album_id_3 is $$
HTML
& lt; Div class = "photo_wrap" & gt; & Lt; A href = "#" id = "album_id_3" & gt; & Lt; Div class = "photo_img_wrap" & gt; & Lt; Img src = "/ assets / img / user_images / 2_4.jpg" & gt; & Lt; Div class = "album_photo_count" & gt; 1 & lt; / Div & gt; & Lt; / Div & gt; & Lt; / A & gt; & Lt; Div class = "album_name" & gt; Untitled & lt; / Div & gt; & Lt; Div style = "display: none;" Class = "images_container" & gt; & Lt; Div class = "album_description_hidden" & gt; Trial & lt; / Div & gt; & Lt; Div class = "city_id" & gt; 2 & lt; / Div & gt; & Lt; Div class = "photo" & gt; & Lt; Div class = "desc" & gt; & Lt; / Div & gt; & Lt; Div class = "image_id" & gt; 4 & lt; / Div & gt; & Lt; Div class = "name" & gt; /assets/img/user_images/2_4.jpg & lt; / Div & gt; & Lt; Div class = "condition" & gt; 1 & lt; / Div & gt; & Lt; Div class = "time" & gt; 1363005386 & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt;
returns
jQuery (div.album_description_hidden, div.city_id, div.photo) But when I try to find it, specifically, only ".photo" is returning blank to grab the elements of jQuery, do you know why?
This is because . Find () only finds the elements within the children you are looking for because div.photo is one of those elements that you are looking for, it will not be in the result < / Html>
Comments
Post a Comment