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
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>
- This reply was modified 8 years, 11 months ago by Ernest Marcinko.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)