开发者

RadEditor and document.ready

document.ready is not working in RadEditor, when i use the following jquery code

<script>
  $(document).read开发者_JS百科y(function() {
    $("#accordion").accordion();
});
</script>

It shows as error in RadEditor


The RadEditor control is a ASP.NET AJAX control and is initialized in the "init" event of the MS AJAX client framework. Try replacing the $(document).ready() code with the AJAX pageLoad() method:

<script type="text/javascript">
function pageLoad()
{ 
    $("#accordion").accordion(); 
}; 
</script> 

This way you can be certain that the accordion code will be executed after the editor is ready. Of course it depends on the code in your page, but with the given information, this seems the most probable issue.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜