jQuery - Object Expected on IE and $(document).ready(function() {});

前端 未结 5 1979
不知归路
不知归路 2021-01-15 19:48

I have a page ([LINK REMOVED]) that works completely well in FireFox and Chrome, but for some reason I am getting an \"Object Expected\" error in most, if not all versions o

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-15 19:56

    Your $(document).ready and $(function(){..} methods are just fine - in fact when I fired up the Visual Studio debugger and attached to the page, those methods were firing as expected. The problem is that they are trying to call a function named initializePageMain() that doesn't exist for some reason. As to why that function doesn't seem to exist... I am not sure.

    I would also try "fixing" the script tag that contains this code (sidenote: why isn't doToolTips defined in your index.js file?) to read like the rest of your script tags (get rid of the language element:

    
    

提交回复
热议问题