Cool! Use jQuery & amp; Canvas to create the camera shutter effect. Use jquery

Source: Internet
Author: User

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 );
});

Related Article

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.