+ 1
Convert JQuery snippet to JS
Hello, developers! I would be thankful if you can help me with converting below JQuery Code to Javascript: var $myGroup = $('#myGroup'); $myGroup.on('show','.collapse', function() { $myGroup.find('.collapse.in').collapse('hide'); });
4 Respuestas
0
Any developer?)
0
“Mimicking Bootstrap’s Collapse with Vanilla Javascript” por David Atchley https://link.medium.com/QPE6h1bu47
0
Erick Ventura this is not what I want. I want to toggle one of the item which should close other child items also.
0
$(window).on("load", function(){
$('.save-button').on('click', save_onclick);
$('.cancel-button').on('click', cancel_onclick);
$('.edit-button').on('click', edit_onclick);
$('.save-button, .cancel-button').hide();
});
function edit_onclick(){
setFormMode($(this).closest("form"), 'edit');
}
function cancel_onclick(){
setFormMode($(this).closest("form"), 'view');
//TODO: Undo input changes?
}
function save_onclick(){
setFormMode($(this).closest("form"), 'view');
Please convert Jquary to javascript anyone?