在jQuery的$(文件)时,使用ASP.NET AJAX $ find方法failes。就绪()方法 [英] ASP.NET AJAX $find method failes when used in jQuery's $(document).ready() method
本文介绍了在jQuery的$(文件)时,使用ASP.NET AJAX $ find方法failes。就绪()方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图找到使用ASP.NET AJAX的客户端框架的树。我还使用jQuery做任何JavaScript操作之后的DOM已准备就绪。我的code是这样的:
$(函数(){
VAR树= $查找('treeId');
});
下面,树干脆为空。但是,当我试着去发现内容之一单击树,它不是空:
$(函数(){
$('saveButton')。点击(函数(){
VAR树= $查找('treeId');
}):
});
解决方案
这工作对我来说与Telerik控制:
$ Telerik的。$(文件)。就绪(函数(){
VAR树= $ $ Telerik的发现(<%= RadTreeView1.ClientID%GT;)。
});
看到这个 http://www.telerik.com/帮助/ ASPNET的Ajax /引进,使用,jquery.html
I'm trying to find a tree using ASP.NET AJAX's client-side framework. I also use jQuery for doing any JavaScript operation after the DOM is ready. my code is like:
$(function(){
var tree = $find('treeId');
});
Here, tree simply is null. But when I try to find the tree on click of one of elements, it's not null:
$(function(){
$('saveButton').click(function(){
var tree = $find('treeId');
}):
});
解决方案
this worked for me with Telerik controls:
$telerik.$(document).ready(function () {
var tree = $telerik.$find("<%=RadTreeView1.ClientID%>");
});
see this http://www.telerik.com/help/aspnet-ajax/introduction-using-jquery.html
这篇关于在jQuery的$(文件)时,使用ASP.NET AJAX $ find方法failes。就绪()方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文