Why is the jquery not firing from inside this if statement?
I'm working with this media query: @media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: portrait) { .my_span{font-size=2.5em} } I want to manipulate the element when being viewed by a mobile device. I check for resizing here... $(document).ready(function() { checkSize(); $(window).resize(checkSize); }); then I try to show an a simple alert if the statement is true.. function
Getting ID of selected Table Cell
Hello! I was wondering if anyone would be able to help me with an issue I am having. I have a "custom" Color picker on one of my forms. It is just a table with td cell background a certain color. When the user clicks on a td, it highlights as the selected color. What i need to do is get the id of the table cell that has been clicked and and set a hidden inputs value to that id value, so that when I check to see which "color" was selected, I can just reference the td ID. So far I have: $('td').on("click",
Database to maintain data
Dear Sir I located calendar Jquery http://prajaktasoftware.com/vaibhavtravels/calendar.html suitable for me to use for my project i found event code as follow: pls help me to know 1. Is this JSON code in case of update / Add 2. I need to update/Add to Database and the create this JSOn code from database again so as to maintain update status of the calender --------------------------------------------------------------------------------------- events: [{ _id: 1, title: 'Michigan
Zooming background image
I have a Div that has background image I want when I mouseenter in this Div the back ground will be in zooming in
Adding Second Date Format to jQuery UI Date Picker is Not Working
I have to set the datepicker date format like dateFormat: "yy-mm-dd", and this is because I am getting data from database in this format. Now I want to display any changes of datepicker in this format 'DD, d MM, yy' what I did was onSelect: function(){ var formattedDate = $('#datepicker').datepicker({ dateFormat: 'DD, d MM, yy' }).val(); alert(formattedDate); } but the datepicker still returning the data in "yy-mm-dd" format can you please let me know how to fix this? Demo
Skip Disabled Dates and Select/ Set Next and Prev Enabled date in Set Date
Can you please take a look at This Demo have a UI datepicker which has only two days Wednsday and Saturday enabled now I need to set the selected value in datepicke not based on date but based on if the item is enabled or not. For example, on loading, instead of showing today as selected date, highlight the next available day and ... A- On load Set the First available enabled Cell (Not Today) as selected date B- On #next click set the date of datepicke to the First available (enabled cell/date)
How to have Sortable placeholder always in starting list while dragging outside any list
Let's suppose I have some lists connected with Sortable. I want to achieve this kind of behavior: when I'm moving an item, dragging it in an html region out of any of those lists, I want the placeholder always to be shown on starting list. Even if I dragged over another list (but not dropped). I'm asking this because, at the time, the placeholder is always placed inside the last dragged over list. Even if I release the drag outside of it. In that case the item should be returned to starting list.
How to execute mass reset/re-style ?
We all know by now that upon updating of new data for specific controls, we can execute: $("#div_id").listview(); or $("#div_id").controlgroup(); or etc... to "refresh" specific components. But that could be too much work in the long run, I wish there is a single "Listen up JQuery Mobile ! All data has been updated and I am not going to bother telling you which are the components that need to be updated or restyled, just restyle everything...EVERYTHING !!! NOW !!!" button. Is there such a function
how to change text dynamically svg
hello i have structure <g node-id="itemdat-1" style="opacity: 1" transform="matrix(1,0,0,1,-170,115)" class="node" level="1"><rect x="0" y="0" height="55" width="150" fill="#039BE5" stroke-width="1" stroke="#aeaeae" rx="5" ry="5"></rect><text width="230" class="field_0" style="font-size: 18px;" fill="#ffffff" x="75" y="35" text-anchor="middle">Module 1</text><g data-edit-id-filed="itemdat-1" transform="matrix(1,0,0,1,130,5)">I want to change the text in balise <text> I searched on the net but I didn't
Multiple HTML5 audio players with playlist. First playlist works, second playlist loads in a new window
I have a working HTML5 audio player with a playlist but problems occur when having multiple players with a playlist. The first player with a playlist works but when I add a second playlist, the audio file is played in a new window. I don't know what to do and I really need help. I've looked online for a solution and couldn't find one. var audio; var playlist; var tracks; var current; init(); function init() { current = 0; audio = $('audio'); playlist = $('#playlist'); tracks = playlist.find('li a');
on("keyup paste", function) not updating in Microsoft Edge
Hello, The following js works great. When I type in the first_name and last_name fields, the combined data is copied into the hidden url_title field. When I update either of these fields, the updated data is also copied into the same url_title field...in every browser except Microsoft Edge. I am using jquery.min.1.11.3.js Any ideas for how I can remedy this would be greatly appreciated! Thanks! Peter T $(document).ready(function() { $("#first_name , #last_name").on("keyup paste",
Issues with Datepiccker and js files
I want to load the js files onto my server. Using your server is very slow. The following are required: <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> However, when downloading from JQUERYUI, jquery-1.12.1.js is not included. Using a previous version like 1.11.2 doesn't work. The CSS and jquery-ui files that came with the download
A question about the impact may be caused by table's clientWidth/Height behavior change of Chromium
Hi, I'm a contributor of Chromium Project. I made a change of https://chromium-review.googlesource.com/c/chromium/src/+/1763510 which make table's clientWidth/Height match to its offsetWidth/Height. The corresponding issue page for that change is https://bugs.chromium.org/p/chromium/issues/detail?id=978019. In case of Firefox, its already has that behavior, and that is what we intend to introduce by the change above (In perspective of interoperability, it would be good I think). I got a positive
adding to an anchor with no ID or Class?
I have some html like <div class="tf-profile-photo tf-profile-photo-extra-large"> <a title="Rob Merritt" href="/imagethumb/835519470000/524/0x0/false/Rob%20M.JPG" target="_blank"> <img width="156" height="156" class="tf-miniprofile-user " src="/profileimage/835519470000/524/158x158/True/558,-31,3006,2417/Rob%20M.JPG"> </a> </div> that I wand to look like <div class="tf-profile-photo tf-profile-photo-extra-large"> <a title="Rob Merritt" href="/imagethumb/835519470000/524/0x0/false/Rob%20M.JPG"
Setting Next Closest Day in jQueru UI Date Picker
Can you please take a look at this demo and let me know how I can select /set the next closest Wednesday if today is (Sunday, Monday, Tuesday, and Wednesday OR Saturday (if today is Thursday or Friday and Saturday) $( function() { $( "#datepicker" ).datepicker({ beforeShowDay: function(dt){ var day = dt.getDay(); return dt; } }); } );
how to make link count value ready to UPDATE mysql database.table
For this question I use almost the same example taken from this topic. https://forum.jquery.com/topic/a-href-link-click-does-not-open-in-new-window <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Click Counter</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script type="text/javascript"> $(function(){ $('body').on('click', 'a', function(event){ var currentNumber = $('#currentNumber').text();
Jquery unable to accept getelementbyid value from previous function
Dear Friend, I have two functions and i am running one by one via button 'SUBMIT DATA'. I am using php and ajax also. 1. check_all_data() >> checking all the data entry and error is displaying in <DIV> element for individual data 2. save_all_data() >> it is saving data if there are all valid data. issue 1. But is is not doing properly. 2. whenever I am going all the data entry field one by one one the system is doing properly. I am sending herewith the functions, kindly guide me in this regard.
How to use a callback in Ajax
Been struggling to understand the docs for this for 24 hours. Unable to resolve it. Posted elsewhere with no luck. In fact the code I got provided caused the alert to loop continuously (maybe because the function is called when the page loads?). I am trying to find out if a text file (note) exists on the server. I want to return "yes" if it does, "no" if it does not. I am able to get this into an alert successfully (for each of the 7 occurrences) but I want to return it back into the originating
make jquery value available in php
hello, im quite new to jquery so i guess my questions are beginners questions. I have a piece of jquery for getting the value of a slide button with html range. I want the output in php available. But for me it is not clear how jquery sets the output of the range slider in a variable? And I also dont know how to post (like html $_POST) this variable to the php server? what steps should I follow to get the value in a 'default' piece of code ? code: <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
slide
Hi this is my fiddle https://jsfiddle.net/cfrank65/k1gp9y5e/4/ the validation still not working however it was working before. thank you, frank ps: regarding slide, I try to add margin or padding and there are problems, it is not working properly., somehow it looks strange, cards not finding there place. thank you, frank
a href link click does not open in new window
I modified an online example ( found here : http://jayblanchard.net/basics_of_jquery_ajax.html ) The idea is counting the number times people click on a link (the example is about a button click) I modified it and the count clicking works but no new page is opened. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Click Counter</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script type="text/javascript">
form validation
Hi regarding my problem, I post my code on jsfiddle, sorry for late answer. also I have another problem, can I post it? thank you, frankhttps://jsfiddle.net/cfrank65/wx963ytp/2/
how to use split with two different inputs
i have any question, like me there are two inputs 1. no_po = BMM / TRX001 2. no_po = BMM-RF-1 this is what I use 1. the code I take by using split or splitting data in two and I take it in the first array, 2. how can I get the second number from the second no_po or the second array View <div class="form-group row"> <label class="col-lg-4 col-form-label" for="reference_code">Nomor PO<span class="text-danger">*</span></label> <div class="col-lg-6"> <select name="reference_code" class="form-control"
jQuery with ajax and JSON not returning fields
I have a PHP program that has a jQuery on a page to run a function and return fields if record is found. I cheecked to make sure it has the: java script for: <script type="text/javascript" src="/websmart/v8.9/javascript/jquery.min.js"></script> and the javascript to run the funtion: <script> $(document).ready(function() { var select = $("#CCARDNO"); select.blur(valccmsn); }); function valccmsn() { $.ajax({ type: "POST", url:
How to define and use ajax URL
I am trying to create conditional URL for Ajax data pull, but it does not work. Any ideas why that is happening? My code looks like below. $("#valink").click(function () { $("#valink").removeClass("active"); var key = $(this).text(); $(this).addClass("active"); var currRoute = "../content-url/url.php"; if(key === "Books") { currRoute = "../content-url/url1.php"; } else { currRoute = "../content-url/url2.php"; } $.ajax({ type:
toggle
Hi, I have a hidden search form that I want to display when my search button is clicked, and closed when the close button is clicked. Here's a link to my site - REMOVED And my script - <script> $("#searchbutton").click(function(){ $(this).parents('#search-container').slideToggle('slow'); }); $(".close").click(function(){ $(this).parent('#search-container').slideToggle('slow'); }); </script> Hope someone can help..
how to append json in under json
hello I have succeeded in creating JSON module.data = data; var namodule = name; var nameofmodule = { "id":id, "namodule": namodule, "pid":pid } module.data.push(nameofmodule); console.log(module); but it's just missing {{formation, Module1, Cours1, Chaiptre1]) this my code jsfiddle.net/jaafar/ahk4xpmb/203 in the final i want this {id: "4", namodule: "Module 1", pid: "1",i d: "7", namcours: "Cours 1 ", pid: "4 ,id: "10", namodule: " Chaiptre 1", pid: "7"} you will find attached here also diagram
jspdf autotable blank cell
i m using jsPDF auto table plugin i need to set null in the cell while printing on pdf where html table contain   here is code but its not inserting null <script> function generate() { var doc = new jsPDF('l', 'mm', "a4"); var res = doc.autoTableHtmlToJson(document.getElementById("printJS-form")); // doc.autoTable(res.columns, res.data, { margin: { top: 80 } }); var header = function (data) { //doc.setFontSize(10);
How to change style values with a specific value
Start with a sample: <body> <div style="max-width: 900px; .....">....</div> <div style="max-width: 1020px; margin-left: auto; margin-right: auto; ....."> ... </div> .... </body>How can I change the value of max-width: 1020px to max-width: "95%" for all <div> elements? div panes with other (or no) max-width values should remain untouched. Furthermore only those div panes should be considered which are immediately below (=child) of <body> (=no deeper childs elements) How can I code this in jQuery?
iFrameSizer.min.js error
Hi, I use IFrameResizer and after upgrading jQuery to V. 3.3.1 I get the following error: [iFrameSizer][Host page: import1] IFrame has not responded within 5 seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ingored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning. k @ iframeResizer.min.js j @ iframeResizer.min.js a @ iframeResizer.min.js setTimeout (async) k @ iframeResizer.min.js u @
Pre-selecting radio button based on database
I'm trying to find the code to pre-select a radio button based on the contact record. For example, we have a list of Major League Baseball playoff contenders and want to display a radio button list of National League playoff contenders: Los Angeles Dodgers St. Louis Cardinals Atlanta Braves I've mapped a variable to the database, called natLeagueFave. How can I set it up so that it selects the radio button? var natLeagueFave = <span class=dbrecord >Favorite Team</span> Form <input type="radio" class="custom-control-input"
Failed to upload file using jQuery ajax to targeted API
Hi, I am failed to send a POST request using jQuery Ajax via targeted API. Please find below code, When do a console, it straight go to failed condition. Please help. var fd = new FormData(); var files = $('#oltnpefile')[0].files[0]; fd.append('upload_file',files); console.log(files); $.ajax({ url: '/api/v1/olt/uploadfile/', type: 'POST', dataType : "json", data: fd, contentType: false, processData: false, success: function(response){ setTimeout(function(){ console.log(response);
problem with animate() and " + "
Hi folks, I'm trying to consolidate a lot of individual functions which scroll the content of a div. Here's an example: $('#updown').animate( {marginTop:'-40rem'}, 2000); I've tried several versions of function upIt(n,t) { $("#updown").animate( {"marginTop:" + " 'n' " "rem"}, "t"); } but get error messages about "+". What am I missing ? cheers.
How to show a background image outside of ui-page, in side columns
I try to reuse my jQuery Mobile Website for smartphones now for big screens. I could shrink the main Content column/space, so I think its easier to read. But on both sides there is now an empty space, where I would like to show a backgroundimage. I tried to use the body tag, ui-page,and body.ui-mobile-viewport I could get a background for the middle column, the content space, what is not what I want, but no background for the two side columns. Any idea how to show a background image in the side
Modal
<script> $(function(){ var appendthis = ("<div class='modal-overlay js-modal-close'></div>"); $('a[data-modal-id]').click(function(e) { e.preventDefault(); $("body").append(appendthis); $(".modal-overlay").fadeTo(500, 0.7); //$(".js-modalbox").fadeIn(500); var modalBox = $(this).attr('data-modal-id'); $('#'+modalBox).fadeIn($(this).data());
Consume php ajax POST call for registration
How to get all error responses like password dismatch or password not more than 6 chars. or email is invalid. My ajax: // process the form $('#employer').click(function(e) { // get the form data // there are many ways to get this data using jQuery (you can use the class or id also) //Personal account var image = $("#avatar").val(); var first_name = $('#first_name').val(); var last_name = $('#last_name').val(); var email = $('#email').val(); var password = $('#password').val();
move item with specific element drag and drop jquery
hello I have list on the left , when I drag element it must be moved to element matches my example https://jsfiddle.net/jaafar/9xvj67bd/42/
move item with specific element drag and drop jquery
hello I have a list on the left and each item must move to that place i attached <a href='https://www.casimages.com/i/190819010728944231.jpg.html' title='Mon image'>example</a>
Appending using formData.append returns undefined
hi guys I am uploading an image using formdata append, which works well How do I append extra values from a textbox or hidden field ? Here is my code, which returns undefined function AjaxUploader(input) { var formData = new FormData(); formData.append('file', input.files[0]); /// This works var token = $('#__RequestVerificationToken').val(); formData.append('__RequestVerificationToken', token); /// this returns undefined ,
How to Load an external jQuery File
I am trying to learn how to create my own external jQuery file to create a table. I found some code which looks good and have found out how to create the external file. I have added it to the head of the html page under the line that adds jQuery. Like this: <script src="../js/jquery-3.4.1.min.js"></script> <script src="../js/my_table.js"></script> I get no errors in the console. I believe I can add some code to the head to call it on (document).ready and then add a div to the page. All my efforts
Next Page