homepage Welcome to WebmasterWorld Guest from 54.235.36.164
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

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




msg:4027511
 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




msg:4038990
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved