theraneman
theraneman

Reputation: 1630

jQuery not working with Html.ActionLink?

I know this is wierd, but I am using ASP.NET MVC, I have real simple jQuery on 2 views. One view is the Home page and the other is an item details page. This page is opened using an Action Link on Home Page. The jquery on item details page does not fire at all.

$(function() {
        alert('Fired!');
        $('#contact').hover(function() {
            $('#conDetails').addClass("gifBack");
        });

    });

This jQuery when put on Home page, shows the alert box but not on the details page. Am I doing something stupid here.

Upvotes: 0

Views: 789

Answers (2)

Ray Lu
Ray Lu

Reputation: 26648

I couldn't think of a reason why the alert is not being fired in the details page unless there is no jquery javascript referenced in that page?

Upvotes: 2

pedrofernandes
pedrofernandes

Reputation: 16854

You must put a clientID and not the ID of control.

Upvotes: 0

Related Questions