Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // clear button for CSE search results / MS-potilas 2012
- $(window).load(function() { window.setTimeout(function() {
- var xele=$("<a href='javascript:void()' onclick='customSearchControl.clearAllResults();$("#cseclr").hide();' id='cseclr' style='display:none;position:absolute;right:9px;top:1px;'><img title='Clear search results' src='http://www.google.com/uds/css/clear.gif' style='border:1px solid #eee;'/></a>");
- $("#cse").before(xele);
- $("#cse-search-form .gsc-clear-button").click(function() { $("#cseclr").hide(); });
- $("#cse-search-form input.gsc-search-button").click(function() { if($("#cse-search-form input.gsc-input")[0].value != "") window.setTimeout(function(){ $("#cseclr").show();}, 250); else $("#cseclr").hide(); });
- if(searchPhrase != "") $("#cseclr").show();
- }, 500); });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement