I am using the jQuery plugin Cross Slide. My page is working fine in Chrome and Firefox. But in Internet Explorer 7, I get:
Debug error as Object expected on line 1:
$(document).ready(function() {
$('#image').crossSlide({sleep:4,fade:1},[{src:'images/1.jpg'},{src:'images/2.jpg'}]);
});
How can I fix the bug for Internet Explorer 8 and Internet Explorer 7?
I had the same problem, you just have to delete the comma after the last picture you point to. This should work in IE.
Greets
Try with companion.js. It points you to the JavaScript line that has the problem instead of the default line 1. Moreover, try with unpacked JavaScript code so that you know what is wrong.
Could you provide more code or even better, a working page that reproduces the problem? That little piece of code looks fine so far...
By the way, the "on line 1" tells you absolutely nothing in IE, don't trust it.
Related
I am trying to use the following JQuery code:
$("#thing").on("click", function() {
....})
And it doesn't work on Google Chrome in Windows 8, but it works in Firefox on Windows 8 and basically every other OS. Any ideas?
It works, check this: http://jsbin.com/ofuvuh/1 Probably there is some error in the code that ff ignore or maybe it's your browsers fault. Please check the chrome and ie console, probably it can helps
Try:
$("#thing").click(function ()
{
// your code here
});
Which is the same as .on('click', handler). See .click documentation.
Your code snippet looks completely fine. I assume you are using a fairly up to date version of jQuery, so most probably it is nothing to do with jQuery or the browser. I suspect there might be something wrong with the code surrounding your snippet.
As a possible solution:
In Chrome you can bring up the Console, which will tell you if there is any errors in your JavaScript (developers.google.com/chrome-developer-tools/docs/…). Open it up, refresh your page (you might see the error in the Console straight away). Or click that '#thing' and watch out for any possible errors coming up in the Console.
If you view this page...
http://eastlondondance.org/admin/MozillaProblem/example.php
...you'll find that there are no errors but that the functionality is not working.
The last dropdown is not being populated with options like the other 2. This however works on Safari, Chrome and IE.
What gives? Why isn't it working on Firefox Linux, PC or Mac but is on all other browsers?
Is it a problem with the code or a problem with Firefox?
Any help is much appreciated.
cheers,
George
Firefox is having problems with the variable name of performance. While I'm not certain why this is, renaming this to anything else will allow it to display in firefox. In the example below I renamed it from performance to performancex.
Example: http://benjaminhopkins.co.uk/stackoverflow/firefox.html
From the comments above seems not everyone see the problem? Maybe it could be a extension / plugin causing the issue. Using the developer toolbar and hovering performance firefox reveals the following:
Performance { constructor=Performance,
timing=PerformanceTiming,
navigation=PerformanceNavigation}
I'm trying to get the zoom function for Firefox to work using javascript but no luck, what am I doing wrong?
function zoomIn() {
document.getElementById('increaseWrapper').style['MozTransform'] = 'scale(1.5)';
}
Thanks in advance.
Your code seems to work perfectly find in this jsFiddle in Firefox 6.
Remember, 'MozTransform' only applies to Mozilla derived browsers. Safari and Opera and others have their own name for that attribute until it becomes an endorsed standard.
If you're trying your code in mozilla 4+ browser, then there must be something else wrong with your code because what you have disclosed in your question works fine in the right browser with the right HTML.
Have you checked your browser's error console or debugger console to see if you're experiencing an javascript errors that might be keeping your code from executing?
I wrote my original jQuery code and saw that it wasn't working in any version of IE.
I used JSLint to figure out why it wasn't working in any version of internet explorer.
Here is my new code that I cleaned up using JSLint http://theburnmachinept.com/js/scripts.js.
This still refuses to work on any version of IE. AND to top it off it doesn't work on any browser now. I switched back to the ORIGINALscripts.js file for the time being. Can anyone find anything wrong with my code? The code in question is the gallery code that starts on line 17 and ends on line 126.
I would greatly appreciate any help anyone could offer.
I think, $('#image').hide(); causes it, try $('#image').fadeOut();
Yesterday I added a line of JavaScript that uses confirm(), and I was using FireFox 3.6.3 and it was working fine, but today FireFox upgrades to 3.6.4 in the background and the confirm() freezes my browser, although it still works in IE. I suspect it is a FireFox 3.6.4 issue.
I was wondering if that was indeed a FireFox 3.6.4 issue. If anyone could please let me know, that would be great.
Thank you very much,
Rudy
confirm() works as expected here (FF3.6.4 US-en)
I'm don't see any similar issues in Bugzilla, so it's likely that this is not an issue with confirm() itself but, rather with how you're using it.
Can you create a simple, stand-alone test case that reproduces the problem and post it to http://pastie.org so others can test it? If people are able to reproduce it, than it should be submitted as to Bugzilla.