homepage Welcome to WebmasterWorld Guest from 54.237.151.188
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
JQuery expanding the size of drop down list
JQuery expanding the size of drop down list
abidshahzad4u

5+ Year Member



 
Msg#: 4027509 posted 7:05 pm on Nov 18, 2009 (gmt 0)

Hi to all

IE all versions are not displaying the drop down list correctly. The hide the text exceeding the select width. I have try to solve the problem with JQuery. The JQuery helped me lot but there is still an Issue. When the option text is greater than the select width, it expand. Great job. But when the all texts are less than the select width, select box is contracted to them. I want to stop the contraction. As I have to use this in multiple pages dynamically. code is as

$(document).ready(function(){
$("#dropdown").mousedown(function(){
if($.browser.msie) {
$(this).width("css","auto");
}
});
$("#dropdown").change(function(){
if ($.browser.msie) {
$(this).css("width","175px");

}
});
$("#dropdown").blur(function(){
if ($.browser.msie) {
$(this).css("width","175px");
}
});

 

whoisgregg

WebmasterWorld Senior Member whoisgregg us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4027509 posted 8:22 pm on Dec 7, 2009 (gmt 0)

Trying to override the browsers' default behaviors with standard forum UI controls can be pretty maddening. Especially if you need to do so for multiple browsers.

Perhaps one of the IE min-width hacks out there could help sort this out?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved