If we want to return total number of dropdown value Then code will be in jquery is var len = $(‘#selectboxID option’).length; alert(len); If we want to return total number of selected dropdown value Then code will be in jquery is var len = $(‘#selectboxID option:selected’).length; alert(len);
HTML
Summernote Image Attributes
If you want to add image attributes in summernote then please follow the steps– Step 1: load summernote jshttp://<script src=”https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js”></script> Step 2 : load summernote attribute jshttp://codersqube.in/wp-content/uploads/2024/01/summernote-image-attributes.js Step 3: Step 4: Add this js
Export html table data to Excel using JavaScript or JQuery
If you want to export the html table data to excel using either java script or jquery, comatibale with all browser. You can use below script Call this function on:
Forecast Weather using OpenWeatherMap with PHP
In this tutorial, we are going to create a PHP application to display weather forecast information using an API. I have used OpenWeatherMap service to implement this with PHP. This is one of the best API service that provides weather forecast. It provides tremendous volume of weather data regularly. It is a free service with limited access. […]
Finding a Visitor’s Coordinates
Getting the position information of the site visitor using the HTML5 geolocation API is fairly simple. It utilizes the three methods that are packed into the navigator.geolocation object — getCurrentPosition(), watchPosition() and clearWatch(). The following is a simple example of geolocation that displays your current position. But, first you need to agree to let the browser tell the web server about your […]
Embed a Facebook page’s feed into website Page
If you want to show a facebook page’s content into your website is’s simple, no programming required. Go to https://developers.facebook.com/docs/plugins/page-plugin/ and fill up the setting and then generate code. After generate code just paste the code into your webpage where you want to show facebook’s post. For sample :Paste the code into just after body […]
Bootstrap Datepicker Disable Saturday and Sunday Example
We will simply disable saturday and sunday in bootstrap datepicker. we will disable saturday sunday using daysOfWeekDisabled option in bootstrap datepicker. You can do it by following sample code. i also five you full example. you can see both code. Example:
How to open a URL in a new Tab using JavaScript or jQuery
This is as simple as this. Use window.open(): Function description: name is a name of the window. Following names are supported: _blank – URL is loaded into a new tab. This is default. _parent – URL is loaded into the parent frame _self – URL replaces the current page _top – URL replaces any framesets that may be loaded
Preview an image before and after upload
Use this simple code for get preview an image before and after upload.
Create Dynamic Pie Chart in PHP with Google Charts
A pie chart is a circular graph which is divided into slices to represent numerical proportion. The pie chart mainly used to show comparison and the graphical representation helps understand the comparison easily. The pie chart is the perfect choice to illustrate data in a percentage format. Google Visualization API provides an easy way to create charts […]