Hello,
How can I add the ‘autofocus’ attribute to the X theme search inline element?
Regards,
Alex
Hello,
How can I add the ‘autofocus’ attribute to the X theme search inline element?
Regards,
Alex
Hi Alex,
Thanks for writing around! You can do it with custom jQuery script, add the following code in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){
$('.x-search-input').prop('autofocus', true);
$('.x-search-input').focus();
});
Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
Awesome - thanks!
You’re welcome.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.