Should work same as it's working independently.
This
(function($) {
$(document).ready(function(){
$('#number1').hide();
$('.button1').click(function(){
$('.table1').slideToggle();
$(this).toggleClass("minus_icon");
return false;
});
});
})(jQuery);
and this
(function($) {
$(document).ready(function(){
$('#number2').hide();
$('.button2').click(function(){
$('.table2').slideToggle();
$(this).toggleClass("minus_icon");
return false;
});
});
})(jQuery);
both will be used on same page.
Thanks
Edit: Added after @Felix comment
@Felix - Do you mean like this?
(function($) {
$(document).ready(function(){
$('#number2, #number1').hide();
$('.button2').click(function(){
$('.table2').slideToggle();
$(this).toggleClass("minus_icon");
return false;
});
});
$('.button1').click(function(){
$('.table1').slideToggle();
$(this).toggleClass("minus_icon");
return false;
});
})(jQuery);