Using Delegate and Undelegate in jQuery

Using delegate and undelegate in jQuery, you can bind or remove a handler from the event for all elements that matches the current selector. Basically, these methods achieve the same thing as the jQuery .live() and .die() methods but they just use a different syntax. Syntax of Delegate: $(selector).delegate(childSelector,event,data,function) Example of jQuery Delegate: $(“table”).delegate(“td”, “hover”, […]

Download a HTML content as pdf using javascript – jsPDF

Using jsPDF library, you can download the div containing graphs, tables, contents as a PDF. This is a HTML5 client-side solution for generating PDFs. Simply include library in your <head>, generate your PDF using the many built-in functions, then create a button to trigger the download. <script type=”text/javascript” src=”http://cdnjs.cloudflare.com/ajax/libs/jspdf/0.9.0rc1/jspdf.min.js”></script> Create a object: var doc = […]

CakePHP interview questions and answers

CakePHP  is a free, open-source, rapid development framework for PHP. It’s a foundational structure for programmers to create web applications. There is number of in built component like Ajax, RequestHandler, Session etc. Question: What are the drawbacks of cakephp? Answer : The learning curve, and it loads full application before it starts your task. Its […]