Jump to content

jQuery Help


stig1

Recommended Posts

How would i correct this error I receive in firefox error console.

 

Warning: Unexpected token in attribute selector: '!'

 

My coding is the following:

 

<script type="text/javascript" src="app-files/scripts/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("a[title=submit]").click(function(){
	$(this).parents("form").submit();
});
});
</script>

 

HTML Part

 

<a href="#" rel="nofollow" title="submit">Add To Cart</a>

 

Please help, and thankyou in advance! Basically I have created a link which submits a form, because you can style a link better than those input buttons, etc.

Link to comment
https://forums.phpfreaks.com/topic/219007-jquery-help/
Share on other sites

Do you have this online that we could look at, or the full HTML we could run ourselves? It's hard to say why it's giving the error when we can only see a small amount of the actual code.

 

Basically I have created a link which submits a form, because you can style a link better than those input buttons, etc.

Really? I find it far easier to style a button. Plus you're making it unusable for those with JS disabled.

Link to comment
https://forums.phpfreaks.com/topic/219007-jquery-help/#findComment-1136149
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.