How to operate on custom HTML with jQuery? -


let's have

str = "hello, <b>my name is</b> jquery."; 

and want use $ selector, "my name is". should do? far tried this:

html = $.parsehtml( str ); $( $(html), "b") 

without success...

it returns array of elements, not chosen element...

edit: cannot modify str.

try solve regexp

var str = "hello, <b class='needsthing'>my name is</b> jquery."; var reg = new regexp(/<b>.*<\/b>/) result = str.match(reg) 

is it, u want?


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -