HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

max-width CSS style vs jquery

This discussion is related to the MaxImageSize addon.
edited August 2010 in Vanilla 2.0 - 2.8
What's the benefit of using jquery to restrict images sizes over the max-width CSS style?

Comments

  • max-width is not supported in all browsers, especially in older IE versions.
  • @nevir
    jquery also allows me to make the image clickable, so that visitor can see the image in its original size
  • Does this addon contain something like a lightbox functionality?
  • @nevir
    jquery also allows me to make the image clickable, so that visitor can see the image in its original size
    Aha, that's reason enough for me
  • @binhdo
    no, I might implement that in next versions if there is need for such
    I personally prefer opening images in new window
  • @viziona: I think a lightbox effect would be awesome.

    Though, I can't seem to get this plugin to work. I can set the width in the Dashboard, but my images blow out the column still. When I do the same thing with css, it works fine.

    I'm using Lighttpd *without* Friendly URLs. I don't know why this would be using Ajax, but I know that I've had probems with almost every single plugin because I don't use friendly urls.
  • @Lykaon can you provide URL with plugin enabled, so that I can investigate and fix if needed
  • @viziona: You can see an example of it not working at this url.

    I've temporarily disabled the CSS fix for the same thing.
  • @Lykaon, is seems that it works ;)
    (clear you browser cache)
  • edited September 2010
    @viziona: Not so fast. So if I go to the post (in Chrome), they are nice and sized into the box, right? Now when I refresh, they blow back out.

    And in IE8, they're never in the box. They're always blown out.

    Ok. It seems to work in IE8. It just doesn't resize them until after the page is fully rendered (and IE8 is slow to render).

    As for Chrome, I don't know why a refresh blows them out. When you visit the thread initially they're fine; it's only refreshing the page that you're already on.
  • thanks for input, I will test it later
  • @viziona: No problem. Thanks for the help. Last night when I tried it, it didn't seem to work at all but looks like that was probably on my end.

    My quibbles are mostly minor. It's just disconcerting to see the big images resize themselves during render (opposed to just showing up that way). The css method seems to be more reliable in that manner, but I'm really stoked about the future potential of being able to open up the images in lightboxes.
Sign In or Register to comment.