/* This is a javascript file for omninotesweb ============ Author: Suraj patil Updated: January 2015 keyCode: n-110 */ $(document).ready(function(){ /*on() is used instead of click because click can be used only on static elements, and on() is to be used when you add elements dynamically*/ $('[data-toggle="tooltip"]').tooltip(); // // $('.items').openOnHover(function(){ // alert(); // }); $('#addNote').click(function(){ $('#addNoteModal').modal('show'); }); $('.floating-action-icon-add').click(function(){ $('#addNoteModal').modal('show'); }); //$(document).on("click", '.note-close',closeDelete); //when you delete a note, the x on the top right corner $(document).on('click','.open-note', openNote); //when you want to open a note in full screen, the second icon on the bottom right corner from the right //$(document).on('click','.hashtag', hashTag); //function to handle search by hashtag *TODO* //$('#addNoteModalSaveBtn').click(addNoteToDOM); //Adds note to the DOM /*$( document ).keypress( function(event){ if ( event.which == 110 ) { //bind the 'n' key to add note $('#addNoteModal').modal('show'); } if (event.which==109 ) { //binds the 'm' key to show the navigation drawer $('.sidebar-toggle').click(); } } );*/ }); function addNoteToDOM(){ var title = $('#add-note-title').val(); var content = $('#add-note-content').val(); if (title!="" || content!=""){ var note=$('