Results 1 to 2 of 2

Thread: Call "add to cart" button in ajax

  1. #1
    User
    Join Date
    07-03-09.
    Posts
    31

    Default Call "add to cart" button in ajax

    Hi to all!
    Sorry for my newby question...

    I have isotope correctly installed on my server, and all works fine...
    There is a way to call "add to cart" in ajax? For example, in jquery, i want something like this:

    Code:
    $(document).ready(function())
    {
           $("#addtocartform").submit(function()
           {
                  // Submit form...
           });
    });
    I'm trying some way, but it seems not working in this mode...
    There is a correct way to do this?

    Thanks in advance.
    Tiziano.

  2. #2
    User
    Join Date
    04-10-11.
    Posts
    162

    Default Re: Call "add to cart" button in ajax

    Contao uses mooTools by default, so to run jQuery you need to do the following:

    Code:
    $jQ = jQuery.noConflict();
    
    $jQ(document).ready(function())
    {
           $jQ("#addtocartform").submit(function()
           {
                  // Submit form...
           });
    });
    Not sure how to process an AJAX call from Isotope but this should make sure your jQuery is working properly.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •