Book Image

Mastering jQuery

By : Alex Libby
Book Image

Mastering jQuery

By: Alex Libby

Overview of this book

<p>Mastering jQuery has been written not only to help maximize your skills with core functionality in the library, but also to explore some of the more intriguing ways of using the library to achieve real-world solutions that could feature on any website or online environment.</p> <p>You'll start with a look at some of the more advanced ways to incorporate the library into your pages, followed by working with forms and advanced form validation using regular expressions. Next you'll move on to animating in jQuery, advanced event handling, and using jQuery effects.</p> <p>Finally, you will develop practical examples of using jQuery with external functionality such as node-webkit, before finishing with a session on optimizing your version of the library for maximum efficiency and exploring best practices for using QUnit.</p>
Table of Contents (21 chapters)
Mastering jQuery
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Blending images using CSS3


There may be instances where we prefer not to manipulate the image directly, but alter a background image instead. Similar effects are easy to achieve in static images within PhotoShop, but are less common on the Internet.

Thankfully, we can achieve the same effect using the background-blend mode within CSS – this has the effect of allowing us to merge two images together. Using background-blend mode (for which browser support is good within desktop browsers) removes the need to manually edit each photo, so if any are changed, the same effect can easily be applied to their replacements.

In the same vein as those filters we've already examined, we would apply the filters within CSS. We can then switch them on or off using jQuery at will. I won't revisit the jQuery code that would be required, as we've already seen it earlier in the chapter; suffice to say that we would apply the background-blend mode, using an example such as the following:

  <style>
    .blend...