how to find an element in a group
Hi, I have multiple element in one div, and I trying to add class after clicking one the elements, and the class on other elements should be removed. It is something like radio button group, there is one element selected each time. How can I do that through Jquery. I attached my code, for example, when seat1 is clicked,the class on seat2 and seat3 should be removed. $("#seat1").click(function(){ $("#seat1").toggleClass("selected"); $("#datepicker-3").toggle(); }); <div class="col-sm-6 mb-3 mb-md-0">
Upgrading from 1.12.4 to 3.5
I ran the migrate script in a simple page. <script src="https://code.jquery.com/jquery-migrate-3.3.0.js"></script> It flagged using $ and to use jQuery. Every tutorial I could find using jQuery 3.5 still uses $ and not jQuery. Must I updated my all my code from $ to jQuery? The other flag on this simple page was to replace .ckick with .on('click', ) $('.trggr').click(function (e) { }); jQuery('.trggr').on('click',function (e) { }); Plus it flagged a things not in my page but in jquery itself, like
Cannot get value of input dynamically created / added by program or Jquery using clone
Dear Sir Working on project were need to add subjects dynamically using Jquery CLONE as follow. for existing rows everything runs perfectly ok but for programatically added row cannot get value entered in input using JQUERY script when save (savebtn) is clicked works fine for existing rows $(document).on('click', '.savebtn', function () { var thisid=this.id; console.log(' id clicked='+thisid); var splitid=thisid.split('save'); var onlyid=splitid[1]; $('#onlyid').val(onlyid); var schoolid=$('#schoolid').val();
table111.page(1).draw(true) is not working
hi, it works in first case but not in second , pls tel me why <table id="example" class="display" style="width:100%"> <thead> <tr> <th>Name</th> <th>Position</th> <th>Office</th> <th>Age</th> <th>Start date</th> <th>Salary</th> </tr> </thead> <tbody> <tr> <td>Tiger Nixon</td> <td>System Architect</td>
Create, and activate a tab.
Beginners question, so bear with me. According to the documentation, I can create a new tab with the following snippet: var tabId = "tab-" + data.id; // Data is an item, which has been clicked. $("<li><a href='" + tabId + "'>Some text</a></li>").appendTo("#tabs .ui-tabs-nav"); $("#tabs").tabs("refresh"); Works fine. However, there's one detail missing: How could I activate the created tab? Thanks, Jochen
[jqueryvalidation] How can I automatically remove the html tag
Good morning. I using the jquery plugin https://jqueryvalidation.org/ It was a bit diffculty to use it but I finally could. However, I am trying to find a way to automatically remove the HTML tage from a text field. In any cas, I will also do it from my MySQL qeuestion after, the user send the form, but when a user enter some things like this <a href="http://www.badwebsite.com">visite me</a> or some some paragraph like <p><br> I would to have to be automatically remove from the field. In other word,
Uncaught Error: Syntax error, unrecognized expression
Hello there! For last two day's I'm trying to figure out what is causing the syntax error and would appreciate any help. $("[name='Item.Index']").each(function () { var index = $(this).val(); console.log("index: " + index); //index value is 0 console.log($("[name='EI[0].ItemType']").val()); //outputs correct value console.log($("[id='EI_0__ItemType']").val()); //outputs correct value var t = "\"[id='EI_" + index + "__ItemType']\"";
Certificate Chain Issue
Hi there It seems as though one of the certification paths for https://code.jquery.com has a an expired CA cert. Please see attached screenshot and refer to the text in the red block. Our enterprise firewall is treating this as untrusted and would like to request that you update the chain to include the new CA certificate from Comodo. All works well if not browsing via any firewall but I'm assuming many businesses will be having this same issue as the cert expired over the weekend on 30 May 2020.
The jQuery UI datepicker previous/next buttons are not working after updating to 1.12.1 version
Hi all! Please, advice what things could lead to the broken buttons. Code wasn't change from it was written. function onDateChanged(y, m) { $('#calYear').val(y) $('#calMonth').val(m) $('#dataChanged').trigger('click'); } function onDayChanged(date) { $('#calYear').val("0") $('#calMonth').val("0") $('#change').val(date) $('#dayChanged').trigger('click'); } $( "#datepicker" ).datepicker({ inline: true, beforeShowDay: nationalDays, dateFormat : 'dd/mm/yy',
JQuery .is( ":visible" ) always returning TRUE
I can't seem to get the .is( ":visible" ) to work. It always returns true. I believe I have followed the correct syntax, etc. Clicking on .heading, toggles the .details class to hide/show. All seems to work fine, except the .is(";visible") always returns true, even when the .details gets hidden and I can clearly see the display:none is there. Maybe something to do with the fact the display property is dynamically changed...? Code is below: <html> <head> <script src="https://code.jquery.com/jquery-3.3.1.min.js"
jQuery mobile version upgrade breaks the CSS styles.
I am working on upgrading jquery mobile in html pages from v1.3.2 to v1.4.5. However, this upgrade is breaking the CSS styles, colors. This is a major problem because the customer is expecting just the version upgrade and no change in display. This upgrade changes the themes(color) and few other things. Please observe the differences in the attachments section. Can someone help me on this?
Calling Function now working
I've got a normal JS function, I'm calling it from a few different jQuery events which is why the code is standalone. The problem is, it's either not working or it's working twice. Here's my code. In DevTools, the class of popup flashes like something it happening however the class is not added to the code. Also when I do a console.log within the togglefunction function it writes two lines every event. No idea why? Any ideas? $(document).ready(function(){ $('.menu-toggle').click(toggleFunction);
Problem adding class to more lines of a form using jquery clone function
I have the following doubt, I am maintaining a form using the php language, it has a method that clones all content, that is, the body of a current row table for each time the user wants to create too many rows, well, this method is written in javascript using jquery. What happens, I added a select to this form and also a function for validating an input field to be required, but the cat's jump is in it, I add a new line, the function copies the current line and creates another one below, right,
Detect if HTML5 audio is playing using JQuery
Hello and thank you for reading my topic. I'd like to detect whether or not the HTML5 audio tag is playing, and control it across every page from within a frameset. Using JQuery I can control the audio like this: Frameset of index.html: <frameset rows="100%, 0%" frameborder="0"> <frame src="content.html" name="content" noresize> <frame src="audio.html" name="audio" noresize> </frameset> content.html, for our purposes this isolated code and the styles are loaded on every page: <style> .play { display:
Jquery Supported Browser Versions
On the main webpage for jQuery, it states that the current versions for Chrome, Firefox, Edge, and Safari are all supported by the latest jQuery version. It also states that the previous major version is also supported. What does this mean when there are different version numbers for different operating systems? For example, Chrome's most recent major Android version is 85. However, the most recent major Linux version is 84. Before that, both Android and Linux were updated in version 83. Does this
(URGENT) Which JQuery version compatible with Joomla 3.9.15
Dear Sirs, My Website under Joomla 3.9.15 have an alert by Acunetix Scanner as below comments. Would you mind suggest us which version of Jquery.min.js is compatible with Joomla 3.9.x Thanks indeed Fion
how to insert,update multipule rows to wcf dataservice from jquery
I have used only aspx page and javascript. so from page, i want to call jquery ajax method to send more than one row at a time to WCF data service. data could be of one table or more than one tables, related or non-related. os there is any documentation exits then pls send me the link with an example. few people said datajs,js also does it, but I could not open the documentation of the library may be something wrong with the site. one more thing, thought wcf data services might have described the
Advise a jquery UI widget to create a dropdown
Hi All! Please advise a jquery UI widget to create a dropdown like this one:
tinymce dynamically change errors
Hey. I have rules for tinymce "required" and "minlength". The error of "minlength" it only works after clicking a submit button, it is not dinamically appeared as it works for "text" and "number". I would like to be able to show the error until the minimum length is reached. Can this be implemented? And if so, how to do it?
How to convert a CSS background property into foreground?
Assume I have a CSS background key similar to .logo { background: url(/static/foobar/mylogo.jpg) 0px -no-repeat; } Is there a way to convert this background property into a foreground image by jQuery? All other configurations (margin, padding, background-position-x, background-position-,....) should remain untouched or converted accordingly. Thank you Peter
slideDown() action based on class of radio button selected?
I need to have a text box appear using slideDown when a specific radio button is checked. Should I do this based on the ID or class? I simplified the form to just the essential piece. I know I need to do something like this but I'm not sure how to trigger a check when the button is checked and to hide the "source_other" box when it is unchecked again. I'm also sure my code grammar is bad. if(source("source_2").prop('checked', true)) { $('#source_describe').slideDown(); } <form name="registration"
Money format every 3s
Hi, I am newbie. Please help me this: The idea is to change the content within <money>123456789</money> to currency format every 3 seconds. And this is my jquery: window.setInterval(function(){ $('money').each(function () { var item = $(this).text(); var num = Number(item).toLocaleString('en'); $(this).text(num); }); }, 3000); The first executing is fine, the content turns to "123,456,789", but from the second executing, the content changes to "NaN". So please
how to pass the value of frm and other parameter susing ajax and jquery?
hi im stuck here for many days please help me. i need to pass the value of selected ids into ajax . but my parameter is null but when i remove this part. the the ids has a value but my model parameter is null. i need to pass the value of both parameter var fileInput = $('#files'); var filename = fileInput.files[0].name formdata.append(filename, fileInput.files[0]); this is my full code. var table; $(function () { table = $('#Payable').DataTable({
Monetary value collection
Hi, I want to collect values in Turkey money format. For example 5.324.082,10. The codes below do not collect. How can i do? Greetings, Metin. document.addEventListener('DOMContentLoaded', function(e) { $("#prjProjeEkleOzKaynak, #prjProjeEkleDisKaynak").keyup(function() { var sayi1 = parseFloat($("#prjProjeEkleOzKaynak").val()); var sayi2 = parseFloat($("#prjProjeEkleDisKaynak").val()); var toplam = parseFloat(sayi1+sayi2); $("#prjProjeEkleToplam").attr("value",toplam); }); });
Prevent error “jqXHR.status === 0” in ajaxForm
I hope someone can help me I'm using jQuery form (with its method "ajaxForm") to load documents into a form and get a progress bar. It seems to work very well, however with files above +20 MB, in the middle of the load it is very common to receive an error: "jqXHR.status === 0", network problems. At first I thought I had problems with my internet connection, but this never happens when I use a normal form (without jQuery form). Any idea how to fix it?
How to delete all <div> which contain only whitespaces+empty nested elements?
How can I remove all <div> elements which contain only whitespaces and nested empty elements? Example. The following <div> elements with class="foobar" should be found and removed: <div class="foobar"> <div> "blank"<br>"blank"<br><br> </div> <p> </div> "blank" in the example above should obviously not mean the text "blank" but the correspondig char
change material icons entity code on click
Hello, I'd like to change a material icon when a button is clicked using jQuery, changing from visibility `<i class="material-icons"></i>` to visibility_off `<i class="material-icons"></i>` and vice-versa clicking again on the button, but I don't manage to toggle entity codes. ``` <button id="toggleVisibilityArchivedAction" class="btn btn-info"><i class="material-icons"></i> <span>Show datas</span></button> ``` ``` $('#toggleVisibilityArchivedAction').click(function (e) {
Aftwer AJAX success load decoded data from temp file
Dear Sir/Madam Following data I am getting as out of a a function (as a result of tree data output) tree=%7B%22li0%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22Main+MAN%22%2C%22age%22%3A%2298%22%2C%22gender%22%3A%22Male%22%2C%22pic%22%3A%22images%2Fprofile.png%22%7D%2C%22a1%22%3A%7B%22name%22%3A%22Wife+2%22%2C%22age%22%3A%2255%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Spouse%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%2C%22a2%22%3A%7B%22name%22%3A%22Main+Wife%22%2C%22age%22%3A%2291%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Spouse%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%2C%22ul%22%3A%7B%22li0%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22Son1%22%2C%22age%22%3A%2278%22%2C%22gender%22%3A%22Male%22%2C%22relation%22%3A%22Child%22%2C%22pic%22%3A%22images%2Fprofile.png%22%7D%2C%22a1%22%3A%7B%22name%22%3A%22wife+son+1%22%2C%22age%22%3A%2270%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Spouse%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%7D%2C%22li1%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22Daughter+1%22%2C%22age%22%3A%2268%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Child%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%2C%22a1%22%3A%7B%22name%22%3A%22Daughter+husband+1%22%2C%22age%22%3A%2275%22%2C%22gender%22%3A%22Male%22%2C%22relation%22%3A%22Spouse%22%2C%22pic%22%3A%22images%2Fprofile.png%22%7D%2C%22ul%22%3A%7B%22li0%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22d1-son1%22%2C%22age%22%3A%2266%22%2C%22gender%22%3A%22Male%22%2C%22relation%22%3A%22Child%22%2C%22pic%22%3A%22images%2Fprofile.png%22%7D%7D%2C%22li1%22%3A%7B%22a0%22%3A%7B%22name%22%3A%22daughter+1%3Edaughter%22%2C%22age%22%3A%2267%22%2C%22gender%22%3A%22Female%22%2C%22relation%22%3A%22Child%22%2C%22pic%22%3A%22images%2Fprofile-f.png%22%7D%7D%7D%7D%7D%7D%7D
AJAX/Fetch Auto Complete from massive DB
I have a database or world cities, over 3 million rows. I want users to search for a city and for them to click a city of choice and obtain the database row number. I can't just list all the rows due to the size so was going to do a ajax type call after a user enters a minimum of 4 chars. I may however need a Search button so I can't call it on the 4th, 5th and 6th letters. Here's what I have which works but is slow. Are there any other ways of doing this? $("#txtSearch").keyup(function(){ var search = $(this).val();
JQuery License and Commerical Use License
Merhaba, benim adım Anil. Ben bir Arayüz Geliştiricisiyim. Ticari bir projede jquery-slim kullanıyorum. Bu proje bir web sitesidir. Kaynak dosyaların içinde jquery.slim.min.js adlı bir dosya var. Bu dosyanın içinde (c) JS Foundation ve diğer katılımcılar | Jquery.org/license * / ifadesi vardır. Ticari kullanım için kullanabilir miyim? Örnek Resim:
get data from combo box and store it to the session
hello, im just learning jquery and ajax via YT, and i tried to create a form with combo box, and show records from database based on combo box after that, i want to store the data to the session i already created the form that showing the records and already worked, but the button that i created that for store to the session, the ajax is not working. ajax3.php (index) <form action="cari.php" method="POST"> <select name="kamar"> <option value="regular single">Regular Single Rp 99.000</option>
live form check availability
hello, i'm newbie of jquery and ajax, so i created based on website that i read i already created simple live username check (and others) and i works but after i implement on to my project, it dosen't works, why? here the code: form code <form name="daftar" method="post" onsubmit="return validate_daftar()"> <div class="form-group"> <label for="username">Username :</label> <input type="text" style="max-width:90%;" class="form-control" name="id_daftar" id="id_daftar" placeholder="Masukkan Username Anda" maxlength="16" autocomplete="off"/>
Do something different based on multiple different URL parameters
I have the following script started and need to trigger certain modals to open on page load, based on the URL string. For example, if 'src' is equal to '123', then modalBuyer needs to appear. If 'src' is equal to '234', then modalSeller needs to appear. Here's what I have so far. This was created back when there was only one modal that ever needed to be shown on page load. if (window.location.href.indexOf('src=') > 0) { $(window).on('load',function(){ $('#cModal').modal('show');
Offline JQuery UI Download Builder
The jQuery UI Download Builder tool at https://jqueryui.com/download/ no longer works, you get a "bad gateway" error #502 when you click the button. Is there a way to do the same action on your own computer, e.g. with Node? The complete UI archive is huge, and I only need a few parts...
Faster Lookup code
Perhaps more JS than jQuery but looking for a faster option than a long if else statement code. Perhaps easier to manage. I have a menu system which depending on the ID if the list item clicked calls a ajax page. Here's how I'm managing it now Is there a way I can do it where I just maintain an index of ID's and pages? $(document).ready(function() { $(".menu-li").click(function(e){ if ($(this).attr("id") == 'my-btn'){ $.ajax({url: "page-content/mypage.php", success: function(result){
Using load() in a page to add other html to page.
I am creating a project that is HTML and JQuery/Javascript only. I have used the load() and it does show up on the page. However the added page uses a javascript or javascripts files that are loaded on the index page. It appears that the added page cannot use the loaded script. It works fine if i use it on the index page directly. I am only using div tags with special objects in the tag that the javascript looks for. Am i to assume that when you load() a page into another it really isn't part of
Autocomplete behavior with array of object as source
I've noticed when you set your source as an array of objects, when you select an entry it set the value of the control to the value and not the label of the selected entry. See example: https://jsfiddle.net/7tjp0d2c/ I suppose that would make sense if the control your making into an autocomplete is a select, but mine is an input. This is because my source is actually a function that's retrieving remote data and return an array of objects. Is there anyway to alter the behavior to put the label in
I get the error: "SyntaxError: expected expression, got '&'", What is the root cause of this? I don't know what to do
Hello, I'm building with PHP an HTML string and then I want to put it in the html of the div (On this moment I don't know anymore how this called, sorry): jQuery('#searchresults').html(<?php echo htmlspecialchars('<table id="table_id" class=""><thead><tr><th></th><th></th><th>voornaam</th><th></th><th>Achternaam</th><th>Volledige naam</th><th>Categorie</th></tr></thead><tbody>'); ?>); I have bring it back to just a simple hardcoded string. In my console.log I get the message: SyntaxError: expected
What is the different between een Array and this?
Hello, As early mentioned I try to understand and learn jQuery becaus I'm busy for a joomla component. I have read a joomla example and there was this used: return { minlat: latlngMapbounds[1], maxlat: latlngMapbounds[3], minlng: latlngMapbounds[0], maxlng: latlngMapbounds[2] } I thought ok, that's an array on a strange way implemented. So I thought for my implementation I do not so difficult, I will return a 'simple' array. But than it doesn't work. So I made
Why is the behavior differtent between these two lines?
Hello, I try to learn/understand jQuery and I'm using it for creating a Joomla component. I have create an event like this, which should react on "keyup" if something is done in text input element: jQuery(".filter_field").on("keyup", filter_data); //or the next line //jQuery(".filter_field").keyup(function(){filter_data()}); I have two text input elements and one select element with the class="filter_field" The strange thing is, it is only fired the first time if I changed
Next Page