I am having code like this:
var input = $('input');
var select = $('select');
var text = $('textarea');
var name = $('#name');
var email = $('#email');
var phone = $('#phone');
var subject = $('#subject');
var message = $('#message');
var sum = $('#sum');
(input, select, text).focus(function(){
$(this).css('z-index', 100)
});
When input element is focus, it needs to change z-index to a 100, and non focused elements need to change their z-index to 1. How can I do this?
Use the
addmethod to concatentate jQuery objects, and thenotmethod to exclude one: