Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Please, help - IE problem: jQuery, each(), attributes

    IE (6,7) breaks all javascript if see this code:

    Code:
    $(".something").each( function() {
     var x= $(this).attr('ImgHeight') - 100;
     $(this).height(x);
    });
    But this works:

    Code:
    $(".something").each( function() {
     var x= $(this).attr('ImgHeight');
     $(this).height(x);
    });
    And this works:

    Code:
    $(".something").each( function() {
     var x= $(this).attr('ImgHeight') -100;
     $(this).after(x);
    });
    html:
    Code:
    <span class="something" ImgHeight="280">...</span>
    (sorry, i can't change title)
    Last edited by alexeizuzin; 05-08-2009 at 05:02 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •