[eluser]xwero[/eluser]
in your view the jQuery is added somewhere before this particular view?? And the javascript code is in a script tag called by the jQuery using $(function(){// code }); so it loads when the document is ready?
Maybe there are other things but those are the ones my eye fell on right away.