Hi Friends, Today i will tell you about how to add fancy effects to input fields using jquery plugin. After using the plugin your input field looks very pretty and your user feel good to type in your input fields. It is very easy and simple to add it in your website.
Benefits of using effects in the input fields:
See the Live Demo and download the code below:
For More information about Website Design you can click below:
Pure CSS Button With Lightening Glowing and Shining Effect
Create Expand Collapse Sliding Menu Using jQuery
Background Color Change Automatically Using Jquery
How to add smart slider Facebook Like Box Pop-up
Learn Ajax For Beginners In Hindi
33 New Awesome Features in CSS3 and CSS4
Simple Show Hide Accordion Code Using Jquery
Add Diwali Fireworks Using Jquery In Your Website
Add CKEditor in Html Form using Jquery
Jquery Me Simple Slider Kaise Bnate Hai
Learn JQUERY Code Step By Step For Beginners
You have to follow some steps to add effect to your input fields(text, textarea etc). These Steps are.
Step1: Download the code from below.
Step2: After that open your webpage in any code editor.
Step3: Add below code in your web page.
Stylesheet Code:
<link rel="stylesheet" href="css/fancyInput.css"> <link rel="stylesheet" href="css/styles.css"> |
<link rel="stylesheet" href="css/fancyInput.css"> <link rel="stylesheet" href="css/styles.css">
You can change the css code according to your requirement.
HTML Body Code:
<h1 style="margin: 20px;">Fancy Effects To Input Fields Using Jquery Plugin</h1> <div style="background: #44B3C2; text-align: center;"> <div style="margin: 10px 0px;"><input class="fancy_effect1" type="text" placeholder="Your Input Effect 1" /></div> <div style="margin: 10px 0px;"><input class="fancy_effect2" type="text" placeholder="Your Input Effect 2" /></div> <div style="margin: 10px 0px;"><input class="fancy_effect3" type="text" placeholder="Your Input Effect 3" /></div> <div style="margin: 10px 0px;"><input class="fancy_effect4" type="text" placeholder="Your Input Effect 4" /></div> <div style="margin: 10px 0px;"><input class="fancy_effect5" type="text" placeholder="Your Input Effect 5" /></div> </div> |
<h1 style="margin: 20px;">Fancy Effects To Input Fields Using Jquery Plugin</h1> <div style="background: #44B3C2; text-align: center;"> <div style="margin: 10px 0px;"><input class="fancy_effect1" type="text" placeholder="Your Input Effect 1" /></div> <div style="margin: 10px 0px;"><input class="fancy_effect2" type="text" placeholder="Your Input Effect 2" /></div> <div style="margin: 10px 0px;"><input class="fancy_effect3" type="text" placeholder="Your Input Effect 3" /></div> <div style="margin: 10px 0px;"><input class="fancy_effect4" type="text" placeholder="Your Input Effect 4" /></div> <div style="margin: 10px 0px;"><input class="fancy_effect5" type="text" placeholder="Your Input Effect 5" /></div> </div>
The above code create the text boxes. Please don’t forget to add the class of fancy effects. You can add the class (fancy_effect) according to the effects.
Jquery Code:
<script src="js/jquery-1.9.1.min.js"></script><script src="js/fancyInput.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".fancy_effect1").fancyInput()[0]; $(".fancy_effect2").fancyInput()[1]; $(".fancy_effect3").fancyInput()[2]; $(".fancy_effect4").fancyInput()[3]; $(".fancy_effect5").fancyInput()[4]; }); // ]]></script> |
<script src="js/jquery-1.9.1.min.js"></script><script src="js/fancyInput.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".fancy_effect1").fancyInput()[0]; $(".fancy_effect2").fancyInput()[1]; $(".fancy_effect3").fancyInput()[2]; $(".fancy_effect4").fancyInput()[3]; $(".fancy_effect5").fancyInput()[4]; }); // ]]></script>
You can apply any effect out of 5 effects using the function fancyInput()[0-4];.
Step4: After saving all the code see the magic in your browser.
For any problem you see the live demo and download the code from below.
Important Note: This effects doesn’t work on internet explorer
Read About Other Interesting Things below.
If You like my blog, kindly Subscribe it.
Categories: Website Design
Leave a Reply