[jQuery] Re: is there a secret to jQuery with Opera?
What timothyjoe said is right, why don't you join the jpg-# ? The hash (#...) you add to the url is to avoid caching ? if so, you should use a search (?...) instead. That code is for images-off detection right ? What about this: $('img /') .load(function(){ $('#noimages').attr(href, '/styles/gotimages.css'); }) .error(function(){ $('#noimages').attr(href, '/styles/imagefree.css'); }) .attr('href','/images/bgimage.jpg'); I hope it was indeed helpful. Cheers Ariel Flesler On Feb 21, 1:01 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Glad I'm not the only one :) My code - and it *is* a fudge - uses a pretend variable, written into a bit of hidden html. I doesn't work properly with a real variable (in Opera, neither!) and I'm still looking for an un-fudged solution. Here it is: jQuery.imagesOn = function(){ $('img src=' + '/images/bgimage.jpg' + '#' + Math.random() + '/' ).load(function() { $('#noimages').attr(href, '/styles/gotimages.css'); $('.imagecheck').html('On'); }); if ( $('.imagecheck').val() != 'On' ) { $('#noimages').attr(href, '/styles/imagefree.css'); } } So - well, any comment must be a helpful comment ;) Cheers, Cherry On Feb 21, 3:00 am, timothytoe [EMAIL PROTECTED] wrote: Yeah, the first Windows version didn't seem able to run for 5 minutes without crashing violently. I hated it. The JavaScript has gotten so fast in that browser that a nasty bit of statistics code I run takes 35 seconds on Firefox and 20 seconds in Safari, so I've really started to like Safari. :-) As for Opera, I'm having my own problems with it. It's the only browser my code isn't running on right now, and I haven't had time to figure out why. For me, it's not really Opera's fault. After all, IE causes me the most trouble by far, but I try it every couple days to make sure it's still working. Explain to me what you're doing. Doesn't Math.Random() give you a number from 0 to 1? Is that really your code? Do you really have a # in there? If so, why isn't it part of the previous string? On Feb 20, 6:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Aha! My good reason(s) were that an earlier beta repeatedly crashed my machine, and I'm fed up with Apple's creeping-startup-takeover strategy. But the current Safari version installed without a hitch; I guess I'll have to either live with the startups, or spend some time killing them ;) Thanks for the heads-up TT! The page looks the same in Safari as in Firefox ie (phew!). So what's up with Opera? On Feb 21, 1:54 am, timothytoe [EMAIL PROTECTED] wrote: Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/- Hide quoted text - - Show quoted text -
[jQuery] Re: is there a secret to jQuery with Opera?
I really appreciate that, Ariel - but am having no end of trouble getting .error to work with this! For now, I'm using my clumsy 'if' clause, but will persist with jQuery .error() until I'm winning ;) From my Google searches, it seems I'm not the only one with an image- detection problem in Opera. I've simply made the function unavailable to Opera. Thank goodness it's not all that popular! Cherry On Feb 21, 11:41 am, Ariel Flesler [EMAIL PROTECTED] wrote: What timothyjoe said is right, why don't you join the jpg-# ? The hash (#...) you add to the url is to avoid caching ? if so, you should use a search (?...) instead. That code is for images-off detection right ? What about this: $('img /') .load(function(){ $('#noimages').attr(href, '/styles/gotimages.css'); }) .error(function(){ $('#noimages').attr(href, '/styles/imagefree.css'); }) .attr('href','/images/bgimage.jpg'); I hope it was indeed helpful. Cheers Ariel Flesler On Feb 21, 1:01 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Glad I'm not the only one :) My code - and it *is* a fudge - uses a pretend variable, written into a bit of hidden html. I doesn't work properly with a real variable (in Opera, neither!) and I'm still looking for an un-fudged solution. Here it is: jQuery.imagesOn = function(){ $('img src=' + '/images/bgimage.jpg' + '#' + Math.random() + '/' ).load(function() { $('#noimages').attr(href, '/styles/gotimages.css'); $('.imagecheck').html('On'); }); if ( $('.imagecheck').val() != 'On' ) { $('#noimages').attr(href, '/styles/imagefree.css'); } } So - well, any comment must be a helpful comment ;) Cheers, Cherry On Feb 21, 3:00 am, timothytoe [EMAIL PROTECTED] wrote: Yeah, the first Windows version didn't seem able to run for 5 minutes without crashing violently. I hated it. The JavaScript has gotten so fast in that browser that a nasty bit of statistics code I run takes 35 seconds on Firefox and 20 seconds in Safari, so I've really started to like Safari. :-) As for Opera, I'm having my own problems with it. It's the only browser my code isn't running on right now, and I haven't had time to figure out why. For me, it's not really Opera's fault. After all, IE causes me the most trouble by far, but I try it every couple days to make sure it's still working. Explain to me what you're doing. Doesn't Math.Random() give you a number from 0 to 1? Is that really your code? Do you really have a # in there? If so, why isn't it part of the previous string? On Feb 20, 6:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Aha! My good reason(s) were that an earlier beta repeatedly crashed my machine, and I'm fed up with Apple's creeping-startup-takeover strategy. But the current Safari version installed without a hitch; I guess I'll have to either live with the startups, or spend some time killing them ;) Thanks for the heads-up TT! The page looks the same in Safari as in Firefox ie (phew!). So what's up with Opera? On Feb 21, 1:54 am, timothytoe [EMAIL PROTECTED] wrote: Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/- Hide quoted text - - Show quoted text -
[jQuery] Re: is there a secret to jQuery with Opera?
I've simply made the function unavailable to Opera. Thank goodness it's not all that popular! ...and then you complain about accessibility... :-) Ariel Flesler On 21 feb, 17:10, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I really appreciate that, Ariel - but am having no end of trouble getting .error to work with this! For now, I'm using my clumsy 'if' clause, but will persist with jQuery .error() until I'm winning ;) From my Google searches, it seems I'm not the only one with an image- detection problem in Opera. I've simply made the function unavailable to Opera. Thank goodness it's not all that popular! Cherry On Feb 21, 11:41 am, Ariel Flesler [EMAIL PROTECTED] wrote: What timothyjoe said is right, why don't you join the jpg-# ? The hash (#...) you add to the url is to avoid caching ? if so, you should use a search (?...) instead. That code is for images-off detection right ? What about this: $('img /') .load(function(){ $('#noimages').attr(href, '/styles/gotimages.css'); }) .error(function(){ $('#noimages').attr(href, '/styles/imagefree.css'); }) .attr('href','/images/bgimage.jpg'); I hope it was indeed helpful. Cheers Ariel Flesler On Feb 21, 1:01 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Glad I'm not the only one :) My code - and it *is* a fudge - uses a pretend variable, written into a bit of hidden html. I doesn't work properly with a real variable (in Opera, neither!) and I'm still looking for an un-fudged solution. Here it is: jQuery.imagesOn = function(){ $('img src=' + '/images/bgimage.jpg' + '#' + Math.random() + '/' ).load(function() { $('#noimages').attr(href, '/styles/gotimages.css'); $('.imagecheck').html('On'); }); if ( $('.imagecheck').val() != 'On' ) { $('#noimages').attr(href, '/styles/imagefree.css'); } } So - well, any comment must be a helpful comment ;) Cheers, Cherry On Feb 21, 3:00 am, timothytoe [EMAIL PROTECTED] wrote: Yeah, the first Windows version didn't seem able to run for 5 minutes without crashing violently. I hated it. The JavaScript has gotten so fast in that browser that a nasty bit of statistics code I run takes 35 seconds on Firefox and 20 seconds in Safari, so I've really started to like Safari. :-) As for Opera, I'm having my own problems with it. It's the only browser my code isn't running on right now, and I haven't had time to figure out why. For me, it's not really Opera's fault. After all, IE causes me the most trouble by far, but I try it every couple days to make sure it's still working. Explain to me what you're doing. Doesn't Math.Random() give you a number from 0 to 1? Is that really your code? Do you really have a # in there? If so, why isn't it part of the previous string? On Feb 20, 6:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Aha! My good reason(s) were that an earlier beta repeatedly crashed my machine, and I'm fed up with Apple's creeping-startup-takeover strategy. But the current Safari version installed without a hitch; I guess I'll have to either live with the startups, or spend some time killing them ;) Thanks for the heads-up TT! The page looks the same in Safari as in Firefox ie (phew!). So what's up with Opera? On Feb 21, 1:54 am, timothytoe [EMAIL PROTECTED] wrote: Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/- Hide quoted text - - Show quoted text -- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Re: is there a secret to jQuery with Opera?
I deserve that! I have provided a PHP style switcher, though, so all that's lost is the unobtrusive stylesheet serving with Javascript.. Before I started playing with all this js, I hadn't realised how difficult it is to get everything working as it should do with all the browsers. Knowing less than nothing about how browsers actually work, I have no view on why this might be! Like other developers, I'm under increasing pressure to incorporate more 'action' - meaning, more Javascript Flash - and am starting to feel pretty annoyed that it seems impossible, without sacrificing useability. Which probably brings me back to where I was before, so I'll shut up now!! Cherry ;) On Feb 21, 7:23 pm, Ariel Flesler [EMAIL PROTECTED] wrote: I've simply made the function unavailable to Opera. Thank goodness it's not all that popular! ...and then you complain about accessibility... :-) Ariel Flesler
[jQuery] Re: is there a secret to jQuery with Opera?
I think numeric-only ids can cause troubles. Ariel Flesler On 20 feb, 20:45, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/
[jQuery] Re: is there a secret to jQuery with Opera?
Argh.. saw the # and thought id... ignore my last post. Ariel Flesler On 20 feb, 21:57, Ariel Flesler [EMAIL PROTECTED] wrote: I think numeric-only ids can cause troubles. Ariel Flesler On 20 feb, 20:45, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Re: is there a secret to jQuery with Opera?
Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/
[jQuery] Re: is there a secret to jQuery with Opera?
Aha! My good reason(s) were that an earlier beta repeatedly crashed my machine, and I'm fed up with Apple's creeping-startup-takeover strategy. But the current Safari version installed without a hitch; I guess I'll have to either live with the startups, or spend some time killing them ;) Thanks for the heads-up TT! The page looks the same in Safari as in Firefox ie (phew!). So what's up with Opera? On Feb 21, 1:54 am, timothytoe [EMAIL PROTECTED] wrote: Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/
[jQuery] Re: is there a secret to jQuery with Opera?
Oh que pena Ariel! Saw your name here thought Yippee! Well, yippee anyway :)) Not a numeric ID, however. I did that the first time I blended PHP with Javascript ... fabulous project; took me ages to realise what had gone wrong ;) I really can't understand what Opera's doing. I've tried moving the CSS jQuery links around. If anything, it seems to be loading *all* the stylesheets at once! Does Opera think for itself?? I'd post a link, but the page is such a mess it wouldn't help. On Feb 21, 12:59 am, Ariel Flesler [EMAIL PROTECTED] wrote: Argh.. saw the # and thought id... ignore my last post. Ariel Flesler On 20 feb, 21:57, Ariel Flesler [EMAIL PROTECTED] wrote: I think numeric-only ids can cause troubles. Ariel Flesler On 20 feb, 20:45, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Re: is there a secret to jQuery with Opera?
Yeah, the first Windows version didn't seem able to run for 5 minutes without crashing violently. I hated it. The JavaScript has gotten so fast in that browser that a nasty bit of statistics code I run takes 35 seconds on Firefox and 20 seconds in Safari, so I've really started to like Safari. :-) As for Opera, I'm having my own problems with it. It's the only browser my code isn't running on right now, and I haven't had time to figure out why. For me, it's not really Opera's fault. After all, IE causes me the most trouble by far, but I try it every couple days to make sure it's still working. Explain to me what you're doing. Doesn't Math.Random() give you a number from 0 to 1? Is that really your code? Do you really have a # in there? If so, why isn't it part of the previous string? On Feb 20, 6:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Aha! My good reason(s) were that an earlier beta repeatedly crashed my machine, and I'm fed up with Apple's creeping-startup-takeover strategy. But the current Safari version installed without a hitch; I guess I'll have to either live with the startups, or spend some time killing them ;) Thanks for the heads-up TT! The page looks the same in Safari as in Firefox ie (phew!). So what's up with Opera? On Feb 21, 1:54 am, timothytoe [EMAIL PROTECTED] wrote: Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/
[jQuery] Re: is there a secret to jQuery with Opera?
Glad I'm not the only one :) My code - and it *is* a fudge - uses a pretend variable, written into a bit of hidden html. I doesn't work properly with a real variable (in Opera, neither!) and I'm still looking for an un-fudged solution. Here it is: jQuery.imagesOn = function(){ $('img src=' + '/images/bgimage.jpg' + '#' + Math.random() + '/ ' ).load(function() { $('#noimages').attr(href, '/styles/gotimages.css'); $('.imagecheck').html('On'); }); if ( $('.imagecheck').val() != 'On' ) { $('#noimages').attr(href, '/styles/imagefree.css'); } } So - well, any comment must be a helpful comment ;) Cheers, Cherry On Feb 21, 3:00 am, timothytoe [EMAIL PROTECTED] wrote: Yeah, the first Windows version didn't seem able to run for 5 minutes without crashing violently. I hated it. The JavaScript has gotten so fast in that browser that a nasty bit of statistics code I run takes 35 seconds on Firefox and 20 seconds in Safari, so I've really started to like Safari. :-) As for Opera, I'm having my own problems with it. It's the only browser my code isn't running on right now, and I haven't had time to figure out why. For me, it's not really Opera's fault. After all, IE causes me the most trouble by far, but I try it every couple days to make sure it's still working. Explain to me what you're doing. Doesn't Math.Random() give you a number from 0 to 1? Is that really your code? Do you really have a # in there? If so, why isn't it part of the previous string? On Feb 20, 6:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Aha! My good reason(s) were that an earlier beta repeatedly crashed my machine, and I'm fed up with Apple's creeping-startup-takeover strategy. But the current Safari version installed without a hitch; I guess I'll have to either live with the startups, or spend some time killing them ;) Thanks for the heads-up TT! The page looks the same in Safari as in Firefox ie (phew!). So what's up with Opera? On Feb 21, 1:54 am, timothytoe [EMAIL PROTECTED] wrote: Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/