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
October 13, 2015 at 8:50 am
#6208
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:
[code]
<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>
[/code]
-
This reply was modified 10 years, 7 months ago by
Ernest Marcinko.