Reply To: Problem with Default search text parameter

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Problem with Default search text parameter Reply To: Problem with Default search text parameter

#6208
Ernest Marcinko
Ernest Marcinko
Keymaster

Hi!

It’s not a bug, this is the default browser behavior on placeholder text.

Try using this custom script in your site header or footer to remove the placeholder when the input is focused:


<script>
jQuery(function($) {
  $('input.orig').focus(function(e){
     if ($(this).attr('placeholder') != "")
        $(this).attr('placeholder_temp', $(this).attr('placeholder')); 
     $(this).attr('placeholder',"");
  }).blur(function(){
     $(this).attr('placeholder',$(this).attr('placeholder_temp'));
  });
});
</script>
Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)