Doubts about ajax
Hello everyone ! My name is Taniguchi am im new at jquery. im developing a jquery code to get latitude and longitude from bing map rest service, i already have the code but i have trouble to understand part of it. function getcordinate(executionContext){ var attribute = executionContext.getEventSource(); var Rua = atribute.getvalue; var proxy = 'https://cors-anywhere.herokuapp.com/'; var bingURL = "http://dev.virtualearth.net/REST/v1/Locations/BR/query='" + Rua + "'&key=AlBxRwA5l41uHKOuC8_cNHwnAe8trlfDFqr5h-O7iz_jCPGaIuW4RhZZhMjOCj8C";
JSON file content assignment to global variable
Hi jQuery Forum Users, I encountered a problem, when trying to assign a json file content to a global variable. A short explanation - There is a file called test.json with some json content, which shall be assigned to a global variable using jQuery. For this purpose, I am using XMLHttpRequest. A defined function loadJSON calls XMLHttpRequest, with a callback function handling the json file content after a successful request. But the json file content is only available within the callback function
.map() argument ordering should be switched
$.map(fooArray, callback) passes arguments into the callback with the correct ordering: (value, index) $(".foo").map(callback) passes arguments into the callback with the wrong ordering: (index, value) I believe the original reason why the second one passes index first is because it is expected that the developer will just use "this" to access the element. Now that es6 lamda style functionals are being used more and more, "this" is no longer an option. Code such as the code below doesn't work because
How must I compare array field in jquery?
I have a jquery script as: <script type="text/javascript"> $(function () { $("#table").DataTable(); $( "#table_content" ).sortable({ items: "tr", cursor: 'move', opacity: 0.6, update: function() { sendOrderToServer(); } }); function sendOrderToServer() { var order_menu = []; $('tr.row1').each(function(index,element) {
FORMATT LISTVIEW
Hello I would like to format a dynamic listview with multiple lines. in the example I can enter only 3 lines but I would like to add more. How can I reduce the space around the writing
Content selection custom attributes
I am trying to extract the value JHON DOE from this span tag and I am unable to figure out how to do this without a brute force of searching for each element and doing a manual string match. Any thoughts? Thanks Ivan <span data-bind='text: pname()'>JHON DOE</span>
Not Able yo Add Previous Function(Slide Back) to Simple jQuery Slider
Can you please take a look at this demo and let me know how I can enable previous button to slide to? as you can see the next button is working fine but I am not able to slide back $("#slideshow > div:gt(0)").hide(); $("#next").on("click", function(){ $('#slideshow > div:first') .fadeOut(1000) .next() .fadeIn(1000) .end() .appendTo('#slideshow'); }); $("#prev").on("click", function(){ $('#slideshow > div:prev') .fadeOut(1000) .next() .fadeIn(1000) .end() .appendTo('#slideshow'); }); <button id="next">
Sortable plugin is not working i don't know what mistake i have made can some one please help me?
<!DOCTYPE html> <html> <head> <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <script type="text/javascript"> $(function() { $(".rightItems").sortable(); }); </script> <style type="text/css"> .leftItems{ text-align:center; border:1px solid red; background-color:red;
Setting a class on mobileinit.
In the data-role="header" is it possible to set .ui-alt-icon once in the mobileinit function like you can pageTransitions etc. Thanks,
JQuery plugin not working on RPi 3
I *THINK* this may be a JQuery plugin issue, but I am not certain. I have a Raspberry Pi 3 running java 1.8.0_65, apache 2.4.25, and chromium-browser 60.0.3112.89 under Raspbian 9.4, and I am having some trouble with some javascript served from a CGI script. I have never in my life worked with javascript, and I am no expert with HTML or CGI, so am a little lost, here. I can bring up the following URL: http://javidan.github.io/jkeyboard/examples/index.htm which contains the references: <link rel="stylesheet"
how to calculate a total based on type
Hi everyone I have a html table that the rows are added dynamically and there is a column Type where the user inputs the following values from a drop down combo box : Ncc Regular code what I would like to do get the sum for every type for ex. the sum of Regular the sum of Ncc I been on this for days and cannot figure out how to do this below is a picture of the table
Changing the data-icon colour from white to black?
Hi, is it possible to change the CSS so that I can change the colour of the icons (data-icons) from white to black? I have tried looking through the code but cannot find out how? Thanks.
How can I turn off two videos via an external button html 5
I tried to place this code, but the buttons only play one video <!DOCTYPE html> <html> <body> <button onclick="playVid()" type="button">Play Video</button> <button onclick="pauseVid()" type="button">Pause Video</button><br> <video id="09876" width="320" height="176"> <source src="mov_bbb.mp4" type="video/mp4"> Your browser does not support HTML5 video. </video> <script> var vid = document.getElementById("09876"); function playVid() { vid.play(); } function pauseVid() { vid.pause();
Floating Labels for Select Dropdown
I am using this code which returns "undefined" for the label of Select Boxes. This is because presumably the placeholder attribute is not supported for select elements. (function($) { 'use strict'; $.fn.jvFloat = function () { return this.filter('input:not([type=submit]), textarea, select').each(function() { function getPlaceholderText($el) { var text = $el.attr('placeholder'); if (typeof text == 'undefined') { text = $el.attr('title'); }
Gaining the eq() inside a div.
Hi, I have included a fiddle but I want to know how I can return the eq() of a class in a particular div. For example when the user clicks on a team name it returns the eq() of the class (in this case club) from the parent <div> it is contained in.. So if the use clicks on Manchester City, it returns 1 as would Wolverhampton as both are are in different containers with a different id. Here is the fiddle: https://jsfiddle.net/a4poster/xpvt214o/932775/ Thanks in advance.
ListView Master detail
Hello I'm a beginner. I wanted a working example of a listview type master and detail with data loaded from the websql database. Thank you
Browser autofill not working on dynamically appended DOM element
I am using jquery modal plugin to raise modal forms on a page. If I make the modal form visible on page load (as a test, and not yet raised by the plugin), the browser's autofill functionality works fine in the input fields. But, when I raise the modal form using jquerymodal (it detaches then appends the modal element to the body) the autofill no longer works. Any idea as to why? I thought it might have to do with the fact that the form code is inside <form> tags on the page, but when the jquery
setTimout and dialog.close with jquery after return message
I have an email submission modal and everything works fine. It grabs the data, PHP processes the data and sends an email and then gives the success message back to the script then the script display "thank you for submitting. blah blah blah." After that I'm trying to use setTimeout to close that final message but it isn't working. Here's the code that finishes the email submission: if (data.responseText !== ' ') { $(#emailModal).text(data.responseText); setTimeout(function(){ $('#emailModal').dialog('close')},
jQuery UI Slider: generate knob onMouseDown and onMouseUp
I've been experimenting with that library and I really liked it. However, I've been searching through their documentation twice from top to bottom and haven't found the method that I need. Basically, at the start, all I have is an empty slider (div or input with CSS), without knobs on them. When I click on that element, I need to generate the min value knob and when I release the mouse click, I want to generate second knob (max value) on that slider/element. Yes, two knobs. Min value and max value.
combine 2 files
can anyone help me to make my registation form work with 2 different js files, 1-- register.js (the file responsible of animation and validation) 2--hashform.js (the file responsible of hashing the email, username and specially the password).--->this file is called when we click the submit button on the form. --> onclick="return regformhash(this.form, this.form.username, this.form.email, this.form.password);"
Number of digits displayed in a slider's label suddenly changes
I would like to understand why, for the second slider but not the first, when the slider reaches the top the value displayed suddenly shows many digits after the decimal point instead of just showing tenths (which is what I want). Thanks for edifying me. <!doctype html> <html lang="en"> <head> <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.3/themes/south-street/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-2.1.3.min.js"></script> <script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
JQuery UI Slider Concept
I have an idea for a slider that maybe someone could help me with. I recently negotiated my salary for a new company and offer. They asked what do I want so I listed everything. Base salary Annual bonus Car Housing Food Transportation Stocks Mobile support Gym membership Education courses I want to make a slider of my ideal values for each item. And when the manager slides the base salary to a lower position then the others will adjust accordingly (higher value) so that I always end up with my ideal
Count the number of elements within specfic div
Hi there, I have following code <div id="car_0> <div class="card"> <input id="Max.Index" value="0"> </div> <div class="card"> <input id="Max.Index" value="1"> </div> </div> <div id="car_1> <div class="card"> <input id="Max.Index" value="0"> </div> <div> How do I count the number of Max.Index inside each <div id="car_x>? Joe
Following code to check status and display hamburger menu is not working.
$(document).ready(function(){ var menustatus = 0; if(menustatus==0){ menustatus=1; $(".hamburgerMenuIcon").click(function(){ $(".menu").css("display", "block"); }); }; else{ menustatus=0; $(".hamburgerMenuIcon").click(function(){ $(".menu").css("display", "block"); }); } });
Can't see jQuery icons at Chrome extension
I try to use datepicker jQuery at an Chrome extension. I succeed to use it exclude icons of jQuery. The icons my extension tries to take from site. For example from facebook.com if I open the extension with facebook. I tried to discribe the icons at the some places of the manifest and put them into some folders but not succed. What can I do?
Locating nearest section id if it exists
I need to pass the id of the nearest "section" if it exists. If a section doesn't exist, I need to pass the "formPlace" hidden field. If that doesn't exist, I need to pass the URL of the page. How can I do that with jQuery? <section id="contactForm"> <form... <input type="hidden" name="formPlace" id="formPlace" value="contact1234"> ... </form> </section>
How Determine If jQuery Is Critical To First Paint?
How can I determine if jQuery is critical to the first paint of my web pages? I received a message in Google's Lighthouse to consider delivering critical js/css inline and deferring all non-critical js/styles. I'm wondering if jquery can be deferred. I'm using 3.3.1/jquery.min.js linked from ajax.googleapis.com. Thanks!
JSON not working http://prajaktasoftware.com/egram/registergp.php
Dear Sir JSON not working http://prajaktasoftware.com/egram/registergp.php http://prajaktasoftware.com/egram/codedetailsjsonfill.php?id=271606001 giving output {"0":"3","id":"3","1":"1","status":"1","2":"1","srno":"1","3":null,"image1":null,"4":null,"otp":null,"5":null,"pan":null,"6":null,"tan":null,"7":null,"gst":null,"8":null,"aadhar":null,"9":"0","stateid":"0","10":"0","vibhagid":"0","11":"3","districtid":"3","12":"3","talukaid":"3","13":"AAPATGAON","namee":"AAPATGAON","14":null,"namem":null,"15":null,"panchayatsamiti":null,"16":null,"villagename":null,"17":null,"namesmall":null,"18":null,"namecap":null,"19":"271606001","code":"271606001","20":"0","gp":"0","21":"AAPATGAON@gmail.com","emailid":"AAPATGAON@gmail.com","22":null,"password":null,"23":null,"recoveryemail":null,"24":null,"verificationnumber":null,"25":null,"detail":null,"26":null,"first_name":null,"27":null,"last_name":null,"28":null,"address_line1":null,"29":null,"address_line2":null,"30":null,"postal_code":null,"31":null,"ipaddress":null,"32":null,"person1":null,"33":null,"mobile1":null,"34":null,"person2":null,"35":null,"mobile2":null,"36":null,"regdt":null,"37":null,"tinyimage":null,"38":null,"smallimage":null,"39":null,"bigimage":null,"40":null,"smallwimage":null,"41":null,"bigwimage":null,"42":null,"actualimage":null,"43":"2018-06-19
colorbox with dynamically loaded html
I have a roundabout image track with thumbnails that is dynamically loaded into the site via PHP and jquery. That is all working. Now I'm trying to get the thumbnails to link to colorbox so users can see the larger pictures. Trouble is, when I attempt to use the colorbox, I still get the links just opening in a new window instead of the colorbox modal or whatever it is. Any help would be greatly appreciated. Here's some of the code that I'm using. index.html <section class="roundabout"> <div class="reel">
Reveal dropdown happening twice only on ipad
I have a dropdown which is dynamic so the height should match the content and remain responsive. It works on everything except ipads (tested on ipad 2 and 3), chrome and safari exhibit same behaviour on it. I dont think its a double click issue. Heres the jfiddle to see the issue. Any help appreciated. Edit: Fix below using animate instead :) https://jsfiddle.net/Bassquake/q2zo6e7b/1/
PHP array to jquery
I have a PHP page that grabs images from a directory and puts the file names into an Array. I can display the images on the PHP page using a foreach loop so I know the PHP is grabbing the file names. I script src=getImages.php on my web page but cannot get the images in the array. After a lot of googling I think I need JSON or JSON_encode or JSON implode. But after many iterations of trial and error I'm here asking for help. I want the image names in the array from the getImages.php to be available
Randomize response message
Hi. I have AJAX form for WordPress that sends user email to my inbox. Here is js code for it https://pastebin.com/p9hhz4M7 I need to randomize displaying success (line 9-10-...) and error messages (line 25-26-....) regardless of the actual result. This form is just for testing purposes. How can I achieve this? Thanks for help.
Page Redicrect when clicking full calender. where date as argument?
well, i am trying to work with fullcalender in a portal. where when user clicks on date it redirect to a new page which list the appointments from mysql database table. where date clicked by user should act as the parameter. well i'm integrating following calendar in Laravel MVC pattern. well its should be purely Jquery no Ajax or JSON should be used. $(function() { // document ready $('#calendar').fullCalendar({ dayClick: function(date, allDay, jsEvent, view) { window.location.assign("http://localhost:8000/administrator/appointment/{{$date}}");
help adding 3 text box values and show in a 4th
Good Afternoon every one I'm very new to jquery and javascript I have 3 text boxes that I need to add up there values and display the result in a 4th textbox I have a functiion that I got from a friend but it's not calculating the 2nd textbox value which is populated form a total of a table column I've tried every thing and cannot get this to work here is the code <script type="text/javascript"> $(function () { var textBox1 = $('input:text[id$=tij]').keyup(foo); var textBox2 = $('input:text[id$=ptotal]').keyup(foo);
Newbie needs help with jquery multiayer menu
Hello there, I am a beginner in java and have no idea about javascrip, but have tried my best with this,I need to create a dynamic dropdown menu from a predefined array. Here is the array I need in javascript var Alerts = new[] { new Alerts { Id = 1, Module = "Form I", Application = "Registration", Message ="1" }, new Alerts { Id = 2, Module = "Form I", Application = "Registration", Message ="1" }, new Alerts { Id = 3, Module = "Form I", Application = "Retire", Message ="1"
jQuery UI Accordion not working
Hi, I have implemented an accordion effect in one of my wordpress post, and then it works fine when open in desktop and mobile browser. But when the post was shared in FB and open from FB Mobile Browser, the accordion effect actually not working. Basically no collapse, no effect, totally no working. Anyone having such issue?
validate plugin - customising error message with ajax return data
I want to use the remote ajax call to determine something about the content of my input text box. I then want to use some of the ajax response in the error message, but I cannot see a way to connect something I do in the success function of the ajax call into the message. Could I iterate over errorList to find the structure for my fieldname and remote method and then dynamically replace the message? Would this work? I have read adding your own method for many articles mentioning overriding the message,
Property missing
{"10-29-2018":{"trip_date":"2018-10-29","dataset":{"09:30 AM":{"available_seats":"54","already_booked":0,"max_seat":"54","internal_only":{"07:00 PM":"0"},"stop_selling":{"07:00 PM":"0"}},"07:00 PM":{"available_seats":"54","already_booked":0,"max_seat":"54","internal_only":{"07:00 PM":"0"},"stop_selling":{"07:00 PM":"0"}}}},"10-30-2018":{"trip_date":"2018-10-30","dataset":{"09:30 AM":{"available_seats":"54","already_booked":0,"max_seat":"54","internal_only":{"07:00 PM":"0"},"stop_selling":{"07:00
expanding "r.fn.init" object in console
I used console.log on a $(e.target).parent() and I have something like this: r.fn.init [li, prevObject: r.fn.init(1)] However,when I expand this object, this is what I see: r.fn.init [li, prevObject: r.fn.init(1)] 0: li.active length: 1 prevObject: r.fn.init [a#link-LEVEL4-01] __proto__: Object(0) I don't understand why "li" is set on active inside. When I used the function addCLass() or removeClass(), it seems to affect only the "li" that I see beside r.fn.init, but not the "li" that I see inside.
Change class on Scroll - Vertical Dot
Hi there, Im trying to write the cleanest code to change a dot colour on a vertical dot navigation element. Basically, when the user scrolls to the next section, the class should be removed on the old circle, and added to the new one. This is what happens when the user clicks the button (the code is wrapped inside a click function). //Change dot class circle_curr = '#' + curr_pos.toLowerCase() + '_circle'; circle_target = target + '_circle'; $(circle_curr).removeClass("current"); $(circle_target).addClass("current");
Next Page