View Full Version : How call Jquery function from inside Ajaxtabs loaded content?

11-04-2015, 10:46 PM

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... :-(


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;
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;


11-05-2015, 01:01 AM
Reading the Ajaxtabs docs, I found I need to use the:

//custom code here

Works perfectly!