I'm making a Facebook-like chat. I want to implement the function that shows/hides the chat when you click the chatbar but not when you click on .chat_txt or .chat_new_input. Do you know any tricks?
//JavaScript Show/Hide Function
$('.hidden_box').live("click", function(){ showChat(this); });
$('.active_box').live("click", function(){ hideChat(this); });
$('.chat_txt').click(function(event) {
event.preventDefault();
});
Here is the syntax for the DIV:
<div id="chat_system_msg_lp" class="chat_box clickable_box hidden_box">
<div id="chat_system_msg_nick" class="chat_name">system_msg</div>
<ul id="chat_system_msg_txt" class="chat_txt">
<li id="46">Hi visitor. We suggest you to sign in/sign up in order to have all the benefits from Live-Pin </li>
</ul>
<form class="chat_new_message" name="new_msg">
<input type="text" placeholder="Enter your message..." class="chat_new_input">
</form>
</div>
You can see the live demo in http://live-pin.com.