Archive for February 2014
jQuery to load first 5 elements & click "load more" to display next 5 elements
jQuery functionality to load first 5 elements & click "load more" to display next 5 elements.
HTML:
<ul id="myList">
<li>One</li>
<li>Two</li>
<li>Three</li>
.
How to get the class name using jQuery?
Consider the following HTML:
<div id="myId" class="myclass"></div>
jQuery:
var className = $('.myclass').attr('class');
(or)
var className = $('#myId').attr('class');
Reference: StackOverflow.c.
Working with jQuery ajax error function
By using the $.ajaxSetup() we can handle the error/exception as mentioned below:
$(function() {
$.ajaxSetup({
error: function(jqXHR, exception) {
.
List of built-in functions in Javascript
.src td {
padding:4px;
}
The following are the list of pre-defined/built-in functions in Javascript.
Number Methods
The Number object contains only the default methods that are part of every object's definition.
MethodDescription
constructor()Returns.