[SOLVED] An issue with jquery ajax load
Hi,
So i have this code that loads a section of another page and shows it on the current page. Say i want to get contents from a div with id=section2 and load it in the current page. The 'bug' i am seeing is that the whole page gets called in the current page using jquery's 'load' function. This happens in probably 30-35% of the cases. And so far this has happened with FF only and not IE
Anyone else ever had this kind of problem?
I am using the following code snippet:
-
renderSecondPage: function(options) {
var defaults = {
//among other variables...
url : $('#second-page-div a').attr('href')+"#section2"
};
var s = $.extend(defaults, options || {});
return this.each(function() {
if(!$(this).is(':visible')) {
$(this).show().animate({'height':'250px'},
{duration:1000,
complete:function(){$(this).load(s.url, somecallback-function());});
});