I'm not very good in jquery. I will call a jquery function from another jquery function, but it won't work.
<script type="text/javascript">
$(document).ready(function () {
$(".publish").click(function(){
publish=true;
$.fn.saveData();
});
$.fn.saveData = function() {
\\ save something in database
}
}
</script>
The publish function will be called by a button, that works well. From this function I will call the saveData function, and that fails. Something is wrong, can someone help me?