Forums/Community/Community tips & tricks

How to move the homepage forum search above the introduction text

Nick Houldsworth
posted this on March 06, 2012 17:52

Thought other users might like this little code snippet one of our devs knocked up for me.

It lets me position the homepage search box right at the top of the homepage, but I can still add custom text to the introduction box, which now appears just below.

Screenshot of the javascript widget is attached. The actual code is

(function($) {
var $solutionSuggestion = $('#solution_suggestion'),
$introductoryText = $('#introductory_text');

$solutionSuggestion.insertBefore($introductoryText);
}(jQuery));

 

Comments

User photo
David Linder

Nick, you are a savior! Especially for the people who don't know Javascript yet. Thank you!

June 14, 2012 18:38
User photo
Jennifer Rowe
Zendesk

Yes, very nice, Nick. I just tried it and it works great! Thanks for sharing with the community! I'm going to share this on our Twitter handle too.

June 15, 2012 09:38