The following two segments of jquery are equivalent
1 using Toggleclass to achieve class value alternating
Copy Code code as follows:
$ ("#in1"). Click (function () {
$ ("Li"). Toggleclass ("Ok2");
})
2 The use of JS to determine the implementation of class value alternating
Copy Code code as follows:
$ ("#in1"). Click (function () {
var ok=$ ("Li:first"). attr ("class")
if (ok = = "Ok2") {
$ ("Li"). Removeclass ();
}else{
$ ("Li"). attr ("Class", "Ok2");
}
})
Yesterday began to learn JQUERY,JS is my front-end design technology of a piece of heart, has not found a good way to learn. Recently suddenly enlightened, can learn jquery ah, this thing is more studious. So the plan is to take a short period of time to get jquery, and then advanced JS, through the understanding of JS to C #, tools to gradually break away from Adobe Dreamweaver, to the expression of MS and visual Studio. VS jquery support is good, after learning C # to ponder Blend, since decided to take refuge in Microsoft, we must learn to use MS Software to replace Adobe.
The learning content to be arranged
1 jquery combined JavaScript
2 Expression (Web,design,blend) combined with Visual Studio and C #
3 Review High School Mathematics (set, sequence, function, trigonometric, analytic geometry, two-term theorem, simple statistical derivative)
4 Advanced Mathematics
5 Discrete Mathematics
6 linear algebra
7 Data structure and algorithm
8 Chinese language and literature