- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › jQuery Append and then remove
Hello.
I am using jQuery to append a list item when a box is checked and when it is unchecked I want that list item to go away. I got the first part to work, but not the second (removing portion). Here is a paired down version of my issue http://theschaafs.org/checked.html.
I can’t get down into the :not(:checked) portion of the code.
Here is what I have thus far…
Thanks for looking into it!
Few things to note,
var title = $(this).attr("title");
This will return <input type=checkbox title="title">
And this is fine but you shouldn’t be appending the title without wrapping….
Also if("input:checked") is just a string
"input:checked" != anything
So something like that …. that should get you on the right track
var title = $(this).attr("title");
This will return <input type=checkbox title="title">
And this is fine but you shouldn’t be appending the title without wrapping….
What do you mean by without wrapping?
I am trying to get the value of the title attribute…are you saying I am only looking for titles with the title of title? ;)
Thanks Mr. KiTT3N!
How’s this: