DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:default_text_search

Adding default text for the search box

Just copy and paste this into your local [dokuwiki]/conf/userscript.js file.

/**
 * Add a placeholder text into the input field of the wiki search
 */
jQuery(function () {
    var defaulttext_searchinput = 'Enter Keywords to search wiki';
 
    var $searchinput = jQuery('#qsearch__in');
    if ($searchinput.length && !$searchinput.attr('placeholder')) {
        $searchinput.attr('placeholder', defaulttext_searchinput);
    }
});

More info

Can be found in the javascript pages.

tips/default_text_search.txt · Last modified: 2013-09-18 22:05 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki