Add - Remove List Item From Unorderlist Using Script?
Mar 23, 2010
i have a Drop down list with 10 choices (skillset). users must choose one skillset and the corresponding level (beginer/intermediate/master). ( they have to do this 10 times for all the sillsets) what i want is :
1 - i need to show up only one record (dropdowanlist) with level then have a button to add new skill and level if required 2- then when they choose the 1st skill from the dropdown , this one will not show up on the 2nd choice dropdown.
i have a menu and i would like to change the color of the Categories which have subcategories only. In my example the basic categories are: News , Announcements , Contact and Career. Only Announcements and Career categories have subcategories. So i would like those two to turn green. The fact is that the list items include a href ,so i don't know how to access those "a href" combined with "this".
I've been beating my head against a wall for a few days trying to get this working. I'm trying to create a dynamic menu where a user selects one item and another select list is shown, then another and another (and so on). Here is my JS, it *should* be taking the ID of the div, comparing it to the selected value and then showing another div by settings it's class property to visible:
I have a list called drawPathList thats just a list of xy coordinates. I use this to construct a drawing on a map. However, people would like to be able to 'Undo' something that they have drawn, so I'd like to yank that last item in a given list.
drawPathList looks like this: 23,34||45,67||456,678||43,78
Can someone help me with a function to remove the last item in the list (regardless of length)?
I have created a control that mimics a tree view control (i.e. expandable and collapsable items). In order to facilitate this functionality I am using a select list and using selectList.Add to add child options to their parent when the parent is double clicked, which works fine, however in IE6 after doing that the focus of the the select list jumps to the first item in the control, even though the item that was double clicked is still highlighted when I scroll back down to it. The only way I can get this code to work is by adding an alert after I have added the new item to the list, which is not a workable solution. The code works fine in IE7 and later. Anybody know a work around? I have pasted some code that highlights the issue below, just scroll down the list a while and double click one of the lower options, focus will jump back up to the top of the list. code...
I have a bunch of DIVs (not an <option> List) each of the class "SongListItem". For one of the DIVs at a time, I set a "Selected" attribute, so it sort of acts like a ListBox. So two rows in the list might look like: <div id="Item1" class="SongListItem">Item 1 Text</div> <div id="Item2" Selected="True"class="SongListItem">Item2 Text</div>
Now I want to write a jQuery function which gets the ID of the SongListItem div that has Selected="True". So far, I have tried: var SongID= $('.SongListItem[selected="True"]').attr("id"); and var SongID= $('.SongListItem[selected="True"]').get(0).attr("id"); In both cases, I get a "Object does not support this method."
I have anunorderedlist with many list items several levels deep, some of which contain nested unordered lists. How can I determine whichindividuallist items contain nested lists and attach click events to only those list items? For example:
Level 1 and Level 1-2 should have the click event bound to them while all the other list items don't have anything bound to them. I assumed that I would loop over all the list items using each() and :has or .children(), but I couldn't figure out how to test if the list item I was iterating on contain a sublist.
I have got a basic Unordered list of Options and I want to be able to click on one of the options and have that option added as a value to a Form Value Input on my submit form.Users will have a choice of around 200 options and I need them to just add one of them with a click to the submit form.I do not want to use a 'select' box to list the options,it has to be a visiable unordered list.
How I populate fields of a form with the data that relates to an item from a list box that user selects Example: List box contains item1, item2, item3 User selects item2 so want data connected to item2 displayed so it can be edited and updated.