views:

20

answers:

1

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

<script>
  $(document).ready(function() {
    $("#accordion").accordion();
});
</script>

It shows as error in RadEditor

+1  A: 

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.

lingvomir