Highlighting between two data points on a scale
I have a php generated scale table from 1 to 14. I highlight the min and max values given by the checkbox form on the table with the following jquery code. This is the jquery code I'm using to highlight two points on the scale table. $("#checkAll").click(function() { $('input:checkbox').not(this).prop('checked', this.checked) .trigger("change"); }); $(".selector").on("change", function() { var parent = $(this).closest("form"); $("#" + parent.data("checktable")) .find('[dbval="' + this.name
question on using textarea events
hello - i want to use an event when a textarea has changed, but only actually respond AFTER the user appears to be completed. the best i have come up with is something like this: flag = null; // define input response flag jQuery('input[name=textAreaField]').on('change input', () => { flag = true; // set input response flag }) jQuery('input[name=textAreaField]').on('mouseleave', () => { if ( flag ) { flag = false; // reset input response flag
Setting a cookie with JavaScript which expires after 24 hours
How do I run this function, so that the cookie expires in 24 hours? function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } Thanks
Jquery UI autocomplete on dynamic fields
Kindly have a look at this screen capture. http://www.screencast.com/t/GMGBy6QF9bP as i have shown i am trying to use jquery ui autocomplete on a dynamically generated fields, autocomplete works fine with the main field i'm using to copy & generate dynamic fields. but when adds a new field the autocomplete not working with the newly generated field. this is my autocomplete code $(function(){ $(".get-tasks").autocomplete({ source: baseurl+"job/job/get_tasks_autocomp", }); }); I would like to
Is there no shorter/smarter way to add/overwrite CSS statements than with "css(....,....)" command?
Occasionally I want to add/modify CSS statements of the currently loaded webpage. Lets say I want to add/overwrite the current CSS values with the following new CSS values: #container article > p { font-size: 16px !important; line-height: 16px !important; font-family: Verdana !important; width: 98% !important; } As far as I know users have to write therefore in jQuery a difficult, non-intuitive, multiple tags command similar to $('#container article > p').css({ "font-size" : "16px", "line-height"
restrict date range entered through keyboard
I am using jqueryUI's datepicker widget. It works well when restricting dates within minDate/maxDate range when picking date using mouse from the calendar. But I can still type in any date in the textbox. Is there any way to restrict the typed in date also according to the minDate/maxDate range?
Problems Using Ajax to update DB
So here is the ajax code located in the startPublishing() function: streamId = randomToken $.ajax({ type: "POST", url: "connUpdate.php", data: 'stream=' +streamId, success: function(response) { alert("Record updated"); } }); here is connUpdate.php <?php // Create connection $link = mysqli_connect("localhost",
Get values from several inputs&select
Hello jQ-People, I'm new in jQuery and for my study i want to make a webapp that send to DB BBQ recipe by a from. Client goal: Complete form to creat a BBQ recipe ! Client need to: add ingredient name (input)+ Measure (input) + unity of measure (select) Client can: add several line of ingredient, each line is 1 ingredient My problem: I want to get in an array (for exemple) each line of ingredient like Arr [ "Apple", "3", "Kg" "Beef", "500", "gr" .... ] My goal send the objet to the database. I have
ajax by multiple row
hi , sorry for english , i use thi example https://bootsnipp.com/snippets/402bQ and i create my own code https://jsfiddle.net/xpwh1oc5/ I have two answer : 1 if i change code with [value] the ajax dont work : <label class='col-lg-3 control-label'>Inserisci nome dropbox</label> <input type="text" id="ricerca_codice_lavorazione[0]" style="color: black"> <button type="button" id="button_ricerca_lavorazione[0]" class="btn btn-info">Ricerca Codice</button>and ajax too
Mouseenter firing multiple times
I'm trying to get a random image to appear on each new hover of a div. The images are coming from some JSON data. It's currently working, but the mouseenter function is firing when the mouse is still inside the div. Maybe the getJSON request is working each time the image is delivered? Is it possible to store the JSON data in an array, and access that array each time mouse enters? Any advice would be much appreciated :) My jQuery code looks like this: $('#imagehover').on('mouseenter', function()
Problems with dropdown calendar in Safari
I have been using a jquery work around for a datepicker which until today has been working perfectly. Suddenly, it has stopped functioning, so that the drop down calendar no longer appears. The code that I have used for the date picker is as follows: <script type="text/javascript"> var datefield=document.createElement("input"); datefield.setAttribute("type", "date"); if (datefield.type!="date"){ //if browser doesn't support input type="date", load files for jQuery UI Date Picker
css problem. datepicker input box border missing and calculate button missing fill-in image.
My datepicker works fine with my old css. but with my new css the little black lines that outline the date input box are not displayed and the calculate box is incomplete. Do you know how to make this right? http://kalamazooalanoclub.org/2019better.php *{ margin:0; padding:0; border:0; } #wrapper { width: 790px; margin: auto; margin-top: 12px; } #header { height: 140px; background-image: url(logo.jpg); } #menu { width: 200px; float: left; padding: 10px;
navigation link clicks hide/show button when loaded ajax loaded
Hi, I currently have click functions for my navigation links to show and hide a button based on what is clicked but some pages load (utilisation) loads via ajax and therefore I need to hide the button until it's loaded. Can anyone help me out here please? Thanks $( "#administration, #history, #vehiclereport, #plantreport, #trailers" ).click(function() { $(".btn-toolbar-image").hide(); }); $( "#fleet, #fuel, #improvingbehaviour, #safety, #report, #summary, #trend" ).click(function() { $(".btn-toolbar-image").show();
clone repeats multiple times if a class but works properly if an id
Hi, I am trying to clone some html after each driver-report-driver class name, this works fine if I target the name as an ID of report_topper_head but it repeats multiple times between if it targets a class of report_topper_head Problem is, I can't have the same ID name throughout my code $("#report").click(function() { $(".report_topper_head").clone().insertAfter(".driver-report-driver"); });
using singleton to replace $(this)
Hi: I hope to implement an singleton to replace the usage of $(this); following is my code snippet jQuery.single = (function (element) { var collection = jQuery([1]); return function (element) { collection[0] = element; return collection; }; }); $('#btnTestSingle').bind('click', function () { var html = jQuery.single(this).next().html(); console.log(html);
Get top style from dynamic content
I'm trying to get a top style that is being applied to dynamic added content and assign to an image. I've built a function w/ Timeout to check if it's parent exists and then get the css(top) value. It's firing now, but I can't assign the top style to the image margins. function addGalleryDone() { var emarck = $('.justified-gallery .pro').first().find('img').css('margin-left'); if (($('.justified-gallery').length) && (emarck != '0px')) { console.log('Galleryload Done');
jquery 3.4 - Replacement examples for deprecated positional selectors (:first, :last...)
Hello, On the 3.4 version, selectors ":first, :last, :eq, :even, :odd, :lt, :gt, and :nth" are marked as deprecated. http://blog.jquery.com/2019/04/10/jquery-3-4-0-released/ But I can't see anywhere examples of functions we should use instead... Can somebody point me out some doc on the subject, or give me some examples, please? For :first and :last, I can use .first() and .last(). But what if I want the opposite, with 'no'' ? Like: var $dom = $('input[name^="field_001_"]:not(:last)'); And what methods
toggle sibling
Hi, I'm trying to show a ul when a h3 is clicked, below is the code I have, hope someone can help: <div class="footer-menus">
<div id="footer1">
<h3></h3>
<ul>
<li></li>
</ul>
</div>
<div id="footer2">
<h3></h3>
<ul>
<li></li>
</ul>
</div>
<div id="footer3">
<h3></h3>
<ul>
<li></li>
</ul>
</div> </div>
<script type="text/javascript">
$(document).ready(function() {
$('.footer-menus h3').click(function()
Uncaught TypeError: $(...).dialog is not a function error in jQuery3.3.1
Hi JAKE, I have the following error appearing in my page using jQuery 3.3.1 Uncaught TypeError: $(...).dialog is not a function at <anonymous>:1:14 at m (jquery.min.js) at Re (jquery.min.js) at jQuery.fn.init.append (jquery-3.3.1.min.js) at jQuery.fn.init.<anonymous> (jquery-3.3.1.min.js) at z (jquery-3.3.1.min.js) at jQuery.fn.init.html (jquery-3.3.1.min.js) at Object.<anonymous> (jquery-3.3.1.min.js) at u (jquery-3.3.1.min.js? at Object.fireWith [as resolveWith]
Javascript Afficher DIV Jquery
Bonjour, Avez-vous une idée pour faire afficher ma DIV "Transparent" (Jquery) via ma fonction test() en javascript ? merci d'avance <!doctype html> <html> <head> <meta charset="utf-8"> <title>Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
Ajax form does not execute on success
Hi, I have a form that uses ajax. It is supposed to execute an addclass and append to a div upon success. The code submits the form, but does not execute on success. $("form#mc-embedded-subscribe-form").submit(function(e) { e.preventDefault(); $.ajax({ type: "POST", url: $(this).attr('action'), data: $(this).serialize(), // serializes the form's elements. success: function(data) { $('#newsletterform').addClass('success').append('<div class="thanks">Thanks for Subscribing!</div>'); } }); }); What's
Language switcher is not displaying in Firefox browser with jQuery 3.3.1
Hello, I need your help on this, please. I have an application with PHP, Javascript and jQuery. I have upgraded jQuery from 1.12 to jQuery 3.3.1 version using jQuery migrate plugin. After upgrade the menu worked fine(as I could tested it) but now menu is appearing randomly in Chrome and non displaying at all in Firefox. Debugging app, pausing on exceptions finds this error stack: SyntaxError: '*,:x' is not a valid selector php code: $languageswitcher = ''; if (LANGUAGE_SWITCH && empty($logoutontop)
Change calendar language
Hello friend I really need to change the language of my panel but I've spent hours trying and I can not. Can someone please help? fullcalendar.js https://drive.google.com/open?id=1xktFUmkxgbzxLwVnCdZOFlsyHmmccPvW Page that loads calendar manage_holiday.php https://drive.google.com/open?id=1IL7eNKh1c7h_qQNGbzgC0zLB-HgvB3Ya
help with image
Tìm hiểu về tương lai của tiền điện tử Tiền điện tử là một loại tiền tệ hiện đại, dù mới xuất hiện nhưng đã thu hút nhiều sự quan tâm của người tiêu dùng và giới chuyên gia tiền tệ. Tương lai của loại tiền này như thế nào vẫn còn là một dấu hỏi. Bài viết sẽ cung cấp một góc nhìn về tương lai của tiền điện tử. Tương lai của tiền điện tử như thế nào là vấn đề được nhiều người quan tâm. Mục đích ra đời của tiền điện tử Tiền điện tử hay tiền ảo là một loại tiền tệ hiện đại, được quản lý hoàn toàn dựa
jquery validation
Hi my name is frank, I need help to solve a validation problem. as I fill up partially my form at the first ok field checking stops, leaving fields unchecked, also event.preventDefault myght be used in a wrong way, thank you, frank
Youtube Integration doesn't show for the first time on my website?
Is this a jquery problem or anything else? As soon as the page open, it doesn't load the video for the first time. Then after refreshing it, its shows. It happens with lot of my pages! Posting the issue below. If you didn't find the issue in the given link, then try someother pages. you'll know the issue!! Here's the issue: https://www.guitaa.com/chords/wttsmy-kucaimars-jawab-acoustic
jquery-ui autocomplete
Hi, I am using MVC and asp.net core. I'm trying to display an autocomplete, retrieving an Employee Object (Employee Id, Last Name, First Name) from database and returning json. The dropdownlist is returning [ undefined ] - [ undefined ]. How can it return the right output? Thanks, tinac99 View <script type="text/javascript"> $(document).ready(function () { $("#RequestingEmployeeFName").autocomplete({ source: function (request, response) { $.ajax({ url: "/Employee/SearchEmployee", type: "GET", dataType:
Uncaught (in promise) null with invisible recaptcha V2
HTML: <form method="POST" name="contact" class="formContact" id="formContact"> <div class="col-md-12"> <h1><label class="col-md-12"><?php echo $this->lang->line('index_contact_contact'); ?></label></h1> </div> <div class="col-md-12"></div> <label class="col-md-4">*<?php echo $this->lang->line('index_contact_name'); ?>:</label> <div class="col-md-8"> <input type="text" name="naam" class="form-control" placeholder="<?php echo $this->lang->line('index_contact_yname');
If have a page id="#notes" what selector should put in the below to load content in a div in page #notes either of these events
If have a page id="#notes" what selector should put in the below to load content in a div in page #notes either of these events happen in page before show and show... ? pagecontainerbeforeshow pagecontainershow Code examples: Initialize the pagecontainer with the show callback specified: 1 2 3 $( ".selector" ).pagecontainer({ show: function( event, ui ) {} }); Bind an event listener to the pagecontainershow event: 1 $( ".selector" ).on( "pagecontainershow", function( event, ui ) {} ); Code examples:
How do I remove all classes that start with a certain name?
Hello, Im have tr element that have classes assigned to them. There can be any number of classes. How would I remove all classes starting with "itemnx" I have this but I dont believe it'a working. $("tr.itemno").each(function (x) { $(this).removeClass('*[className^="itemnx"]'); }); <tr class="itemno itemnx1 itemnx2 itemnx3"></tr>
Using double and single click.
Hi, I have some problem using double and single click. this is my fiddle: https://jsfiddle.net/tL37zkpe/1/ Thanks in advance Tegatti
Customize the styles in table cells
Hi, I need to change the background color and the color text in tr after calling php file with ajax. It works fine if a insert the number of the row where to change style css. But it not works if I give an index. This is my code with index (i), The value of the variable i is 5 (sure!!): var i = $("#cont").val(); $('#miaDisp tbody tr:eq(i)').css('background-color','green'); $('#miaDisp tbody tr:eq(i)').css('color','white'); and with number (5): $('#miaDisp tbody tr:eq(5)').css('background-color','green');
jquery blueimp fileupload issue - uploaded file being overwritten by subsequent upload?
Hi Team, I have been working on a fileupload solution which should allow up to 3 files to be uploaded per button. I use an imported javascript file, and a bootstrap modal window to manage the user interface. It has taken me quite a long time to sort it all out, and just as I near the finishing post I am hit with this issue i.e. it looks like each uploaded file overwrites the previous one in my "uploads" folder. I have a feeling its something simple but I cannot deduce what combination of options,
Manipulation Dom html(html)
how can I get input from a table in html rendered inside another html, function html (html), after rendering I can not get the value inside the input, these values are coming from the database, I see through the browser debug that does not it enters inside my function where it has the method
Getting data from a range of values
I'm trying to get a range of numbers depending on what the user inputs. I have customer.js which has the customer name and shoe size and what I would like is to get a range of shoe sizes depending on what the user puts in. For example. A user puts in the first textbox 5 and in the second textbox 9 I want the customers that is between 5 and 9, but also including 5 and 9 to be displayed. I've only gotten as far as this. my html <form id="shoe_size"> <label for="size">Enter sizes</label> <input
Hide PDF download button in firefox!
Hi, I hide the PDF download and print button in chrome browser using this code #toolbar=0. It works fine in Chrome browser only. but i need to hide those button in Firefox browser also. so please someone help me!. Thankyou.
focus event not working for select2 search text box?
I have a website that uses select2 and jquery 3.3.1. When opening a select2 dropdown, the search-textbox receives the focus so that it's easy to start searching. On mobile devices, this is annoying because it makes the virtual keyboard popup. A workaround I found is the following: $(document).ready(function () { window.select2typing = false; $(document).on("focus", ".select2-search__field", function () { if (window.select2typing == false)
selected option in drop down menu checks or unchecks checkbox value
I apologize for the confusing title. In the code below, my goal is to, when an option is selected in the drop down menu, the options class needs to check the matching class in the checkbox array in the next div. So if the first option is selected in the drop down menu (Academic accommodation request), both the first and second checkboxes (Test 1a and Test 1b) need to be checked. I have had success grabbing the title attribute in select options but have not had much luck grabbing selected option
why this empty space - css is not fixed auto by jQm?
jQm 1.4.5 Why in collapsible widget between items, in header (double line with empty black color) and footer there is empty space like image attached... ? In footer one item is also Not aligned with other footer buttons... well? <link rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700"> <link rel="stylesheet" href="../css/themes/default/jquery.mobile-1.4.5.min.css"> <link rel="stylesheet" href="../_assets/css/jqm-demos.css">
CSS Border Animation
Hi, I have a css border than I am animating around a box. As shown here https://codepen.io/jeremydricard/pen/MdPaRY there are 2 animations. The first one loops an infinite border around the box every 5 seconds in a circle (or square) motion. The second is triggered when the mouse hovers on top of the square. Starting the second animation which just acts like a focus and highlights the square and the first animation is removed. Upon when the box is removed from hover state it should go back to animation
Next Page