Created
March 4, 2013 04:36
-
-
Save omurphy27/5079984 to your computer and use it in GitHub Desktop.
JQUERY - Target Two Elements Simultaneously with Click
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/questions/1313373/jquery-same-click-event-for-multiple-elements | |
$('.class1, .class2').click(some_function); | |
$('.class1').add('.class2').click(some_function); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment