javascript - How to remove a DOM element or select from a $(this).html() in jQuery? -


I am trying to get the carat within an HTML element, either ?? ² (▲) and â ?? ▼).

So I have used it (it is within a separate function

console.log ($ (this.html ()))

Returns:

Phone One? ² < / P>

Now if I want to completely interrupt this HTML element, how do I do it?

In addition to this, if I want to select actual carat for comparison How can I do this?

Update :

Answer more and more How do I select the carat from HTML:

  console log ($ ('# sort-caret', this) .html ());   

returns:

undefined

To remove the domain element and just get the text:

  var s = 'phone & lt; span id = "sort-caret" & gt; Ã? ² & lt ; / span> 'var var / r & lt; / / 1 & gt; / console.log (s.replace (r, ""));    

To get span lessons in the current context, use it:

  $ (this) .find ('span'). Html ()    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -