Jquery and CSS


0  0 2016-08-10 07:35:46


jQuery is a predefined JavaScript library  jQuery is used to change dynamically add and remove style classes and entire cascading style sheets (CSS). Styles is a main part in the look  of any website, and jQuery can help us change them dynamically.

Css Function :-
We change your website styles dynamically with jQuerys css() function. Either change styles which are declared inline or in CSS external files (such as font-style, font-size, font-family,  color, background-color, etc.) or add new styles for elements to existing css file.

AddClass function and ToggleClass function :-
In addition to the css function, we apply currently defined CSS classes using addClass() function. And the removeClass() function reverses the action.
The toggleClass() function is a huge time-saver for toggling a state on and off with CSS. (which applies the CSS class img-hover to the image) and mouse leave (which removes it).

jQuery Animations And Effects
You can use jQuery to create animations and effects with minimal effort.

Animate function :-
The animate() function can be used to animate the movement of elements on a Web page. we may define the settings parameter with a set duration (in milliseconds) or any of the words slow, normal or fast. The callback, which is the function that runs after the animation has finished, is optional.

Animate function is asynchronous, so we can run multiple animations at the same time. we can also use stop() function to stop the animation which is running now.

Many pure JavaScript functions are used frequently in animations, such as setInterval(), clearInterval(), setTimeout() and clearTimeout(). Once again, these functions are included in the list because understanding what they can do is important to supporting the jQuery’s animation functions.

setInterval function and clearInterval function
We can automatically run a task based on time using the JavaScript setInterval function, which used to specify a regular time-based trigger.
setTimeout function and clearTimeout function
we can also delay a task based on time using the JavaScript setTimeout function, which can be set to wait for a specified length of time before running the code.
All the above predefined jQuery function are used to create animation. jQuery support very great to create a best website with the less efforts.

Comments (0)

Post Your Comments


Hong Kong Office

Find Us On

Website Development Company
Digital Marketing
website development company in Hong Kong
website designer in pune