jQuery broken function after added new function
- by Kyle Sevenoaks
What's wrong here? The alert function was working until I added this new function to it.
Is there anything I am doing wrong? It just simply doesn't fire the alert anymore.
<input value="1" type="checkbox" name="salgsvilkar" id="checkbox2" style="float:left;"
/>
{literal}
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(function() {
//checkbox
$("#scrollwrap").click(function(){
$("#scrollwrap").toggleClass('highlight');
});?
});
$(function(){
//button
$("#fullfor_btn").click(function(e){
if(!$("#checkbox2").is(':checked') == false)
{
alert("Please accept the terms of sale.");
e.preventDefault();
}
});
});
</script>
{/literal}
<button type="submit" class="submit" name="{$method}" id="fullfor_btn" title="Fullfør bestillingen nå" value=""> </button>