Results 1 to 2 of 2

Thread: How call Jquery function from inside Ajaxtabs loaded content?

  1. #1
    Join Date
    Nov 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How call Jquery function from inside Ajaxtabs loaded content?

    Hi!

    I'm loading products inside the Ajaxtabs plugin.

    For each product, I need to add a link or button calling a Jquery ajax function to add this product to a favorite list.

    But, the normal click() function from Jquery is not triggered. I found this post at Stackoverflow, but I also was unable to make work... :-(

    http://stackoverflow.com/questions/2...by-jquery-tabs

    There's some special function to call from inside tabs contents I need to use to call a regular Jquery function?

    My simple function:

    $(".adiciona_favorito").click(function() {


    //var produto_id = $("input.adiciona_favorito").attr("id");
    var produto_id = $("a").attr("id");
    var dataString = 'produto_id='+ produto_id;
    //alert (dataString);return false;
    $.ajax({
    type: "GET",
    url: "favoritos_adiciona.asp",
    data: dataString,
    success: function(response) {
    // Essa linha substitui todo o form para mostrar a msg de retorno
    $('#menu_favoritos').html("<div id='menu_favoritos'>" + response + "</div>");
    }
    });
    return false;

    });*/

  2. #2
    Join Date
    Nov 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Reading the Ajaxtabs docs, I found I need to use the:

    instance.onajaxpageload=function(pageurl){
    //custom code here
    }

    Works perfectly!

Similar Threads

  1. Replies: 2
    Last Post: 01-21-2014, 06:56 PM
  2. functionality inside nested ajaxtabs
    By samantha1977 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 10-11-2011, 07:32 PM
  3. Dynamic Ajax Content not loading jquery on pages being loaded
    By cmccarra in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 03-21-2010, 01:42 PM
  4. Replies: 4
    Last Post: 09-04-2009, 01:53 AM
  5. ddaccordian inside ajaxtabs problem with init
    By dmgens in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 10-10-2008, 10:38 PM

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
  •