Created
November 14, 2011 20:34
-
-
Save bluemango/1365067 to your computer and use it in GitHub Desktop.
Dual searh button for Zendesk/ScreenSteps Live
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery("#search_box").text("Search"); | |
if (jQuery("#suggestion_submit")) { | |
jQuery("#suggestion_submit").val("Search Forums"); | |
var html_string = '<input type="submit" name="commit" value="Search Docs" class="button search primary" id="screensteps-search-submit"/>' | |
jQuery("#suggestion_submit").before(html_string); | |
jQuery("#suggestion_submit").removeClass('primary'); | |
jQuery("#screensteps-search-submit").css("margin-left", "0px").before("<br /><br />"); | |
jQuery("#screensteps-search-submit").click(function(e){ | |
var search_string = jQuery("#suggestions_query").val(); | |
var query_string = jQuery("#suggestions_query").val().replace(/\s/g,"+"); | |
window.location = "http://help.bluemangolearning.com/searches?text=" + query_string; | |
return false; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment