Nozim
Nozim

Reputation: 597

ASP MVC application deploy problems with Jquery

I'm deploying a simple asp mvc 2 application on my local IIS 7.5 server. But when I try to run some javascript


    
            $(function () { alert("works"); })
    

in view or Site.Master, I do not see any alert. What is the problem?

Upvotes: 0

Views: 427

Answers (1)

Rafay
Rafay

Reputation: 31033

there can be a couple of problems

 $(function () {
   alert("works");
   });   <--------- you are missing a semi colon

make sure you have included the jquery

if you are loading jquery from the google cdn it might be possible that its blocked on the server in that case reference to the jquery.js saved on your server

Upvotes: 1

Related Questions