Div Not Show using jquery

Posted by Webmasters964 under jQuery on 11/28/2013 | Points: 10 | Views : 848 | Status : [Member] | Replies : 1
Default.aspx page link working http://localhost:63243/Default.aspx Div show

but

Other.aspx page link Click http://localhost:63243/New/Other.aspx DIV NOT Show

Site.Master code

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="WebApplication2.Site" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>

<%-- <script src="<%#ResolveUrl("~/Scripts/jquery-1.4.1-vsdoc.js")%>" type="text/javascript"></script>
<script src="<%#ResolveUrl("~/Scripts/jquery-1.4.1.js") %>" type="text/javascript"></script>
<script src="<%#ResolveUrl("~/Scripts/jquery-1.4.1.min.js") %>" type="text/javascript"></script>--%>
<script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function () {
$("#fakeLink").click(function () {
$("#DIV").show(2000);
});
});
</script>
<style type="text/css">
.fakeLink
{
color: blue;
text-decoration: underline;
cursor: pointer;
background-color:transparent;
}
#DIV
{
background-color:Orange;
height:200px;
width:250px;
}
</style>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<span class="fakeLink" id="fakeLink">Link</span>
<div id="DIV" style="display: none;" >

</div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>





Responses

Posted by: Sheonarayan on: 11/28/2013 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Its looking strange, try to see the source code of other pages to ensures the id is appearing correctly.

The other possibility might be that in master page you have commented the jQuery file reference so the possibility is that in the default page you might have explicitly added jQuery file reference but in other pages not.

I hope this will give some clue.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Webmasters964, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response