Posts Tagged with 'JQuery'

HTML | Make an anchor tag to do nothing | href="javascript:void(0);" To prevent reloading a page when a link clicked is something like preventing the default behavior of an element. It can be achieved by providing …

Last updated 9 months, 1 week ago | 258 views

Tags:- HTML JQuery JavaScript

HTML | Input type number maxlength not working The "maxlength" attribute of an input field is used to limit the length entered in the input field. but it works only if the type of input field …

Last updated 9 months, 2 weeks ago | 339 views

Tags:- HTML JQuery JavaScript

Jquery | Remove id attribute from an element The removeAttr() function from jquery is used to removes one or more attributes from the selected elements. $("div").removeAttr("id");     Here seen an example with complete code …

Last updated 9 months, 2 weeks ago | 130 views

Tags:- HTML JQuery JavaScript

Jquery | Auto Focus On Next Input Field The jquery code for autofocus on the next text input field. $(".input-key").keyup(function() { if ($(this).val().length == $(this).attr("maxlength")) { $(this).next('.input-key').focus(); } }); Let's go through the above jquery …

Last updated 9 months, 2 weeks ago | 160 views

Tags:- HTML JQuery JavaScript

Chart.JS | Draw Bar chart from server data using MySQL, Ajax, and PHP This example shows how to draw a bar chart with data from the database server.  FILE STRUCTURE At the end of this …

Last updated 1 year ago | 1093 views

Tags:- HTML JQuery JavaScript PHP Chart Ajax PHP-MySQL

Chart.js | Changing graph type based on dropdown selection We can’t directly update the chart type in Chart.js, to achieve the requirement we need to destroy the original chart and then redraw the new chart. …

Last updated 1 year, 1 month ago | 1484 views

Tags:- HTML JQuery JavaScript Chart

Chart.js | show data values on top of each bar This is an example of displaying data value on top of each bar of Chart.js on the web page. Step 1: Create a basic HTML …

Last updated 1 year, 1 month ago | 1459 views

Tags:- HTML JQuery JavaScript Chart

Chart.js | Add bar chart in the webpage This is a simple example of using Chart.js to create a bar chart on the webpage.  Step 1: Create a basic HTML file called "chart.html"  <!DOCTYPE html> …

Last updated 1 year, 1 month ago | 245 views

Tags:- HTML JQuery JavaScript Chart

Jquery | Location reload() Method | Refresh a page The Location.reload() method reloads the current URL.   Syntax location.reload(forceGet) The Location.reload() method reloads the current URL. By default, the value of forceGet is false which …

Last updated 1 year, 2 months ago | 279 views

Tags:- JQuery JavaScript

Jquery | attr | Get HTML attribute's value You can get the value of an attribute for the first element in the set of matched elements using the .attr() function.   Return the value of …

Last updated 1 year, 2 months ago | 249 views

Tags:- JQuery

JQuery | TinyMCE | Clear TINYMCE editor  There is a method called setContent() in TINTMCE which you can use to reset/clear the TINTMCE editor. <script> // if one editor existing in your page. tinyMCE.activeEditor.setContent(''); </script> …

Last updated 1 year, 2 months ago | 324 views

Tags:- JQuery JavaScript TINYMCE

JQuery | Uncaught TypeError: e.indexOf is not a function This error occurs because you may try to load an event handler which is removed from the latest version of jQuery. Event handler like .load(), .error(), …

Last updated 1 year, 3 months ago | 1601 views

Tags:- JQuery

JQuery | Select dropdown item based on the value Change the selected option by value on the select box with jQuery is common nowadays. So let us have a select element with the list of …

Last updated 1 year, 7 months ago | 790 views

Tags:- JQuery JavaScript

JQuery | Print HTML page with CSS printThis is a jquery library which can print specific or multiple DOM element without losing css style. Features Print specific & multiple DOM elements Preserve page CSS/styling or add …

Last updated 1 year, 10 months ago | 998 views

Tags:- JQuery

JQuery | Ajax is sending GET instead of POST  It's a very common problem which is faced by most of the new programer. In Ajax code, new learners use (type: "POST") yet the sending request went …

Last updated 2 years, 4 months ago | 3940 views

Tags:- JQuery Ajax