Have you tried putting breakpoints and stepping through the code to see where the error is happening?
stbuchok
Practically a Posting Shark
875 posts since May 2011
Reputation Points: 138
Solved Threads: 124
Skill Endorsements: 2
To explain why the script portion doesn't appear in Firefox, you need to briefly understand how the JQuery internally works. The script will detect which browser is being viewed by the client, and then create a proper object which should be compatible (functionalities) with the current viewing browser. The issue you have right now should be a bug inside JQuery. There could be certain situation that JQuery does not know and has not implemented a way to handle it because there are so many differences among IE versions. As a result, you are getting errors from IE 7 and 8.
You should file a bug report to JQuery project. Try to give them as much information as you can and see if they could find the cause of the error.
Taywin
Posting Maven
2,633 posts since Apr 2010
Reputation Points: 275
Solved Threads: 375
Skill Endorsements: 17
No, don't assume that. Step through your code. Verify where the error is and why it is happening. I think it is more likely that there is something wrong in your code than there is something wrong with jQuery (not impossible, just less likely).
stbuchok
Practically a Posting Shark
875 posts since May 2011
Reputation Points: 138
Solved Threads: 124
Skill Endorsements: 2
I'm glad you've stepped through the code, but you haven't said what the error is or expressed why the error happens. If you know what line it is happening on, you should be easily able to say why the error happens, from there it is a matter of determining how to best fix the error.
I also don't see any of your own code, it's hard to say if you are doing something wrong without seeing your code.
With that said, there is still the possiblity that it is jQuery, however without knowing why it is happening, you can't say for sure.
The other thing I just noticed is that you are using an old version of jQuery, I'd suggest upgrading temporarily to see if the issue goes away (this would also verify that it is a problem with jQuery and the version you are using).
stbuchok
Practically a Posting Shark
875 posts since May 2011
Reputation Points: 138
Solved Threads: 124
Skill Endorsements: 2
The following is a test using jquery-1.4.4 and shows no errors (tested against IE7, 8 and 9).
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>
$(function(){
$('#test').attr('data-val', 'this is a test');
alert($('#test').attr('data-val'));
$('#test').attr('data-val', null);
alert($('#test').attr('data-val'));
});
</script>
</head>
<body>
<div id="test"></div>
</body>
</html>
So my next question would be, is $currentTHUMBNAILimage a jquery object? There must be something else happening that is causing an error.
stbuchok
Practically a Posting Shark
875 posts since May 2011
Reputation Points: 138
Solved Threads: 124
Skill Endorsements: 2
Yes the end with works cross browser:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>
$(function(){
alert($('[id$=1]').html());
alert($('[id$=2]').html());
});
</script>
</head>
<body>
<div id="test1">test 1</div>
<div id="test2">test 2</div>
</body>
</html>
Is there an version that is online that I can look at, that way I can debug it?
stbuchok
Practically a Posting Shark
875 posts since May 2011
Reputation Points: 138
Solved Threads: 124
Skill Endorsements: 2