Click the text to prevent the text from being selected:
* {
-moz-user-select:-moz-none;
-moz-user-select:none;
-o-user-select:none;
-khtml-user-select:none;
-webkit-user-select:none;
-ms-user-select:none;
User-select:none;
}
Future elements: Live
You can attach an event to an element that has not yet been created.
Writing format: $ (". Div"). Live ("Click", Function () {})
Color Gradient
Refer to jquery packaged jquery.color.js to the desired page
Index () method
Returns the index position of the specified element relative to the other specified element.
These elements can be specified by JQuery selectors or DOM elements.
Custom Animation Additions:
Animate ({left: "value", Top: "Value"}, Execution time, function () {callback
function//callback function Optional})//rotation cannot do
Stop animation to prevent animation from accumulating:. Stop ()
Mouse move into small hands:
Cursor:pointer;
Word Wrapping:
Word-wrap:break-word;
Bubble Window Mask
Some knowledge points of pop-up window making
Get browser height: var llbo = window.innerheight;
Get page height: var bo = $ ("Body"). Outerheight ();
Line break: Word-wrap:break-word
Text self-adapting
The first type of notation:
<style type= "Text/css" > * {margin:0px; padding:0px; } #box {position:relative; width:300px; Height:auto; Word-wrap:break-word; } </style><script type= "Text/javascript" >$ (document). Ready (function () {var p = $ ("#box"). HTML ( ); $ ("#box"). HTML (p.substring (0, 48)); $ ("#box"). HTML ($ ("#box"). HTML () + "...") $ ("#box"). Toggle (function () {$ ("#box"). HTML (P); }, Function () {$ ("#box"). HTML (p.substring (0, 48)); $ ("#box"). HTML ($ ("#box"). HTML () + "...")}); </script> <div id= "box" > 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 </div>
Second type
<style type= "Text/css" > * {margin:0px; padding:0px; } #box {position:relative; width:300px; Height:auto; Word-wrap:break-word; White-space:nowrap; Text-overflow:ellipsis; Overflow:hidden; Cursor:pointer; } </style> <script type= "Text/javascript" > $ (Function () {$ (' #box '). Toggle (Function ( {$ (this). CSS (' white-space ', ' normal ', ' text-overflow ', ' initial ', ' backgroundcolor ', ' yellow '); }, Function () {$ (this). CSS (' white-space ', ' nowrap ', ' text-overflow ', ' ellipsis ', ' backgroundcolor ', ' White '); }); }); </script> Third (simple notation)
Fragmented knowledge points and common effects