Found 766 Articles for JQuery

jQuery Mobile: Sending data from one page to the another

Lakshmi Srinivas
Updated on 29-Jan-2020 08:18:17

163 Views

To pass values, let us say our is the following, with page new.html,StructureThe JS will be:$( document ).on( "pageinit", "#new", function( event ) {    var myParam = $(this).data("url").split("?")[1];    myParam = parameters.replace("structure=","");    alert(myParam); });

How can I alter the color of an HTML5 canvas element using jQuery?

Daniol Thomas
Updated on 04-Mar-2020 08:00:00

208 Views

To alter the color of an HTML5 canvas, use −document.getElementById("ID").style.background = red;You can also try the following −var ctx = canvas.getContext('2d'); ctx.fillStyle = "#FF0000"; ctx.fill();

Move an HTML div in a curved path

Lakshmi Srinivas
Updated on 28-Jan-2020 10:03:41

250 Views

To move an HTML div in a curved path, use any of the following: CSS Transitions JavaScript (jQuery) HTML5 CanvasTry JavaScript to make it work in every browser.Use the animate() method. The animate() method performs a custom animation of a set of CSS properties.The following is the syntax:selector.animate( params, [duration, easing, callback] );Here is the description of all the parameters used by this methodparams − A map of CSS properties that the animation will move toward.duration − This is an optional parameter representing how long the animation will run.easing − This is an optional parameter representing which easing function to use for the ... Read More

What is a transformation matrix in HTML5 canvas?

Samual Sam
Updated on 25-Jun-2020 07:26:44

147 Views

HTML5 canvas provides methods that allow modifications directly to the transformation matrix. The transformation matrix must initially be the identity transform. It may then be adjusted using the transformation methods.ExampleLet us see an example of canvas transformation −                    function drawShape(){             // get the canvas element using the DOM             var canvas = document.getElementById('mycanvas');             // make sure we don't execute when canvas isn't supported             if (canvas.getContext){                // use getContext to use the canvas for drawing                var ctx = canvas.getContext('2d');                var sin = Math.sin(Math.PI/6);                var cos = Math.cos(Math.PI/6);                ctx.translate(200, 200);                var c = 0;                for (var i=0; i

Use HTML with jQuery to make a form

Chandu yadav
Updated on 12-Nov-2023 11:32:28

1K+ Views

To make a form with HTML, we use the following −    Details:    Student Name    Exam Date and Time     To make a form with jQuery and HTML, add input type text as −$form.append('');A better example would be − $myform = $(""); $myform.append(''); $('body').append($myform);

How to fire after pressing ENTER in text input with HTML?

Vrundesha Joshi
Updated on 25-Jun-2020 07:28:39

332 Views

Use HTML with jQuery to achieve this and fire after pressing ENTER −Example                          $(document).ready(function(){             $('input').bind("enterKey",function(e){                alert("Enter key pressed");             });             $('input').keyup(function(e){                if(e.keyCode == 13)                {                   $(this).trigger("enterKey");                }             });          });                             Press Enter key in the above input text.    

What are Pure HTML export buttons in jQuery Data Table?

Lakshmi Srinivas
Updated on 24-Jun-2020 14:06:49

133 Views

jQuery Data Table provides export buttons with the help of which we can make a structure like the following −Export PDFExport CSVExport HTMLExport ExcelFor this, we need to write code −var tbl = $('#extable').DataTable({      dom: 'export',        buttons: [          {                 extend: 'collection',                 text: 'Export',                 buttons: [ 'csvHtml5', ' pdfHtml5', 'copyHtml5', 'excelHtml5' ]          }        ] });

How to iterate a JavaScript object's properties using jQuery?

Lokesh Badavath
Updated on 18-Nov-2022 12:00:20

1K+ Views

In this article, we are going to learn how to iterate a JavaScript object’s properties using jQuery. The simplest way to iterate over an object with JavaScript is to use a for in loop. The for statement will iterate over the objects as an array, but the loop will send the key to the object instead of an index as a parameter. This loop is used to iterate over all non-Symbol iterative properties of an object. The hasOwnProperty() method can be used to check if the property belongs to the object itself. The value of each key of the ... Read More

How to clear HTML form fields with jQuery?

usharani
Updated on 17-Jun-2020 13:54:32

2K+ Views

With jQuery, you can easily clear HTML form fields. For this, jQuery: reset Selector is used. This will clear the HTML form fields.ExampleYou can try to run the following code to clear form fields with jQuery −Live Demo                          $(document).ready(function(){             $(":reset").css("background-color", "#F98700");          });                              Student Name          Student Subject                              

How to make a page redirect using jQuery?

Smita Kapse
Updated on 12-Jun-2020 12:20:30

818 Views

To redirect to another webpage in jQuery, use attr(). You can try to run the following code to redirect to another webpage −Example                                $(document).ready(function() {             $(location).attr('href','http://qries.com');          });                  

Advertisements