0

Here is my HTML Code:

 <input type="text" class="organizationSearch" id="organizationSearch" name="NAME">
 <table>
 <tr class="organName" style="display:none;"><td width="124px"><b><span>Organization Name</span>:</b></td><td id="organName"></td></tr>

$("#organizationSearch").live('mouseout mouseleave keyup change click',function(){  
    var organSearch=$(this).val();  
    $('#organName').text(organSearch);  
});
2
  • is #organName an <input> element? Post your HTML structure as well please. Commented May 25, 2013 at 9:38
  • 1
    Why binding mouseout & mouseleave? mouseout should be enough. On modern browsers, using oninput event would be better (paste would be included too) Commented May 25, 2013 at 9:43

2 Answers 2

1

First thing don't use live,it is deprecated and try like

$("#organizationSearch").on('focus',function(){  
Sign up to request clarification or add additional context in comments.

Comments

0

Use .on instead of .live like this.

$(document).on('mouseout mouseleave keyup change click','#organizationSearch',function(){  
  var organSearch=$(this).val();  
  $('#organName').text(organSearch);  
});

2 Comments

Why are you tracking 5 different events on document? Don't do this.
Its based on question. please check question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.