Thanks for the reply.. i should of put a 'newb' alert out:)
anyway, ya so it wasn't in the DOM so that explains why that wouldn't work.. I ended up using IndexOf and substr... to remove the div from the string... last question .. is there an simpler way? Wizzud wrote: > > > To remove an element from the DOM, remove() is the function. > To remove "<div>" from a String (of HTML) you'd have to either use > string manipulation, or add it to the DOM and then use remove(). > > The reason I include both is because your question is ambiguous : a > literal "string of html" does not have elements, and given that you > have tried remove() with no apparent success it makes it possible that > you do actually mean a String, rather than the DOM? > If it is the DOM that you want to remove your DIV element from, then > your problem is not with remove() but possibly with constructing the > appropriate selector to locate the DIV in question? > > (just for completeness, one possible/improbable alternative is to > empty() the DIV's parent, but only if the DIV in question is the sole > child) > > > On Oct 30, 9:58 pm, arpowers <[EMAIL PROTECTED]> wrote: >> Hey everyone... >> I need to remove a <div> element from a string of HTML... >> what JS or JQ command should I use... >> >> I've been struggling with this... I've tried remove(), what else? >> -- >> View this message in >> context:http://www.nabble.com/Removing-HTML-from-string....-tf4721533s27240.h... >> Sent from the jQuery General Discussion mailing list archive at >> Nabble.com. > > > -- View this message in context: http://www.nabble.com/Removing-HTML-from-string....-tf4721533s27240.html#a13518995 Sent from the jQuery General Discussion mailing list archive at Nabble.com.