stop watch if the mouse is still
hey I am using Minimal Stopwatch & Countdown App In jQuery - js-timer I modified the code a bit according to my needs When the page loads the counter starts counting : 1- when the mouse is idle for like 5 second i stop time 2-if the mouse is active after 5 seconds the counter triggers or it stopped I am blocked at stage 1 and 2 here is my code https://jsfiddle.net/poeh90tb/
Event not firing (JQuery with XSLT)
Hello, I'm trying to integrate JQuery with XSLT and it's not working as intended here is my xsl: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" /> <xsl:include href="include.xsl" /> <xsl:template match="/"> <html> <xsl:call-template name="header" /> <body> <div class="jumbotron text-center"> <h1>My First Bootstrap Page</h1> <p>Resize
passing javascript variable to php and redirecting page to php file
how to pass javascript variable to a php file using post method I want that after click my page should be directed to r.php and it should display the passed js variables from client side here is the code <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script> $("#text-id").click( function () { $.ajax({ type: 'post', url: 'r.php', data: { source1: "some text", source2: "some text 2" } }); }); </script> </head> <body> <div> <a href="#" id="text-id">Send
input type='file'
Hi, I need you help to understand why I receive empy sting from this: $("<form 'enctype=multipart/form-data' method='post' action='upload.php'><input type='file' name='file' value='"+arg1+"'/><input type='text' name='a' value='"+arg1+"'/></form>").appendTo("body").submit(); arg1 is the name of the file. in update.php if I use $_POST['a'] it returns the correct name. Instead if I use $_FILES["file"] ['name'] it returns an empty string. Controlling my console: file: a: myFile Thanks in advance. Tegatti
JQuery Tabs and Text Input
Does anyone know how to replace the text element in the LI element of the tab part of this control with a text input box? Rather than display fixed text in the thumb tab, I want to have an input field.
Does jquery 3.4.1 support IE 11?
Specifically with regards to the "getRootNode" that I see mentioned in "isAttached".
jqTree - Node Tooltip
Hi, I would like to handle nodes which have long labels in jqTree. One solution I am thinking about is to display a tooltip for each node. My first question is: is there an easy way to give a tooltip to a node ? I tried to add a "title" when creating the data, but that doesn't seem to have any effect: myDatat[x] = {name: "aName", id: "anID", title: "aTitle"} Then I found an example here: http://jsfiddle.net/depperm/ydtv2v11/, which I was able to reproduce with jQuery 3.x and jQuery UI 1.12. However,
Autocomplete
Hi there, i'm using autocomplete, for popolate an input with lastname if I create the json with only lastname all is ok. But really I would add matricula, name, lastname in my json. So my json will be {matricula:111, name:John, lastname:Doe} I can create the json array, but I can't figure how use this json on autocomplete. Thanks for your help
Icons and Toggles in Input Fields
Hi, I would like to be able to put an icon on the left-hand side in an input field like the search field has. Additional I would like to add a toggle icon on the right-hand side of a password field to show and hide the password. This seems fairly prevalent on most password fields these days. I think the toggle is just a case of switching the field type from password to text and back etc. Through CSS I can put a small background icon in an input field but it disappears when text is entered also the
Change custom error message
I have a form with two unrelated checkboxes and am trying to configure it so that it requires one checkbox to be checked. I accomplished that with the code below, but now need to change the error message so that it doesn't point to the first checkbox and read, "Please check this box if you want to proceed". I'm trying to figure out how to... a. Change the invalid message to "Please select at least one option to proceed". b. Possibly not have it point to the first checkbox. Here's what I have so far:
JQuery Mobile Footer on 2 lines not 1
Hi, I have a JQuery Mobile Header with an button on the far left and then a centralized texted all on 1 line. I have a JQuery Mobile Footer with the same construct but it shows on 2 lines. The centralized text on the first line and the button on the far left on the second line. How can I reduce the Footer to 1 line the same style as the Header as it looks odd with the Footer being twice as large. Appreciate any suggestions, thank you..
jqueryui modal popup box not stacking in front of other modals
I'm having problem getting jqueryui dialog boxes to open in front of other dialog boxes that are already opened. I recently upgraded our site to use jquery version v3.4.1and jqueryui version 1.12.1. Prior to this upgrade it was working fine, but now it is not. I use popup modals to display other html elements....then I also have links in that popup that open another popup box. Now if I click on a link inside a modal popup, the other one opens, but its hidden behind the modal popup that I just clicked
Getting the files twice when submitting
I created a form that allows drag and drop for images. So what I've done is that when a user drops an image then the $("#fileuploader").on('drop', function(e) grabs the filename and then uses the $(this).trigger('got-dropped', [filename_list]); to then pass on the filename to the saveForm(). The problem I'm having with my code is that if I do submit a form with an image then my form is submitted twice, one with the image and one without the image. I know that the problem I'm having is due to this
On enter scroll down to next input field and select it ready to write somthing.
I'm hoping this makes sense, but I am building a form and have got a script that so far has disabled submission on enter and scrolls down to the next input field. However I want that next input field to have the cursor selected and to be ready to start typing. This is what I have so far; jQuery('form input').keydown(function (e) { if (e.keyCode == 13) { var nextQuestion = jQuery(this).closest('.form--wrapper').next(); if (nextQuestion.length !== 0) {
Countdown whit pause and resume
hi , sorry for english , i try to create un countdown with pause and resume , this is my code : https://jsfiddle.net/z0d9w4je/8/ i must to leave the structure as this because some control are doing by php and database...
JQuery Upgrade 1.1x to 3.0 - Browser Compatibility
After Upgrading JQuery 1.1x library to 3.0. My Application not working in Google chrome/Edge.
Strange Regex Issue with [^0-9]
OK - no laughing at my Regex (it drives me mad!!) I'm trying to only allow digits and replace spaces with commas - this is the line I had var fixedInput = currentInput.replace(/[A-Za-z!@#$%^&*()]/g,"").replace(/[^0-9]/g, ",").replace(/,+/g,",").replace(/^, /,""); There was a strange thing happening - when this output on load the 0 was removed from the digit line - like this: var fixedInput = currentInput.replace(/[A-Za-z!@#$%^&*()]/g,"").replace(/[^-9]/g, ",").replace(/,+/g,",").replace(/^, /,"");
Drag and Drop the images on canvas using jqueryui
i have completed the dragging and dropping of buttons and nav bar and it is draggable after drop also and working properly, but now problem is now i want to drag and drop the image.i have tried many different things but unable to do this my Fiddle : http://jsfiddle.net/Yousuf_007/d6gowym5/
Need help with jQuery
I'm new with jQuery and Javascript. I had downloaded the jQuery v3.4.1 to my PC in same folder with .html page. I'm traying to embedd jQuery in .html page with <script> but it doesnt work. When i load/reload the page the alert() outputs "jQuery not installed". Hope someone can help me here. <html> <head> <script src="jquery.min.js"></script> </head> <body> <div id="body-wrapper"> <script> if (typeof jQuery == "undefined") {
How to get src from video
Hi, I have a problem to get src from video or from document, in the same way I can do this with image, and it works fine: var src = $(this).closest(".client").find("img").attr('src'); I've tried this: var src = $(this).closest(".client").find("video").attr('src'); How can I do? Thanks in advance. Tegatti
Upload video with longer duration.
Hi, In my project I should upload images, videos and documents. I'm using jquery file-input and it works fine with, images and document, but when I upload video with longer duration, I recevive this error: Something went wrong with the file upload operation. Please try again later! I've read something about jquery.fileupload-video, but I did not found documentation and examples to apply in my project. Please, can someone helps me. Thanks in advance. Tegatti
Why jquery .offset().top doesn't have the expected behavior ?
I 'm using the jquery .offset().top to build a fixed menu on my website and it works absolutely perfect but ONLY when the user look at the top of the page. If you try to scroll the body down to the middle and then try to click at the left links of the menu the scroll has strange behavior and doesnt display the correct anchors anymore or even worst stops to work. Why is that? What i 'm doing wrong? HERE IS MY JSFIDDLE
HELP: problem with Jquery in wordpress blog
hello to all boys and girls, we have several issues with these codes and I can't fix it. The blog is made with wordpress. Can someone help me? the blog is agnelloesugo.it this is the error message: Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include. This includes make eliminates the revolution slider libraries, and make it not work. To fix it you can: 1. In the Slider Settings -> Troubleshooting set option: Put JS Includes To Body
Alert box not working
Hi, I have a simple JS file, and only 1 text box, if the text value is PIN, show an alert. Can someone please point where I am wrong? https://jsfiddle.net/fymno1ea/1/
Clicking Twice in Select to Get Option List
<select id="selectid"> <option></option> </select> var valArray = data.valarray; // data is coming in correctly from an ajax call $('#selectid).children('option:not(:first)').remove(); // selfld are defined correctly for (var i = 0; i <= valArray.length - 1; i++) { $('#selectid).append('<option value="' + valArray[i][selfld] + '">' + valArray[i][selfld] + '</option>'); } When I view the select list and click on it, the above code runs inside of an on focus and the new option values are coming
$(document).ready and $(window).on('load') in jQuery 3.4.1
Hi, I'm currently in the process of trying to upgrade a site from jQuery 2.2.4 to 3.4.1 but I am having issues with the order in which $(document).ready and $(window).on('load') are firing. My understanding is that $(document).ready should always fire first but this doesn't seem to be the case. In the following example the console shows "window loaded" before "document loaded" when using jQuery 3.4.1 but when using jQuery 2.2.4 it always works as expected ("document loaded" appears before "window
jquery - image upload and crop
Hi, I am trying to implement cropper.js plugin to upload and crop image. Please check the link below. It is working fine with a pre-loaded image. But when I upload a new image, I am unable to load cropping tool. http://www.inoftech.com/karnpk/diary/crop2/ Can someone help me in getting this addressed please? Regards, Prem
loop thru images in a directory
Hi I have very little experience using jQuery. I'm creating a gallery of paintings, below is the html for 1 painting <div class="d-flex flex-row flex-wrap justify-content-center"> <div class="d-flex flex-column align-items-center justify-content-center"> <img class="img-fluid" src="images\landscape0.jpeg"> <div class="tit-siz"> <div style="float: left"> <h4>Landscape</h4> </div> <div style="float: right"> <p style="float: right" class="card-text">23cm
JavaScript speechSynthesis Autoplay
I have tried to implement JavaScript speechSynthesis to play an audio on a page where there are no user interaction. I am accessing that page methods using ajax call. and onsuccess i would like to play audio output. But I understand Google Chrome prevents auto play of any audio and gives an error [Deprecation] speechSynthesis.speak() without user activation is no longer allowed since M71, around December 2018. See https://www.chromestatus.com/feature/5687444770914304 for more details function speaktext()
Does $('video') work with audio?
I have a webpage I wrote a few years ago that has statements such as: try { myTextTrack = $('video').get(0).addTextTrack('metadata', 'myLabel', 'en'); } catch(err) { alert(err); return; } I tried it out recently, and it crashes with audio files like mp3's. Does 'video' not apply in that case? Would I use something like 'audio' (if it exists)? Thanks.
Problem about dragging and dropping images in jquery
Hello everybody. I'm trying to create my own drag and drop for images, I thought that I had understood the tutorials that I did but it seems I might not have gotten it. So I was hoping someone here could maybe tell me if I did understand or not. This is my html code <div class="upload-console-drop" id="drop-zone" just drag and drop files here </div> This is my js $(document).ready(function(){ var dropZone = document.getElementById('drop-zone'); dropZone.ondrop = function(e){ e.preventDefault();
adding and removing an element
take a look at this fiddle...click any menu item(user stats,appointments...etc)...a blue arrow appears. My goal is that when a menu item is clicked the arrow appears(as is the case now...) but the arrow appeared in a previously clicked menu item disappears from the DOM...something logical....so the user can have an idea where is he currently. Something like that...but with the arrow.(this latest fiddle does not use jquery,something I do not want anyway) What do you suggest?
Content script can't see initialization spinner
Hey, I've been writing a content script to do some form filling. The website I am trying to do this on uses the jquery spinner widget for one of the values. Using the Chrome console and manually performing every command, all of this works fine. However, when I try to let the script run it I get this error: Uncaught Error: cannot call methods on spinner prior to initialization; attempted to call method 'value' at Function.error (jquery.js:253) at HTMLInputElement.<anonymous> (jquery-ui.min.js:6)
Add checkbox to option select
I am trying to append checkbox to an option selected value but can't seem to get it working. below is my code and sample output without the checkbox <style> body { padding: 15px; } .select-checkbox option::before { content: "\2610"; width: 1.3em; text-align: center; display: inline-block; } .select-checkbox option:checked::before { content: "\2611"; } <div class="col-md-6"> <div id="selectDescription">Select
Check if inputs have specific value
I've been scratching my head and either got it completely wrong or close... I have div that displays and number e.g. 106 I then want to run a query that will take that ID and check if any inputs values on the same page has that number. If one does have that value, then the input gets ticked. However all I get is undefined..... var dev_id = jQuery('.dev_title').text(); alert(dev_id); if (jQuery(".dev_id").val() === dev_id) { jQuery(this).prop('checked', true); alert(dev_id); } <span class="dev_title">106</span>
ThemeRoller Website Down (502 CloudFlare error)
I am trying to make a custom theme with the ThemeRoller. The preview does not update, and when I go to download after selecting modules, I get a 502 cloudflare error.
New JQuery User - Help with Drag and Drop UI
Hi fellow programmers! I am new to Jquery (and new to this site so if i can do anything in future posts to make things easier, please let me know). I am working on homework so I am NOT expecting anyone to do anything for me - but am asking for some guidance and/or explanation on how to complete the bold font portion of the following: "Add jQuery code that responds to the click event of the Add Task button for the first employee. When this button is clicked, use the prompt method to get a description
how to print data from select when option is selected with submit button and where id
hello, how to retrieve data from the select option we throw to the button i have select option // code <div class="col-md-5"> <div class="form-group"> <label for=""></label> <select name="" id="company" " class="form-control"> <option value="">--- select company ---</option> @foreach ($customer as $c) <option
jquery.validation select option dropdown validation
Hello, I am utilizing the jquery.validation plugin. I am having problems trying to get a select option dropdown menu to show the success checkmark glyphicon on keyup (immediate positive feed back) like other inputs (all other input types work as expected). I would like for the validator to show the checkmarks as soon as a selection is made. The dropdown looks like the following; <li class="cc_expiration_box">
HTML Table to PDF export issues
Dear All, I am new to Scripting Languages. Need your valuable suggestions to resolve the issue. I am unable to export HTML Table to PDF using jQuery. Thanks, Siva.
Next Page