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 -

Reply via email to