In my following code click event not working can anyone tell me why?
Note: I tried .live('click', function)
also which is not working so suggest me another solution.
<script type="text/javascript" src="js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.1.0.js"></script>
<script type="text/javascript" >
$(function(){
$("#signup").click(function(){
alert("in");
var street = $("#street").val();
var mno = $("#mno").val();
var tno = $("#tno").val();
var word = $("#word").val();
//var accept = $("#accept").val();
if(street=="" && mno=="" && tno=="" && word="" && document.getElementById('accept').checked==false)
{
alert("Enter all the details");
}
else if(street=="")
{
alert("Enter your street name");
}
else if(mno=="")
{
alert("Enter your mobile no");
}
else if(tno=="")
{
alert("Enter your telephone no");
}
else if(word=="")
{
alert("Enter the word displayed");
}
else if (document.getElementById('accept').checked==false)
{
alert("Accept our terms and conditions");
}
return false;
});
});
</script>
<body>
<div class="inner-content">
<label for="basic">Street Details:</label>
<input type="text" name="name" id="street" data-mini="true" />
<label for="basic">Mobile Number:</label>
<input type="text" name="name" id="mno" data-mini="true" />
<label for="basic">Telephone Number:</label>
<input type="text" name="name" id="tno" data-mini="true" />
<label for="basic">Enter the word </label>
<input type="text" name="name" id="word" data-mini="true" />
<label class="check"><input type="checkbox" id="accept"/> I accept the Terms and Conditions. </label>
<label class="check"><input type="checkbox" /> Receive mail about promotions.<br/> Offer and Service. </label>
<a href="index.html" data-role="button" id="signup">Sign In</a>
</div>
</body>