I want to create a list that consists of x number of objects that contains a name and a bool value
I want to create and send the list using ajax when this happens
This is in my Init
$('.si-accordion').click(function () {
$(this).siblings('.accordion_tab').toggleClass('IsExpanded');
SendSIInstance();
});
Here is the method it calls
function SendSIInstance() {
$('.si-accordion').hasClass('IsExpanded')
{
var NameValue = $('.si-accordion').text();
alert($('.si-accordion').text());
}
}
In my example I have 5 tabs (Which has the class si-accordion)
When I click them I toggle the class IsExpanded
I then want to create a list with objects like:
a String: text of si-accordion
A bool: if it has the class IsExpanded (if its there its true, else false)
The list with these 5 objects should then be send using AJAX so I can work with it.