Since I'm a newbie to both Umbraco and jQuery, I was really proud I managed to develop some simple but useful scripts using jQuery in Umbraco. I just thought everything was working fine until I tested my Umbraco website in IE7. Though it all works perfectly in IE8, IE7 has this little issue I can't figure out:
I put some jQuery on some paragraphs in the main contentfield, but everytime I click the tab in the navbar to load this page, the main contentfield suddenly includes not only these adjusted paragraphs but the content of the footer too. As soon as I refresh the page, everything is solved and looks great again.
So what am I to do? I mean, should I insert a 'double refresh' on this page or something?
I hope you guys can help me out, thanks in advance!
A double refresh will only mask the error - better to try and resolve it. Any chance of a URL to problem page or including the script that is having the problem
jQuery problem in IE7
Since I'm a newbie to both Umbraco and jQuery, I was really proud I managed to develop some simple but useful scripts using jQuery in Umbraco. I just thought everything was working fine until I tested my Umbraco website in IE7. Though it all works perfectly in IE8, IE7 has this little issue I can't figure out:
I put some jQuery on some paragraphs in the main contentfield, but everytime I click the tab in the navbar to load this page, the main contentfield suddenly includes not only these adjusted paragraphs but the content of the footer too. As soon as I refresh the page, everything is solved and looks great again.
So what am I to do? I mean, should I insert a 'double refresh' on this page or something?
I hope you guys can help me out, thanks in advance!
A double refresh will only mask the error - better to try and resolve it. Any chance of a URL to problem page or including the script that is having the problem
var charCount = 300;
$('.span8border > span').each(function() {
var niUrl = $(this).find('a').attr('href');
$(this).find('p').each(function (){
$(this).replaceWith(function() {
var niSliced = $(this).text().slice(0, charCount);
return '<p>'+ niSliced +'... <br /><a href="'+ niUrl +'">Lees meer</a></p>';
});
});
$(this).find('h6').each(function() {
$(this).replaceWith(function() {
var niSliced = $(this).text().slice(0, -8);
return '<h6>'+ niSliced +'</h6>';
});
});
$(this).find('p:not(:first)').remove();
$(this).find('a:last').remove();
});
</body>
Okay, hope this makes it all a bit clearer....
This is how it shows up BEFORE refreshing IE7:
And this is how it SHOULD be (and how it's shown after refreshing):
I just don't use IE7 anymore so instead I'll be using IE8+.
Problem solved ;-)
is working on a reply...