Change Selected option in Select2 Dropdown with jQuery

Select2 is a jQuery plugin that customizes HTML select element and makes it more user-friendly.

It adds search features and allows to add an image with options.

The HTML select element option can easily set selected using jQuery – $(selector).val(option-value);.

But this does not directly work with the Select2 dropdown element.

In this tutorial, I show how you can dynamically set an option selected in Select2 with jQuery.

Change Selected option in Select2 Dropdown with jQuery

Read more

Build 5 Star Rating System with jQuery AJAX in CodeIgniter 3

Nowadays mainly in every e-commerce website, there is a rating option on the product page. User can rate the product based on its quality, usefulness, etc.

This rating is helpful for the other user who wants to purchase the product.

There are many jQuery plugins are available to add a rating bar on the page.

In this tutorial, I am using the Bootstrap star rating plugin to create rating system in the CodeIgniter 3 project.

Build 5 Star Rating System with jQuery AJAX in CodeIgniter 3

Read more

Load More Records on Button Click with Vue.js and PHP

The number of records displays on the page affect the load time of a webpage.

To improve response time you can show limited records at a time using pagination.

There are various types of pagination available.

One of them is a load-more type.

It adds new records at the end when it gets clicked until records are found.

In this tutorial, I show how you can implement load more functionality on your webpage with Vue.js and PHP.

Load More Records on Button Click with Vue.js and PHP

Read more