javascript - Jquery Loop through table with multiple class -
After AJAX call I'm trying to loop through the table but ended using Jquery but I I can not loop through it. My HTML looks like this:
& lt; Table id = "planyourwork" class = "data-view plan-internal display" & gt; & Lt; Thead & gt; All Headers & lt; / Thead & gt; & Lt; Tbody & gt; & Lt; Tr square = "weird" & gt; & Lt; Td square = "invisible" & gt; & Lt; / Td> .... .... & lt; Td class = "cell-status" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; Tr square = "weird" & gt; & Lt; Td square = "invisible" & gt; & Lt; / Td> .... .... & lt; Td class = "cell-status" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; Tr square = "weird" & gt; & Lt; Td square = "invisible" & gt; & Lt; / Td> .... .... & lt; Td class = "cell-status" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; Tbody & gt;
After ajax call
$ ('Data-view'> group> gt; tr & gt; td.cell- Status') .each (function (try to add tool tip}}
When I debug, I do not think it is happening through the loop. Debugger data -Continue on the view, but there is no looping through it.
Please help me solve this problem
Click below Event
filterBtn.click (function () {loadData (); $ ('# Planyourworktd.cell-status'). Every (function () {var type cell = $ (this); var tooltip = type parallel (). ('Td.fullNotes') search .html (); alert ("tooltip"); type.atle (' title ', Tooltip); Type Cell.tooltip ({track: true, show: 100});}); Return return;}); // Load request and Planner data function loadData () {$. : 'Post', url: url, data: data, cache: wrong, success: function (html) {initResults (); enableButtons ();}, error: function (jquxhr, textstats, error traversor) {filterBtn.removeClass ( 'Invisible'); }, Async: true}); }
And the DOM structure is very complex, when I run it in the field but it works on the page, I'm not sure why? Thanks to everyone for helping me solve this. Please note: Syntax inquiry Typo error can be because I am removing the output code, sorry for your HTML There are some errors in a javascript but I can not make sure when it happened
You do not have JavaScript turned off properly, it should look like
$ ('.date-view> tb> tr> td-cal-position') .ea Ch (function () {console.log (this);});
Additional notice ');' In the end.
Now when I make these changes, the output is fine.
Comments
Post a Comment