i am having trouble with gumby framework, particularly toggles and switches. i cannot use multiple toggles. how can i call a toggle without calling the other toggles? example is:
$('#add_emp_btn,.toggle').on('gumby.onTrigger', function(event) {
// do something here
}).trigger('gumby-trigger')
then i have another one
$('#add_std_btn,.toggle').on('gumby.onTrigger', function(event) {
// do something here
}).trigger('gumby-trigger')
i tried changing the class of the buttons into toggle1 and toggle2, but it does not work. i googled a lot but to no luck. everytime i try to call one, the other toggle is also called that's why my AJAX codes would all execute at the same time. in gumby it seems that using normal jquery like
$('#add_std_btn').click(function(){});
does not apply since you have to use its javascript onTrigger functions just like what i did here. any ideas how can i do this?
by the way, here's the html too
<button type='submit' name='add_emp_btn' class='toggle' value='Add'
data- on='click' data-trigger='#add_emp_btn' gumby-trigger='#add_emp_btn'">
Add</button>
<button type='submit' name='add_std_btn' class='toggle' value='Add' data-
on='click' data-trigger='#add_std_btn' gumby-trigger='#add_std_btn'">
Add</button>
i really have trouble with this. can someone please help me?