Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form>
- <input type="text" name="email" />
- </form>
- <a href="#" id="link">Sample Link</a>
- $(document).ready(function () {
- $('#link').hover(function (){
- $('form input[name=email]').removeClass(':focus');
- }, function (){
- $('form input[name=email]').addClass(':focus');
- });
- });
- form input[name=email]:focus {
- background-color: yellow;
- }
- $(document).ready(function () {
- $('#link').hover(function (){
- $('form input[name=email]').blur();
- }, function (){
- $('form input[name=email]').focus();
- });
- });
- $(document).ready(function () {
- $('#link').hover(function (){
- $("input").blur();
- }, function (){
- //mouse leave
- });
- });
- $(document).ready(function () {
- $('#link').hover(function (){
- $('form input[name=email]').blur();
- $('form input[name=email]').css("background-color","");
- }, function (){
- $('form input[name=email]').focus();
- $('form input[name=email]').css("background-color"," yellow");
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement