There is no need to run $(document).ready when loading a page with
ajax using
jQuery. The scripts contained in the loaded content are automatically
evaluated after the load has been successfull. You should insert at
the end of the document you are loading
<script type="text/javascript">
alert("content loaded")
</script>

It will work flawlessly in both browsers.

On 16 déc, 17:13, davidgregan <davidgre...@gmail.com> wrote:
> I'm using a $.get call to get the contents for a dialog box and I'm
> trying to run the $(document).ready on the ajax return like so:
>
> parentPage.html:
> $.get('desiredContent.html',function(data){
> $("#dialogBoxDiv").html(data);
> $("#dialogBoxDiv").dialog('open');
>
> }
>
> desiredContent.html:
> $(document).ready(function() {
> alert("content loaded!");
>
> });
>
> this works fine for firefox, but ie won't run the $(document).ready()
> function on the desiredContent page. Is there a way to do this that
> will work in both firefox and ie?
>
> Thanks!

Reply via email to