Reputation: 709
For some reason, this isn't launching
<script type="text/javascript">
$(function(){
if ($(h3).hasClass("6") ){
alert ('Todays Date Friday') }
});
</script>
Upvotes: 1
Views: 145
Reputation: 55740
$(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") ){
Upvotes: 5