For some reason, this isn't launching
<script type="text/javascript">
$(function(){
if ($(h3).hasClass("6") ){
alert ('Todays Date Friday') }
});
</script>
For some reason, this isn't launching
<script type="text/javascript">
$(function(){
if ($(h3).hasClass("6") ){
alert ('Todays Date Friday') }
});
</script>
$(h3)
supposed to be
$('h3') // Missing the quotes
If you want your selector to work, you can assign the variable name.
var h3 = 'h3'; // This should work as well
if ($(h3).hasClass("6") ){
` found and return whether **that one** has the class "6"
– Ian Aug 09 '13 at 20:39