Created
August 19, 2014 07:46
-
-
Save ABooooo/7a027cfe8d30f6b04132 to your computer and use it in GitHub Desktop.
Search for a word then do something
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
var item = $('.stanje'); | |
for (var i = 0; i <= item.length; i++) { | |
if ($(item[i]).text() == 'prodano') { | |
$(item[i]).addClass('bg-danger'); | |
} else if ($(item[i]).text() == 'rezervirano') { | |
$(item[i]).addClass('bg-warning'); | |
} else if ($(item[i]).text() == 'prosto') { | |
$(item[i]).addClass('bg-success'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment