ajax toolkit error
I am using this code in asp.net 4.0:
panel = $('#<%= Panel1.ClientID %>')
panelBounds = CommonToolkitScripts.getBounds(panel); // error here
where panel1 is asp.net panel
and getting this error
Microsoft JScript runtime error: Sys.ArgumentException: Val开发者_StackOverflow社区ue must be a DOM element. Parameter name: element
How to fix this? also, Is there any alternative of getbounds in jquery to hold height width X and Y location?
$('xxx')
returns a jQuery object, not a DOM object. To get a DOM ref just use:
panel = document.getElementById('<%= Panel1.ClientID %>');
Use .positon, .width, .height in jQuery.
精彩评论