<div class="chatbox-window">
<div class="chatbox-title">
<div class="chatbox-username"></div><div class="chatbox-close"><span class="chatbox-close-button"></span></div>
</div>
<div class="chatbox-content"><div class="chatbox-msg"></div></div>
<div id="chatbox-posting"></div>
</div>
$(".chatbox-close-button").click(function(){
$(this).parent(".chatbox-close").parent(".chatbox-title").parent(".chatbox-window").remove();
});
Below, i use:
$(this).parent(".chatbox-close").parent(".chatbox-title").parent(".chatbox-window") to get the ".chatbox-window"
But:
Are there shorter ways to get the .chatbox-window
Ps. In case of not changing the HTML
code.