oceanmountain
oceanmountain

Reputation: 121

.load() does not work on IE

I am trying to have a little dynamics work in this website http://peps.sqps.nl Everything seems to work well untill I test the website in IE, it just doesnt give any content back.

The js I use is as following:

$(document).ready(function(){
$('li.navItem a').click(function(){
    var url = $(this).attr('href');

    $('article').load(url + ' article', function(){
        $('article').fadeTo(1200, 1);
    });

    return false;
});
});

the html of the dynamic part is as following, where the <article></article> part is supposed to act dynamicly.

<section id="content">
  <div id="article">
    <article>
         content is in here
    </article>
  </div>
</section>

The solution given here on similar problems didnt fix the bug Anyone has any ideas?

Thnx!

Upvotes: 0

Views: 467

Answers (3)

Winnie T
Winnie T

Reputation: 1

Add .each(function(){...}); after .load , it should works in IE and Chrome.

        $('#<%=image1.ClientID %>').load(function () {
            //things to do
        }).each(function () {
            if (this.complete) $(this).load();
        });

Upvotes: 0

mmcnickle
mmcnickle

Reputation: 1607

Your URL looks like it would be badly formed.

url = "http://site.com/path/to/page"
load_url = url + ' article'
alert(load_url); // Displays "http://site.com/path/to/page article"

Is this what you really want?

Upvotes: 1

expertCode
expertCode

Reputation: 533

Probably the IE is making cache of your code.

See this post: jQuery's .load() not working in IE - but fine in Firefox, Chrome and Safari

Upvotes: 0

Related Questions