Categories
jQuery

Differences Between jQuery .bind() vs .live() vs .delegate() vs .on()

In this article you will learn the difference between bind vs live vs delegate vs on methods for adding event handlers to elements. Developers are little bit confused about what the actual differences are between the jQuery .bind(), .live(), .delegate(), and .on() methods and how they should be used. Let’s start with some common HTML […]

Categories
Javascript

Enabling JavaScript in Browsers

Most of the modern browsers come with built-in JavaScript support and Enabling JavaScript makes you fully support in it. This tutorial contains the procedure of enabling and disabling JavaScript for supporting in your current browsers i.e. Internet Explorer, Firefox, Opera, chrome etc. Enable JavaScript in Firefox Follow this steps to enable/disable JavaScript in Firefox: Open […]

Categories
Javascript

JavaScript Strict mode

JavaScript Strict mode is a way to opt into a restricted variant which is an literal expression i.e. ignored by earlier versions of JavaScript. This is not just a subset but intentionally it has several semantics from normal code. Both strict mode and non-strict mode code can coexist, so incrementally, scripts can opt into strict […]

Categories
jQuery

Switch List/Grid View using jquery

In this tutorial you can get strong and good introduction to switch list grid view layouts of any HTML listing with jQuery. A common web interface feature is dynamic view switcher and you’ll find sometimes buttons to change the layout of a web page from display lists to smaller grids. Let’s coding the basic HTML: […]

Categories
Javascript

Deal with JavaScript and Cookies

JavaScript cookie is the most efficient method of tracking and remembering preferences, lets you store user information in small text files on computer. By definition, a cookie is a nothing but a piece of data that is sent from a website and stored locally by the user’s browser. Basically, web browsers and servers use HTTP […]

Categories
Javascript

Print a web page content using JavaScript

Are you aware of printing the content of a web page via an actual printer using JavaScript? Don’t get confuse! JavaScript can help you to implement print functionality using a print function of window object. This works on all modern browsers, so this can be a valid substitute inside a browser where toolbar is disabled. […]

Categories
Javascript

Placement of JavaScript in HTML

For including JavaScript code in a HTML document, there is always a flexibility to put in head or body section. A JavaScript function is nothing but a block of JavaScript code which can be executed when required. In HTML, we need to insert JavaScript code between the <script>…</script> tags. Most of the time we include […]

Categories
Javascript

Prevent tinymce from stripping empty tags from input

Using a empty tag in tinymce removes the tag until they have a content in between and switching in HTML mode, all your tags are gone? When you try to insert the following using the HTML button (or code plugin) and verify it afterwards using the HTML button (trying to submit the editor content) – […]

Categories
jQuery

jQuery data attributes

jQuery data attributes allows us to store extra information or return the value at the named data which will be associated with a particular element. Syntax of data attributes: This is very simple. On any elements the attribute name starts with a data-* where you can store extra information which does not represent visually. <div […]

Categories
jQuery

Remove li elements of ul except first and last in jQuery

Trying to remove all li elements inside a ul except first and last elements in jQuery? Here is the code to do this. Suppose, you have a ul li list and you need to remove all the li elements inside it except first and last li. So, to remove from all ul-s on the page […]