0

This is my site: http://noamsm.co.il

It should fade-in some text when the search box gets focus. and fade-out on blur.

But it isn't working.

You can view source; I put the jquery code in the page.

Kara
  • 6,115
  • 16
  • 50
  • 57

2 Answers2

1

In IE i get the javascript exceptions "google is undefined" and "jquery is undefined". I think in IE, the "google" reference fails which in turn aborts the script and such that the jquery reference also fails. So i would start by figuring out why the Google reference is failing in IE.

Here is an SO link, not sure if it applies to you:

Google is undefined

Community
  • 1
  • 1
intermension
  • 2,593
  • 2
  • 18
  • 14
  • i ended by having jquery on my server. and it fixed the issue :) thx –  Sep 16 '09 at 21:38
1

Instead of $(document).Ready you should use

google.setOnLoadCallback(function() {
  jQuery(function($) {
    // run your jQuery code in here after DOM has loaded
  });
});

This is becuase the jQuery takes time to load dynamically using google.Load();

You could replace the script to load the google library and the call to google.Load with the direct link to jQuery below carry on using $(document).Ready

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
Jaimal Chohan
  • 8,530
  • 6
  • 43
  • 64