fade.on('click',function(){ close() }) closeButton.on('click',function(){ close() })
$(fade,closeButton).on('click', close)
this.fade = $('#fade') this.closeButton = $('<div class="close" />')
<!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <!-- <link rel="stylesheet" type="text/css" href="tmp.css" /> --> <style type="text/css"> </style> <script type="text/javascript"> $(document).ready(function (){ $('div, p').css('color','red'); }); </script> </head> <body> <div>div</div> <p>p</p> </body> </html>