Refer to nested text pattern not working? Problem ::after tag
Assume I have (simplified) the following code: <div ...> other text to keep <div ...> <p> <em> <a ....> .....foobar.... </a> </em> </p> ::after </div> </div> How do I remove all (ONLY !) innermost <div> which contain the pattern "foobar"? Since ::after comes after the target elements it should not be relevant. correct? $("div:contains('foobar')").eq(($("div:contains('foobar')").length) - 1).css("display", "none"); does not work
Link manipulation (DOM-based) - JQuery Mobile
Hi all, we use jquery.mobile-1.4.5.min.js in our application. Burp scan found a Link manipulation (DOM-based) vulnerabilitiy in JQuery Mobile sources: Link manipulation (DOM-based): Issue detail The application may be vulnerable to DOM-based link manipulation. Data is read from location.pathname and passed to the 'href' property of a DOM element via the following statement: e[0 ] .href= g|| location.pathname from : return e.length?g=e.attr("href"):e=f=a("<base>",{href:d}).appendTo("head"),b=a("<a
how to add a child node?
hi all based on this sample: http://jsfiddle.net/jamiguel77/Lfy2bc7t/34/ how to add : 1) Final Node? 2) Right Node? 3) a Node? my Root Node is (+) here the start code: http://jsfiddle.net/jamiguel77/9vmugf5r/12/ thanks
data-application font of an external script only used for the first display
Sorry for my English I test on MacOs 10.13.6 and Safari 12.0.3 I write a multipage web app with only one query mobile file : main.html All the js and css files are in the head (see below). 2 pages are dynamically updated with : $(document).on('pageshow','[data-role="page"]',function(event){ switch(event.target.id){ case 'dictee' : ... $(document).ready(function(){ call to abc2svg-1; // external script }); ... break; case 'correction': ...
Re-opening selectmenu programatically is triggering the select event undesirably
I'm use mouseenter and mouseleave events on the container element to trigger the opening and closing of selectmenu. But somehow the re-opening is triggering the select event undesirably. I don't want the select event to be triggered when I re-open the selecemenu. Here is how to reproduce the issue: Move mouse cursor onto the selectmenu button, and the selecetmenu will open automatically. Move mouse cursor onto random options. Move mouse cursor out of the selecemenu, and the selectmenu will close
Displaying an Image Link for a Limited Time
I'm trying to get an image link to display for 24 hours on my site. This is what I have so Far, what am I doing wrong? <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script type="text/javascript"> window.setInterval(function(){ var current = new Date(); var linkOneStartDate = new Date("March 6, 2019 12:57:15") var linkOneExpirationDate = new Date("March 7, 2019 12:58:00") if (current.getTime() > linkOneStartDate.getTime()) && current.getTime() < linkOneExpirationDate.getTime())
How give the default site after a date selection
Good day all I am complete a small application with jquerymobile. On a page, I add a tab with the possibility to select date. On a smartphone, after selecting a date, the browser get a bit large when the date can be select. When it's done, I click on close button to close the panel. The problem is after the browser keep the same size and I have with my finder make the correct size. Is there a way to tell to jquerymobile or whatever, the give the default size?? Many thanks
How can I correctly add the lib with jqueryUI
Good day, I spend a lot time to make my jquery mobile web site, and I particularely spent time to understand with the jquery UI, change my layout. I need to add a datepicker, this is the reason why I added (only because the datapicker layout) <script src="js/jquery-ui-1.12.1/jquery-ui.js"></script> <!-- <link rel="stylesheet" href="css/jqueri-ui-1.12.1/jquery-ui.css">--> But since I uncomment the jquetyui CSS file, the content of my web site change. Then I wonder how can I use it. Is there a way
Tabs Widget possibility of Prev/Next buttons
Using a standard JqueryUI Tabs widget is there a reasonable way to create buttons on each tab to go prev/next among the tabs? I am creating pages with several tabs for user input. I would ideally like to enable the user to have prev/next buttons; additionally, I would like to add the tabs they have visited to a collection so that when they go to click "Submit" code can direct them to the first tab of the page not in the collection of visited tabs.
rounding to 2 decimal places
i have a little script that counts the total of a column in a table $(function () { var TotalCoreProd = 0; $("[id*=col01]").each(function () { TotalCoreProd = TotalCoreProd + parseFloat($(this).html()); }); $("[id*=TotalCoreProd]").html(TotalCoreProd.toString()); }); problem is, it's outputing the value with about 20 decimal places. i need to round this to 2 decimal places. i believe ".tofixed(2)" should be used, but no matter where i try and place it, it ends up causing the code the fail completely.
Ajax POST not successful
I'm trying to create ajax script where the user clicks a button e.g. Product Type Alpha Product Type Beta It then sends that response via ajax to a new page and remembers what the user selected but now asks more questions. I'm trying to do the first stage, but having no luck; jQuery(document).ready( function($) { jQuery('.sectors .sector_btn').click(function() { var myVar = jQuery(this).attr('name'); jQuery.ajax({ type: 'POST', url: location.origin + '/filter-page/?product_type='
check each LI has a class "selected"
Hi, I have a UL LI <ul class="selections"> <li class="check-option ok selected"> <div class="selections-text">Ok</div> <div class="selections-icon"><img src="/img/icons/check-tick.png" class="check-icon"></div> </li> <li class="check-option"> <div class="selections-text">Advisory</div> <div class="selections-icon"><img src="/img/icons/check-circle.png" class="check-icon"></div> </li> <li class="check-option"> <div class="selections-text">Defect</div>
jQuery ajax, a bit confused
I'm using jQuery 3.3.1. Reading through the page on .ajax() I was a bit confused on some things. Currently I'm using code like this. I stripped out some code to make it more readable. $.ajax({ method: "POST", dataType: "json", url: "includes/contactAjax.php", data: { action: "getCompanyContacts", companyid: $('#project_company').val() }, success: function (data) { }, error: function (jqXHR, textStatus, errorThrown) { console.log(textStatus + ' - ' +
Why won't this ajax post work
I'm not getting any errors.. I get Start and End in my console log. $(document).on("click","#submitrfp",function(e){ console.log('Start'); var P = $( "#apurchase" ).val(); var L = $( "#alease" ).val(); $.ajax({ method: "POST", url: "scripts/order-aircraft.php", data: { Purchase: P, Lease: L} }) .done(function(result) { console.log('>>' ); }) console.log('End'); });
Autocomplete source file
Hello, I am trying to add the Autocomplete feature to my website. It works fine if I list my data right after the "source:" tag like below, $( "#tags" ).autocomplete({ source: ["Item 1", "Item 2"] But I would like to use a local file as the data source. When I put the same data in a local file and put the file name as the source as in the example below, the autocomplete does not work. $( "#tags" ).autocomplete({ source: "data.php" Can anyone help me with my problem? Thanks, Todd
Making Fields Required in this Google Forms Submitter Script
Hi, I came across the following script - and it's been awhile since I looked at and don't remember where I came up on it. GitHub I believe. At any rate, I was revisiting it and I need some help. The form submissions work. When someone fills out the form results go to the Google Form as anticipated. However, none of the fields are currently required. That's what I need help with. Where in the following script would I check if certain fields were filled out and report back to the user on submit? And
button only activates after second click
I am not sure why that when I click my button it only opens the next page by double clicking, I need this to be a single click HTML <div class="button mover" id="contact" data-href="{{ contact_link }}" data-toggle="tooltip" data-placement="top" title="go to our contact form" id="contact_ultra">CONTACT ULTRA</div> JQUERY var touch_contact_start = false; $("#contact").on("click touchend", function(){ {% if app.config.mode == 'dev' %} console && console.log("touchstart on contact
Set a cookie for addClass and removeClass
$(".div1").click(function (e) { e.stopPropagation(); $(".div2").removeClass("active"); }); How I can set a cookie so I don't have to remove class all the time? I want it to be hidden even after reload.
Background color won't reset after mouseOut
Hello, I've my portfolio online here http://mircofragomena.com As you can see every time you hover on a menu item the background changes, but on mouse out the background won't go back to the original one, but keeps the color of the last hovered item. It's the only bug so far and I'd like to fix this as I'm jobless and I've to share my portfolio with clients and companies :D This is the JS that changes the background color, and should bring it back to its initial one on mouse out: $(function() { //
On load and on resize?
How to make it work like it should be working on load and on resize??? https://jsfiddle.net/Vixcal/vzhc5tn8/30/
How to add a localstorage for checkbox?
<input type="checkbox" id="test" name="" value="" checked> $('#test').change(function(){ if($(this).is(":checked")) { $('.sb').removeClass("dis"); } else { $('.sb').addClass("dis"); } }); So I have a checkbox with toggle function. If checkbox is checked it removes .dis class. Could you help me with making a localstorage for this function? And also, can I make SAVE and RESET buttons? So it works only after saving the options.
datepicker months and years does not popup
When trying to fill out event form, the date and month does not popup. Even if you manually type the month and date within the form, it will not work still.Here is a link below to the form. What seems to be the problem? http://theminorityeye.com/tmecommunitycalendar/submit-your-event/
JSON.parse: unexpected character at line 1 column 2 of the JSON data
This seems to be a common "problem" but i could not find a solution somewhere else, so im asking here. I get this with ajax from an flask app, which seems to be valid json (at least to me). {
"payload": {
"data": [
10,
267,
34,
376
],
"labels": [
"NEW LPARS",
"ACTIVE LPARS",
"DISABLED LPARS",
"ALL LPARS"
]
}
} The jquery part which is meant to draw a simple Chart.js Bar Chart. // top bar chart begin $(document).ready(function(){
Unable to get handleIndex of jQuery Slider on change
Hi, I have slider with 2 handles. I want to get which handle was changed. I see in jQuery documentation that we can use change event and then ui object to get handleIndex. I have seen the examples. They work fine. But with my slider, it is not. Here is my slider: var slider = $("#slider").slider( { id: "slider1", min: 0, max: 40000, step: 100, value: [${val1}, ${val2}] } ).on('slide', function ( event, ui ) { //some work here. }).on('change', function ( event, ui ) { // This
What causes the load of so many jquery-javascript files
I am using https://www.vakantiehuisverhuur.eu/jquery-ui-1/development-bundle/ui/jquery.ui.core.js and https://www.vakantiehuisverhuur.eu/jquery-ui-1/development-bundle/ui/jquery.ui.datepicker.js in order to show a month calender for booking a holiday home. Using SpreedInsights of Google I see that www.vakantiehuisverhuur.eu loads many other js-files that I do not need as for instance widget-min, mouse-min, button-min, resizable-min, etc. It is very slowing down loadtime a my Speedscoore is less than
Anyone know about any circle progress type of plugins?
Hey, I am looking for plugin that can do show circle step progress but like a slider: Thanks!
How to get click event for an diabled html element
Hi: I try using jQuery to get the click event for an diabled html element, but it seems not work. The code snippet is following: <asp:TextBox ID="txbPerFName" TabIndex="1" runat="server" Width="70px" Enabled="false" CssClass="handleTooltip"> </asp:TextBox> $(".handleTooltip.disabled").on({ "click": function () { console.log("testok"); console.log($(this).prop("disabled")); if ($(this).prop("disabled")) { $(this).tooltip({ items: ".handleTooltip", content: "Check Item" }); $(this).tooltip("option",
Slick Slider plugin issue
Hi All, I am facing the white space issue at the end of the last slide in slick slider carousel. It would be great if anyone could help me on this. Thanks in advance.
Adding the total sum different id's and display it in a label
Hello, I am a beginner in jQuery and I try to implement the following idea. I have the following image... As you can see I have these 3 columns where based on the number of users choosed by the user at the bottom of the column a total is displayed. So what I am trying to implement is I need to add the sum of these columns (which have 3 different IDs) and to display the sum in the label called "Total" at the bottom right corner of the image. The code I have: Vanilla JS is being used to determine the
ui-resizable-se css
using 1.12.1 I have noticed that ui-resizable-se is different from the others set on the jquery ui... .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px; } any idea if this is a know issue ?
Which plugin to do graphic bar
HI , which plugin can i use to create bar as attacched pic ?
Select2 not validating with jquery-validate plugin on Jquery 3.3.1
I'm working on a project that requires me to use all the latest release of the jquery. Issue is in my form i'm validating a select2 multiselect input and this validation is working on jquery 2.2.4. but somehow in jquery 3.3.1 thats not working. i'm using following code to ignore hidden inputs of select2 inputs and as i said its working on jquery 2.2.4 HTML <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0,
"Cannot read property 'toLowerCase' of undefined" in checkbox related script
I have a set of checkboxes that are intended to toggle the visibility of corresponding form groups. <div class="form-group" id="backgrounds_picker"> <label class="col-md-4 control-label" for="checkboxes"> Select any desired backgrounds:</label> <div class="col-md-4"> <label class="checkbox-inline" for="checkboxes-0"> <input name="checkboxes" id="checkboxes-0" type="checkbox" value="blank"> Blanks </label> <label class="checkbox-inline" for="checkboxes-1">
Simple jQuery not working using .css and .js files from jQueryUI download.
The following is my basic js/jquery code, within HTML, which should 'fire' <script type="text/javascript"> S(document).ready(function(){ $( "#date" ).datepicker(); alert ("hello"); $('#my-tabs').tabs(); }); </script>However ( the alert has been added, just to check the function is running, but it's not ) my HTML is not being styled, N.B. the 'id' variable tag names are definitely right for my elements. The references to the relevant .css and .js files are as follows ... <head> <meta
DatePicker: Only display month and year
I need to be able to only show the month and year on the datepicker. Is this possible with the datepicker? Thanks
jquery unbind doesn't work
Hi, I'm having trouble getting a button to unlink for a text field. I have a small form with a "textarea" which I would like to close when I click on a button controlled by classe. Any idea what can i do?
Animate (on click) - menu with sub-menu
Hi, I want to change position of one menu element by clicking on another menu element. When I click again element back to start position. https://jsfiddle.net/Vixcal/vzhc5tn8/6/ Can someone help?!?
Runtime environment of a php function called through ajax
Hi, I call a php function with a command like : var result = $.post('/php/fonctions.php', { fonction : 'citation', data : lang}, function( data) { txt_citation.innerHTML = data.citation+" <strong>"+data.nom+"</strong>"; }, "json"); In the file fonctions.php I have a line " $_POST["fonction"]($_POST["data"]); " to call my function. I tried with " call_user_func_array($_POST["fonction"], $_POST["data"]); " but it never work I I don't know why. If you can explain me why it's good but
Ajax popluate form with data of json response
hi , sorry for english : My response of consol.log is: {id: "4", name: "Marco Rossi", email: "marco_rossi@info.it", phone: "333333333"} how can i populatemy form : <form method="post" action="#"> <input name="name" type="text" id="name" value="" /> <input name="email" type="text" id="email" value="" /> <input name="phone" type="text" id="phone" value="" /> <button class='add' type"submit"> </form> This is my ajax: $('.add').click(function() {
Jquery mobile exemple doesn't work at me (linux client and synology web server)
Hi, I'm newbie with jquery. I cut and past an example from the jquery internet site to my web server on nas synology. I see only normal result not "jquery result". What should I do to make jquery work at home? Surely a problem on my nas synology (ds415, apache 2.4, php 7 "default profile", what else?). Here after the code : <!DOCTYPE html> <html> <head> <title>Page Title</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"
Next Page