How to show only one textbox insted of two when using before method of jquery?

I applied a textbox using before method of jquery to one of my wordpress page. But the issue is that it is showing two textbox instead of one. I want to show only one textbox. This is my code below

var $ = jQuery.noConflict();
$(".product-listing-table").before("<p><input type='text' placeholder='search product by name, status, sku' id='upen'></p>");

This is here

Related posts

1 comment

  1. Use this

    var $ = jQuery.noConflict();
    $( document ).ready(function() {
      // This will remove the serach_input
      $(".search_input").remove();
      $(".product-listing-table").before("<p class="search_input"><input type='text' placeholder='search product by name, status, sku' id='upen'></p>");
    });
    

Comments are closed.