Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Select Cuts Off Options In IE (Jerking solution)

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27758
    mevaser
    Participant

    Hello every one. I adquired a code that Chris did on a website I am working to fix the <select> section on a form that has a fixed width. The code is this:

    Code:
    $(document).ready(function(){
    $(“select”)
    .click(function(){
    $(this)
    .data(“origWidth”, $(this).css(“width”))
    .css(“width”, “auto”);
    })
    .change(function(){
    $(this).css(“width”, $(this).data(“origWidth”));
    });
    });

    The website’s address is: http://decormouldings.org/shop/aur601p8/

    The problem is that some choises are too long, but the width of the box is fixed, so it was getting chopped off. So Now I got this script that does the work, and allows to show the rest of the <select>. The problem is that is Jerking. Every time I click it, it jerks back. Also, how do I get it back to its original width?

    Karl,
    http://www.mevaser.com/

    #70145
    mevaser
    Participant

    Never mind. I fix the Jerking, I did this:

    Code:
    $(document).ready(function(){
    $(“select”)

    .hover(function(){
    $(this)
    .data(“origWidth”, $(this).css(“width”))
    .css(“width”, “auto”);
    })

    .change(function(){
    $(this).css(“width”, $(this).data(“origWidth”));

    });

    });

    What I love to see is that the dropdown menu would come back to its width. Right now stays the width that the bar has set because of the length of text. Any one?

    Thanks,

    Karl,
    http://www.mevaser.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.