Cool! Use jQuery & Canvas to create the camera shutter effect, and use jquery
In today's tutorial, we will useHTML5Canvas Element to create a simple photography portfolio, which shows a set of featured photos with the camera shutter effect. This function uses a simpleJQueryPlug-ins, you can easily integrate to any website.
Download the demo plug-in
Articles you may be interested in
- 10 useful results in Web development [Source Code download]
- Excellent jQuery Ajax paging plug-ins and tutorials carefully selected
- 12 amazing creative 404 error page Designs
- Let the website get started! 12 excellent jQuery animation plug-ins
- Amazing 8 HTML5 & JavaScript Special Effects
Link to this article: Use jQuery & Canvas to create the camera shutter Effect
Source: Dream sky ◆ focus on front-end development technology ◆ share web design resources
How to Use jquery?
$ ('# Element'); // equivalent to document. getElementById ("element ")
$ ('. Element'); // Class
$ ('P'); // html tag
$ ("Form> input"); // sub-Object
$ ("Div, span, p. myClass"); // select multiple objects at the same time
$ ("Tr: odd" ).css ("background-color", "# bbbbff"); // the background of the table
$ (": Input"); // form object
$ ("Input [name = 'newsletter ']"); // a specific form object
2. The application of object functions is simple and unlimited:
Element. function (par );
$ ("P. surprise"). addClass ("ohmy"). show ("slow ")...
3. Operations on selected objects (including styles ):
$ ("# Element"). addClass ("selected"); // Add a style to the object
(('{Element'}.css ({"background-color": "yellow", "font-weight": "bolder"}); // change the object style
$ ("P"). text ("Some new text."); // change the object text
$ ("Img"). attr ({src: "test.jpg", alt: "Test Image"}); // modify the object text
$ ("P"). add ("span"); // add a label to the object
$ ("P"). find ("span"); // find the corresponding elements in the object
$ ("P"). parent (); // parent element of the object
$ ("P"). append ("<B> Hello </B>"); // add content to the object
4. Support for aJax and file formats: xml/html/script/json/jsonp
$ ("# Feeds"). load ("feeds.html"); // imports static page content in the corresponding region
$ ("# Feeds "). load ("feeds. php ", {limit: 25}, function () {alert (" The last 25 entries in the feed have been loaded ") ;}); // import Dynamic Content
4. event support:
$ (& Quot ...... remaining full text>
How to Use jquery?
Var my_focus = function (){
$ (This). unbind ("focus"). unbind ("blur ");
Var no = $ ("<input type = 'Password' id = 'txtpwd' value =''> ");
$ (This). replaceWith (no );
No. get (0). focus ();
No. bind ("blur", my_blur). bind ("focus", my_focus );
};
Var my_blur = function (){
$ (This). unbind ("focus"). unbind ("blur ");
Var no = $ ("<input type = 'text' id = 'txtpwd' value = 'Enter the password'> ");
$ (This). replaceWith (no );
No. bind ("blur", my_blur). bind ("focus", my_focus );
};
$ (Document). ready (function (){
$ ("# TxtPwd"). focus (my_focus );
$ ("# TxtPwd"). blur (my_blur );
});