The Toggleclass equivalent program segment in jquery and the direction of future learning _jquery

Source: Internet
Author: User
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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.