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);
Jquery
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:
Jquery Select2 – Select box with search example code
Select2.js don’t require to add bootstrap js or css. It provides it’s own js and css code. I give you full example of select box with search option. Get more information about select2 : https://select2.org/
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 […]
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.