Reputation: 12376
Here's a part of my aspx page:
<span id="drag">This can be dragged </span>
<input id="save" type="button" value="Save" />
<div id="dialog">
</div>
<script src="Scripts/jquery.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.9.0.custom.js" type="text/javascript"></script>
<script src="Scripts/ui.js" type="text/javascript"></script>
And here's my ui.js file:
$('#save').click(function ()
{
$('#dialog').dialog();
});
$(document).ready(function ()
{
$('#drag').draggable();
});
And I've linked the css file in my masterpage :
<link rel="stylesheet" href="CSS\ui-lightness\jquery-ui-1.8.24.custom.css">
If I try this in a plain html file I get both draggable and dialog functionalities to work but neither function works when I try it in my aspx page.Is there a special consideration with ASP.NET?
Upvotes: 1
Views: 174
Reputation: 2738
If you are not getting any error in browser's console then u should use "jQuery" instead of "$" symbol
Upvotes: 0
Reputation: 13835
What does the rendered HTML look like? Maybe you have a problem with rendered ID of your controls Here's an article about clientId Mode
ClientIDMode can take the following four possible values
This one can be set in the control directly, in the page or in the webConfig file.
Upvotes: 1
Reputation: 7423
are all the files being downloaded? did you check this with fiddler, firebug or developer tools?
Upvotes: 1
Reputation: 191
You probably loading 2 times the jquery library.
remove this resource :
Upvotes: 1