Last active
May 26, 2016 19:28
-
-
Save aleksandar-b/ab7d53e15135c72f992093adf27b711d to your computer and use it in GitHub Desktop.
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
// /*jslint browser: true*/ | |
// /*global $, jQuery, alert*/ | |
// /*jshint strict: true */ | |
// /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ | |
// | |
var counter = 0; | |
$(document).ready(function () { | |
$('.clickable').on('click',function(){ | |
if(counter%2 === 0){ | |
$(this) | |
.find(".glyphicon-plus") | |
.removeClass("glyphicon-plus") | |
.addClass("glyphicon-minus"); | |
}else{ | |
$(this) | |
.find(".glyphicon-minus") | |
.removeClass("glyphicon-minus") | |
.addClass("glyphicon-plus"); | |
} | |
counter++; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment