I do many search in stackoverflow and google, but I cannot found a logical way !
I use getScript to load a js file, I get "Not Well Formed" error in Firefox error console. I trying to comment all lines of my code in js file, and again I get that error !
Timestamp: 04/25/2012 02:02:32 PM
Error: not well-formed
Source File: file:///G:/ct/main/main.js?_=1335346352617
Line: 1, Column: 1
Source Code:
/*
I use $.ajax too, I get exactly that error.
Note: my included JS code work without any problem and everything is OK (when my code is not commented), but I want to know why my user should get this error in Firefox ?!
Sorry for my bad English.
EDIT:
var ulWidth = 0;
$('.carousel_links ul li').each(function(){
ulWidth += $(this).outerWidth();
});
$('.carousel_links ul').css({
'width' : ulWidth+'px'
});
UPDATE:
I found this way: How do I include a JavaScript file in another JavaScript file?
I use this and I think this way is better than $.getScript
because I don't get any error and all of my JavaScript code work fine.