[jQuery] Adding Arrows to a DropDownMenu based on Lists
Good Morning Everyone, I am struggling a few hours with a problem, which solution isn't that easy as I initial though. The following example list is generated by backend code. ul id=nav li a id=hyperlink class=navlink href=/home title=Home/a /li lia id=hyperlink class=navlinkparent href= title=Folder A/a ul lia id=hyperlink class=navsublinkparent href=/folder_a/ page1 title=Page1/a /li lia id=hyperlink class=navsublinkparent href=/folder_b/ page2 title=Page2/a /li lia id=hyperlink class=navsublinkparent href= title=Folder B/a ul li a id=hyperlink class=navsubsublink href=/folder/page1 title=Page1/a /li li a id=hyperlink class=navsubsublink href=/folder/page2 title=Page2/a /li li a id=hyperlink class=navsubsublink href=/folder/page3 title=Page3/a /li /ul /ul Thats only a shortened version. JQuery is used to create a horizontal dropdown menu. Up to this part everything is working as expected. To improve the usability I want to add two kinds of arrows to the menu. One arrow down for the top elements and one arrow right for child entries. That part should accomplished by the following snippets. $(ul li a.navlinkparent).css({ background-image: url(/img/nav_arrow_down.gif), background-repeat: no-repeat, background-position: right center }); $(#nav ul li a.navsublinkparent).css({ background-image: url(/img/nav_arrow_right.gif), background-repeat: no-repeat, background-position: right center }); The problem I am facing right know is, that not every parent has childs and therefor it shouldn't get an arrow assigned. I tried various filters but without any luck. Does anyone has a hint on solving? best regards, Gordon
[jQuery] Re: Travel a Table filtered by checked Checkboxes
Hi Brian, your approach worked like a charm. thanks and best regards, Gordon On 28 Aug., 18:17, Brian Schilt [EMAIL PROTECTED] wrote: Would you be able to store the Reference Number in the value attribute of the checkbox? That would make things a lot easier. input type='checkbox' name='refNumber' value='ReferenceNumber'/ Then you could do something like this? $(tableID) .find(':input:checkbox:checked') .each(function(){ alert('ref number: ' + $(this).val()); }); Brian On Aug 28, 8:49 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi folks, I have a problem, with the following scenario. Given is aTablelike the following table thead.../thead tbody tr tdinput type=checkbox/tdtdReferenceNumber/td ...more tds /tr /tbody /table A Submit Button is calling a function that should check thetablefor checked checkboxes and call a webservice with each reference number. The following JQuery Snippet finds all checked checkboxes, but afterwards I am stucked. $(TableID) .find('td') .find('input:checkbox:checked').each( function(intIndex) { alert(intIndex); } ); I also tried the following, but without luck. $(tableID) .find(td) .filter(input:checkbox:checked) .each( function(intIndex) { alert( $(this).next().text() ); } ); Does anyone has a hint on how to solving that problem? best regards, Gordon