I use jQuery to show a string, and add a remove button next to the string. How do I give the button the ability to remove the string? (both the string and the button do not show up in the HTML source because they are output from jQuery.)
remove jquery returned results?
Page 1 of 16 Replies - 329 Views - Last Post: 20 February 2013 - 12:15 AM
Replies To: remove jquery returned results?
#2
Re: remove jquery returned results?
Posted 19 February 2013 - 10:27 PM
What have you tried?
#3
Re: remove jquery returned results?
Posted 19 February 2013 - 11:36 PM
#4
Re: remove jquery returned results?
Posted 19 February 2013 - 11:41 PM
i made the string and the remove button in the same div, giving the div an id. then the problem is the element cannot be found.
#5
Re: remove jquery returned results?
Posted 19 February 2013 - 11:50 PM
that’s the point where we would need to see the code.
#6
Re: remove jquery returned results?
Posted 20 February 2013 - 12:13 AM
to clarify,
i have a div, in which i use jQuery to write line by line. i can do clear-all to remove the whole thing (by
so i think i have to prepare a div for each line and id each line in advance. the problem is i don't know how many lines there will be. now if i know the maximum available lines is 150, then i will have to prepare 150 divs (or tr's) upfront? is there a smarter way?
i have a div, in which i use jQuery to write line by line. i can do clear-all to remove the whole thing (by
html('');
). now i need to be able to remove them by selecting a line. i tried to id the lines on the fly which will not work because the elements cannot be found in HTML source.so i think i have to prepare a div for each line and id each line in advance. the problem is i don't know how many lines there will be. now if i know the maximum available lines is 150, then i will have to prepare 150 divs (or tr's) upfront? is there a smarter way?
This post has been edited by g37752: 20 February 2013 - 12:16 AM
#7
Re: remove jquery returned results?
Posted 20 February 2013 - 12:15 AM
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote




|