+1  A: 

the .ratings li isn't parsed yet when you have .mouseover() not working.

You can wrap it in $(document).ready(function() {...}); or use .live() (which creates the binding for any currently parsed at that point in the script and any elements added in the future).

Robert
+1  A: 

The only thing I can imagine that would cause this is a lack of a domready event. This should work:

$(function () {
    $('.rating li').mouseover(function() {
    }
});
Stephen
Thanks everyone. I had forgotten to put $(document).ready(function() { into that particular js file. So.. just to check i 'get this' without that snippet of code, the JS is loaded BEFORE the page content, hence why i needed live() BUT If enclosed in $(document).ready(function() {} the javascript is loaded after the page by some complex stuff within jquery? Thx
Thomas Clowes
Yeah, the javascript is parsed and executed as it is read from the DOM, before the DOM is ready. Putting it inside the DOM ready event makes it fire after everything on the page is loaded.
Stephen
A: 

Did you put

$('.rating li').mouseover(function() {
}
in $(document).ready(function() {....} ?

Even if you include a .js file, if the elements in the page ('rating li') are not loaded, the bind will not be made.

cripox
A: 

Without seeing more of you code, it's difficult to say for sure. But my guess would be that your script is running before the pageload completes. try wrapping your bindings (and anything else that depends on particular dom elements to exist) with a call to $(document).ready(...).

something like this:

$(document).ready( function() {
    $('.rating li').mouseover(function() {
       // whatever
    });

    $(".autosuggest").keyup(function() {
       // whatever else
    });
});

If that's not it, then post more of your code, and we'll dig in further.

good luck.

Lee