Topics: ASP.NET 2.0
Aug 10, 2010 at 10:50 AM
I have added an extra page into the admin screens and am tring to use jQuery on the page. I noticed that the admin1.master loads jQuery via js.axd and can see the references on the page source when the application is running. However, if I attempt to use jQuery(document).ready or $(document).ready I get an error stating that jQuery is undefined. I added a direct reference to the jQuery file by adding a header content place holder in the admin1.master and then the script reference in my master derived content file and I can now access jQuery but now have the issue of it being included twice. Is there a particular way I need to reference jQuery?
Aug 10, 2010 at 12:41 PM

Looks like your document.ready call comes before jQuery has been referenced. What build are you using and how do you include js in that page?

Aug 11, 2010 at 5:48 AM
Edited Aug 11, 2010 at 7:32 AM
I'm using 6.2.1 e291ce8b578c. In the admin1.master.cs there is the following: protected virtual void AddJquery()... but I have had to manually add in jQuery again as even though this code adds in jQuery any attempt to use jQuery on my page results in an error (as if jQuery is not initialised) so I added the following to my page in 'admin/UserEntries/Default.aspx' to see if my usages of jQuery would then work, and they do. : as mentioned, I created a ContentPlaceHolder in the head section of the admin1.master.aspx. I did notice that in some places jQuery seems to be referenced with BlogEngine.$ if this is the case any plugins used would fail as they would be expecting just $... P.S. In this release there is also a JavaScript error when you enter the login.aspx page