Author: <span class="vcard">Yogesh Singh</span>

jQuery has inbuilt methods that allow searching for the certain class within the element.

By using them you can easily check class on the selector and perform the action according to the response.

In this tutorial, I am explaining the following 3 methods –

  • hasClass()
  • is()
  • attr()

Check if element has certain class - jQuery

Jquery

There are many sites which offer free weather widget for the website. That are easy to embed.

You only need to specify some of the mandatory fields for generating the code.

In this tutorial, I show you some of the website from their you can get weather widget for your site.

How to show weather widget on the website

How To

Javascript

The Siema is a lightweight JavaScript plugin that adds carousel slider on the page. It is not dependent on any other plugins and not require to do any styling.

It is easy to setup on the page.

Few options and methods are available for customization.

Make Carousel slider with siema plugin - JavaScript

Javascript

The autocomplete functionality gives the user suggestions based on its input. From there, it can select an option.

In the demonstration, I am creating a search box and display suggestion list whenever the user input value in the search box.

Set selected value to search box when an option gets selected.

For implementing this functionality I am using AngularJS and PHP.

Create autocomplete search with AngularJS and PHP

AngularJS PHP

Jquery

The check uncheck all functionality mainly required when the long list of records available on the page and allowing the user to select multiple records to perform an action.

For example – Delete the selected user’s list, in this case, if require deleting all users then it needs to select one by one.

This can also be used on the limited number of list items.

I show you some of the examples for check uncheck all checkboxes with AngularJS.

Check uncheck all multiple checkboxes with AngularJS

AngularJS

PullToRefresh.js is a JavaScript plugin that lets you implement pull to refresh functionality on your web page. The plugin is not dependent on any other libraries.

You can define your own action when the user performs pull down action on the web page.

It has various options for customizing the default behavior.

Pull down to refresh with PulltoRefresh.js

Javascript Jquery

If you know how to add or remove record to MySQL database table with jQuery AJAX then it’s been a lot easier for you to do with AngularJS.

Using PHP for handling requests and according to it execute the action and return response.

In the demonstration, I created a layout for entering new records and show the list of records in table layout with a delete button.

Add and remove record from MySQL Database with AngularJS

AngularJS

Mainly the external script or CSS files are added in the <head> section or at the end of the <body> section.

The included script or CSS files take the time to load and it may slow down your site if they are more in numbers.

With the use of JavaScript, you can dynamically add external file reference in your page on the Client side.

Dynamically include script and CSS file with JavaScript

Javascript