Last active
November 10, 2015 22:01
-
-
Save accidentaldeveloper/4e914940ac2f8b5f4537 to your computer and use it in GitHub Desktop.
Display number of sessions selected
This file contains 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
(function () { | |
var $regularSessionsPane = $("#regularsessions"); | |
$regularSessionsPane.prepend('<div>Sessions Selected: <span id="myCount"><\span><\div>') | |
var $checkboxes = $regularSessionsPane.find("input[type='checkbox']"); | |
var $countDisplay = $("#myCount"); | |
$checkboxes.change(function() { | |
var count = $checkboxes.filter(":checked").length; | |
$countDisplay.text(count); | |
}); | |
$checkboxes.change(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment