Category : JavaScript &Jquery

console.log formData

console.log formData, access formData

Record highlighter on mouseover

To highlight a record or a row in a list of rows, use the following simple code

Send DIV contents to printer, print div contents

Sometimes you will need to print/send the contents of a div to the printer using JS, here is the code for both HTML and JS

How to open new tab with AJAX response and print it directly

In this snippet I will explain how to open a new tab with AJAX response and print it directly

Ajax submits the form twice

Sometimes you will have ajax submitting the form twice, you can stop this by using the following :

Add loading spinner when calling or stopping AJAX

In this snippet I will teach you how to create loading spinner when calling or stopping AJAX calls

Jquery scroll to element

How to scroll to specific div or element using JQuery

Add tinyMCE text editor to textarea

This snippet will teach you how to integrate thinyMCE text editor to any textarea element

Load two ajax request at the same time

Sometimes, you might need to call two ajax requests at the same time or request, here is a good example to do so

Remove select box options

In order to remove all the options of a select box use the following snippet.