jQuery script works after refreshing page

  javascript, jquery, wordpress-theming

I use this code to change the text of an element, but it only works I refreshing the page how could i make it work without refreshing.?

jQuery(document).ready(function($) {
  $(".qodef-pl-filter-holder ul li.qodef-pl-current span").text(function() {
    return $(this).text().replace("Show all", "OLA"); 
  });    
});

Any ideas? Thanks!

Source: Ask Javascript Questions

LEAVE A COMMENT