就是点击个个颜色,然后使得页面的背景颜色变成同样的颜色
4.上图中的效果使用简单的代码就可以完成了,而且在IE,FF中的效果是同样的,这里就只贴出jquery中的代码了,非常的简单的

Home >Web Front-end >JS Tutorial >A detailed discussion on the differences between jquery in IE and FF browsers_jquery

A detailed discussion on the differences between jquery in IE and FF browsers_jquery

WBOY
WBOYOriginal
2016-05-16 17:35:051358browse

1. Today I suddenly thought about the benefits of jquery that I haven’t used yet, so I practiced it a bit. Who knows, I encountered the problem of the difference between jquery in IE and FF browsers. Okay, without further ado, I will come across it. The question is
2. Most people who have used jquery know that the browsing effect on FF is just good, but the effect of these new effects on IE is not satisfactory.
3. An effect of today’s practice is like this
A detailed discussion on the differences between jquery in IE and FF browsers_jquery
Is to click on each color, and then make the background color of the page change to the same color
4. Use the effect in the picture above It can be completed with simple code, and the effect is the same in IE and FF. Here I only post the code in jqueススy, it is very simple

Copy the code The code is as follows:



The following is the code in HTML
Copy the code The code is as follows:



  


 


 

 


 


 


 

Restore

The css style below will not be posted. I believe everyone knows it.
Let me talk about another different code, which made me understand the relationship between IE and FF. Use of jqueスス・

A detailed discussion on the differences between jquery in IE and FF browsers_jquery1.
Seeing the difference between this picture and the picture above, I believe you can easily find it out. Yes, the four corners of this small icon are all curved. In order to complete this curve, I used a js , this js is this "jquery.curvycorners.source.js" through the method

Copy the code The code is as follows:
$(document).ready(function(){
settings = {
tl: { radius: 10 },
tr: { radius: 10 },
bl: { radius : 10 },
br: { radius: 10 },
antiAlias: true,
autoPad: true,
validTags: ["span"]
}
$('. myBox').corner(settings);
$('.myBox1').corner(settings);
$('.myBox2').corner(settings);
$('.myBox3' ).corner(settings);
$('.myBox4').corner(settings);
$('.myBox5').corner(settings);
$('.myBox6'). corner(settings);
$('.myBox7').corner(settings);
});

This method is used to make the four corners of the above image into radians. Yes, but a problem arises
With this method, the effect of this js running in FF is very complete, but it has no effect when it appears on IE
I haven’t noticed it before, but after testing it today, I have a small opinion. Is the compatibility of IE not very good for some customized js? I have done a project before, and also customized a js, and then embedded it into the page through Script. The effect is very good in FF, but in There was no effect on IE, and I didn't care about it at the time. Through today's practice, I found out, "Is the compatibility of IE not very good for some customized js?" Is this true? Should we customize js as little as possible in the future? But if we don’t customize js, there will be a lot of code in the page? A little confused ING...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn