JQuery on masterpage doesn’t work in child pages ASP.NET

asp.netjquerymaster-pages

Ok, so this is my problem.

i have this on my master page inside <head runat="server">

<script src="js/cufon-georgia.js" type="text/javascript"></script>
<script src="js/cufon-yui.js" type="text/javascript"></script>
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/script.js" type="text/javascript"></script>

The master page is in the same folder were the js folder is.

I have one solution with one Folder named Website, inside this is the masterpage and the folders with the scripts and css's.

The index page is at the same level than the website folder.


The jquery is being used for desing. I know this because i ran the template on wamp to modify, and if i remove the jquery scripts the page gets "uglier".

So, when i did all the modifications i wanted, i created the masterpage and inserted all the HTML code inside. But the jquery is not working. the page stays "ugly".

The css is working tough. and its in the same level of the jquery files. only in a diferent folder.

Ive reasearched a lot and tryed everything i could find.

ResolveUrl

Tryed to load from the code-behind.

changed the level of the master page and index.aspx.

body onload

with and without type="text/javascript"

tryed change the path ../, ../../, ~/ (long shots, i know)


Im out of options, help?

(im sorry if there is already an anwser, i couldn't find it…)

Best Answer

Proper way to use JQuery when using MasterPages in ASP.NET?

found the answer where, scriptmanager,

not the ideal solution, everytime we need to change one script we need to change in all pages, but it works...

Related Topic