This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Always set focus after unhiding an element. IE freaks out over this; | |
Focus isn't bulet-broof. Try: | |
1- Setting the value to an element before and/or after giving it focus; | |
2- $("input[name='titleInputField']").focus(); | |
3- Blur then focus an element; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
max-width:1280px; /* Max-width does not work in IE6 and below. */ | |
min-width:800px; /* Min-width does not work in IE6 and below. */ | |
_width:1000px; /* Static width for IE6 & below */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The idea is to remove the div from it's normal flow, make it invisible (now the div does not affect the page), and make it displayed as a block so 'it has layout'. After, get the height, and then undo it's attributes to whatever your initial attributes where and display the div as hidden. | |
*/ | |
$('#hidden_div').css({'position':'absolute', 'visibility':'hidden', 'display':'block'}); | |
var divHeight = $('#hidden_div').outerHeight(true); // outerHeight includes the paddings and borders. setting the optional value to true, includes the div's margins as well. | |
$('#hidden_div').css({'position':'static', 'visibility':'visible', 'display':'none'}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
background-color:#eee; /* no-gradient browser fallback */ | |
background-image:url('../../../imgs/downArrow.png'); /* no-gradient browser fallback */ | |
background-image:url('../../../imgs/downArrow.png'), -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#ddd)); /* Saf4+, Chrome */ | |
background-image:url('../../../imgs/downArrow.png'), -webkit-linear-gradient(top, #f5f5f5, #ddd); /* Chrome 10+, Saf5.1+ */ | |
background-image:url('../../../imgs/downArrow.png'), -moz-linear-gradient(top, #f5f5f5, #ddd); /* FF3.6+ */ | |
background-image:url('../../../imgs/downArrow.png'), -ms-linear-gradient(top, #f5f5f5, #ddd); /* IE10 */ | |
background-image:url('../../../imgs/downArrow.png'), -o-linear-gradient(top, #f5f5f5, #ddd); /* Opera 11.10+ */ | |
background-image:url('../../../imgs/downArrow.png'), -linear-gradient(top, #f5f5f5, #ddd); /* W3C */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resultRaw = "3,1a_2a_3a_4a-1b_2b_3b_4b-1c_2c_3c_4c"; | |
var charAtPos = resultRaw.indexOf(','); | |
var items = resultRaw.substring(0, charAtPos); | |
var resultVar = resultRaw.substr(charAtPos + 1); | |
var simpleArray = resultVar.split("-"); | |
// simpleArray[0] = 1a_2a_3a_4a; | |
// simpleArray[1] = 1b_2b_3b_4b; | |
// simpleArray[2] = 1c_2c_3c_4c; | |
// simpleArray[3] = 1d_2d_3d_4d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Emulate a mouse options change, when using the keyboard to change option: | |
<select onchange="alert('clicked');" onkeyup="this.blur(); this.focus();"> | |
... | |
//Get a HTML's Select element's selected item's value: | |
<select onchange="alert(this.options[this.selectedIndex].value);"> | |
... | |
// Get a HTML Select element's real length (using jQuery): | |
if($('#select_element')[0].options.length === 0) { alert('No items in select.'); } |