开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜