Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.