volusion - With jquery remove both a span and the next 2 characters -


i trying remove element volusion page don't have access large parts of code. can remove stuff using jquery, there elements outside of span can't rid of.

<span class="pagetext_l329n">quantity in stock</span>:6<meta itemprop='availability' content='instock'> 

i can use

$("span.pagetext_l329n").remove(); 

to rid of "quantity in stock" section, :6 doesn't have own container. parent div sitting in has lot of other stuff in don't want touch. there way remove span , following several characters? or separately select :6 , remove without container?

working demo http://jsfiddle.net/tubxc/1

js

  $(document).ready(function () {     var text = $('.pagetext_l329n')[0].nextsibling;     $(text).remove(); }); 

new js user2592238

$(document).ready(function () {     $("body:contains('quantity in stock')").each(function () {         var text = $(this).text();         text = text.replace("quantity in stock:", "");         $(this).text(text);     }); }); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -