I have found a nice script at Google Powered Site Search I'm trying to change the jquery with no luck so far.
I changed this code:
$(‘#searchForm’).submit(function(){
googleSearch();
return false;
});
In to this:
$(‘#s’).keyup(function() {
$(‘#searchForm’).submit(function(){
googleSearch();
ret开发者_Go百科urn false;
});
But it doesn’t work…Can someone tell me way that is.??
I also tried this:
$(“input”).keyup(function () {
googleSearch();
return false;
});
Also didn’t work. It’s just jquery so it should work..
Thank's
Do the original code is working? Also the modified code have missing end braces.
Check this:
$('#s').keyup(function() {
$('#searchForm').submit(function(){
googleSearch();
return false;
});
});
Try this, it works :
$("#s").keyup(function(){
googleSearch();
return false;
})
See Eg
精彩评论