Recently, when I changed a page embedded in the frame, jquery was used for the effect, and the page itself was bound with the onload event. After the change, the test in Firefox is normal and smooth. in IE, it takes more than a dozen seconds for
Generally, the onload of the Body Tag is set to listen to the load event of the window. however, the load event is triggered only after all the elements on the page are loaded. If there are too many pages or the picture is too large, it will lead to
$ ("P"). addclass (style type defined in CSS); add a style to an element$ ("IMG"). ATTR ({SRC: "test.jpg", alt: "Test image"}); add attributes/values to an element. The parameter is map.$ ("IMG"). ATTR ("src", "test.jpg"); add attributes/values to
Problem Encountered
After a hard job as a website, I got a little better off. I decided to put on the advertisement and chose GG, Baidu, and Baidu)
So I continued to work hard... However, we all know that advertising alliances reflect the lowest
$ ("P"). addclass (style type defined in CSS); add a style to an element$ ("IMG"). ATTR ({SRC: ”test.jpg ", alt:" test image "}); add attributes/values to an element. The parameter is map.((“Img”).attr("“src”, ”test.jpg "); add attributes/values to
Iv. JavaScript processing
$. Browser () determines the browser type and returns the boolen Value
$ (Function (){
If ($. browser. MSIE ){
Alert ("this is an Internet Explorer ");}
Else if ($. browser. Opera ){
Alert ("This Is An operabrowser ");}
})
Preface
During project development, I found that there was no mask plug-in that could be used better. It seems that it is not difficult to use the free time. I 'd like to take another look at jquery,
The required functions are as follows:
1. Full
1. OverviewJquery is a very good JS library. Compared with many JS class libraries such as prototype, Yui, and mootools, it is a powerful tool, starting from the practical point of view of web development, aside from some other useless items in Lib,
Because ie6.0 and higher version IE have different processing methods for div extension, it is often time-consuming. During use, I found it very convenient to use jquery.
. Right {Background-color: # fafafa;Border: 1px solid #58c4f1;Margin-top: 3px;
A very practical QQ online customer serviceCodeClick the QQ icon to directly contact customer service. The specific implementation code is as follows:
HTML page:
jquery implements QQ customer service
CSS style:
/*
Domcontentloaded The domcontentloaded event is fired when the document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading (the load event can be used to detect a fully-loaded page ).
How to add a mask layer in a browser window
Background In web, page pop-up window is a common interactive method, which can avoid unnecessary page jumps and improve the layout and interactivity of the interface.However, the browser's native pop-up
Generally, we need to center an element in the middle, and we will do this:
# Element {margin: 0 auto ;}
What if I want to fix this element? Generally, position: fixed is added as follows:
# Element {position: fixed; margin: 0 auto ;}
Solution (from here ):
4954 rows found in the jQuery-1.4.2.js,Return new window. XMLHttpRequest ();ChangeCopy codeThe Code is as follows: if (! $. Browser. msie ){Return new window. XMLHttpRequest ();} Else {Return new window. ActiveXObject
First of all thanks to the jQuery. Select. js author Zhang Jingwei, jQuery. Select. js Project address: http://www.zhangjingwei.com/archives/jquery-select%E5%8D%95%E9%80%89-%E6%A8%A1%E6%8B%9F%E6%8F%92%E4%BB%B6-v1-3-6/The project needs to use the
The operations on events are nothing more than addEvent, fireEvent, and removeEvent. Generally, lib extends the functions provided by the browser to solve problems such as compatibility Memory leakage. The third problem is how to get the domReady
Today, I want to scroll down and zoom out the image. It seems very simple. I searched the internet and found the onmousewheel example. All of them only support the IE browser, the result shows that Firefox has the corresponding DOMMouseScroll to
In fact, it is not difficult to implement it. First, let's look at the implementation process. First, if the navigation is within the display range, no modification is required. When the navigation is out of the display range, that is, when the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.