Skip to content

Instantly share code, notes, and snippets.

@bluemango
Created November 14, 2011 20:34
Show Gist options
  • Save bluemango/1365067 to your computer and use it in GitHub Desktop.
Save bluemango/1365067 to your computer and use it in GitHub Desktop.
Dual searh button for Zendesk/ScreenSteps Live
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