$('#btn-add-skills').on('click', function(e) {
e.preventDefault();
// function call goes here
});
Even after calling e.preventDefault()
the page still gets refreshed on clicking the button.
Any suggestion what I might have missed?
Below is the JADE code for above on click function.
.modal-add-skills.modal.fade
.modal-dialog
.modal-content
.modal-header
h4(style='color: black !important;')
.modal-body
form#addSkills
.form-group
label.col-form-label(for='Skill') Skill
input#skill_input.form-control.required(type='text', name='Skill', placeholder='Start typing to select skill', style="width: 300px;")
.modal-footer
button#add-skill-data.btn.btn-primary(type='submit') Add