function sb_save(){
alert('saving');
}
$('button').on('click', function(){
if (typeof sb_save==="function"){
sb_save();
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<button>Click</button>
More Related Contents:
- date of birth validation if user is above 16
- Change class value javascript in event onclick?
- How can I modify with css an image appended with javascript?
- what does this line of code do w.r.t. sticky header?
- How to get full path of selected file on change of using javascript, jquery-ajax?
- How to read data From *.CSV file using javascript?
- horizontal scrollbar on top and bottom of table
- Prevent any form of page refresh using jQuery/Javascript
- Adding additional data to select options using jQuery
- How to check all checkboxes using jQuery?
- Dynamically arrange some elements around a circle
- HTML5 dragleave fired when hovering a child element
- setTimeout / clearTimeout problems
- Calculating Jday(Julian Day) in javascript
- Setting up Twitter API, getting the last few Tweets
- Synchronized scrolling using jQuery?
- jQuery: $().click(fn) vs. $().bind(‘click’,fn);
- How to check whether multiple values exist within an Javascript array
- Calling webpage JavaScript methods from browser extension
- Multiple Select limit number of selection
- With jQuery, how do I capitalize the first letter of a text field while the user is still editing that field?
- jQuery() not finding elements in jQuery.parseHTML() result
- window.open popup getting blocked during click event
- How do I detect the inherited background-color of an element using jQuery/JS?
- javaScript: Can a comma occur after the last set of values in an array?
- How to add font types on Quill js with toolbar options?
- How to access jQuery in HTML 5 web worker
- Incrementing value continuously on mouse hold
- How can I reorder elements with JavaScript?
- jQuery Deferred’s, $.when() and the fail() callback arguments