Google map not loading
Am feeding lat and lng variables to google map from dynamic select/options. I am seeing that the correct lat and lng are being produced but when fed to mapOptions map doesn't load. Here is my code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Google Maps API getting Lat and Long with Geocoding</title> <link rel="stylesheet " type="text/css" href="css/loadList.css" /> <link rel="stylesheet " type="text/css" href="css/gps.css" /> <script src="../jquery/jquery-2.1.4.js"></script>
Simulated tooltip code not working on Safari on iPad
This works on Firefox for iPad, and even on a Windows 8 phone. On a desktop computer you can mouseover and see the text or if you have a touch monitor you can touch the area and it shows the text. For some unknown reason it won't work on Safari on iPad, even though I did some similar code for a former employer (and it still works) and this new code seems to be identical. No difference in the CSS. It ignores the touch on the iPad when using Safari. Unfortunately I don't understand the "Insert Code"
count repetitive same values
Hi, how can I count repetitive same values ? for example: var arr = [2, 2, 2,5, 2, 2, 4, 5, 5, 5, 9,4,4]; I want to get: 2 > 3 5 > 1 2 > 2 4 > 1 5 > 3 9 > 1 4 > 2 I will appreciate if you provide any hint regards
Can't get options value/text from dynamically created select list
Hi, Trying to learn about select/options dynamic lists. I found this nifty dynamic select program on the internet. Trouble is I can't get the value and text/html. Here is my code: The list populates fine but if I click on a selection nothing happens. Do I need a 'click' function? Thanks for your help in advance. R <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Google Maps API getting Lat and Long with Geocoding</title> <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
Move li to other UL
the code I have https://jsfiddle.net/xmxytaot/1/ This works, but not quite. the element can be moved. But only once! Not again. Why not?
Question about is() function
HTML <ul> <li>i have <strong>one</strong> here and <strong>another</strong></li> <li>i have only <strong>one</strong></li> </ul> $('li').click( function() { var isTwo=$(this).is( function() { return $('strong',$(this)).length==2; } ); if (isTwo) { $(this).css('background','green'); } else { $(this).css('background','yellow'); } } ); My question is what does $(this) in $(this).is(.............) do here? If I change to $('strong').is(..........) it doesn't work as expected.
fileupload new exits jquery
in edit screen we need to change or remove uploaded image , now remove button clear the the file . but need to update the file name to '' in database when press on update button. the problem is after clear the files its not showing in in PHP $_FILES when remove we need to set file value null it is bootstrap file upload file upload-new file upload-exists
jquery not working offline and in Google crome
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Recipes</title> <link href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css"> <script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"></script> <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js" type="text/javascript"></script> </head> i am a new to jquery,the above code is working online in all browser except crome and its not working offline in
Uncaught TypeError: addtocart.off is not a function
I'm using a plugin that Chrome has caught, but I'm not sure how to fix it. I'm receiving an error: Uncaught TypeError: addtocart.off is not a function. The plugin I'm using is integrated with Joomla. I'm not sure if it's a cause of the plugin or the jQuery version I'm running: 1.6.1 I appreciate the second set of eyes. The code is below: if (typeof CustomfieldsForAll === "undefined") { var CustomfieldsForAll = { handleForms : function(forms) { forms.each(function()
Any reason that the callback functions for $.map and $.each accept their parameters in opposite order?
They both perform an iteration. Yet in $.each the first parameter is the index, while in $.map the index is the second parameter. Why the inconsistency? I use both functions and I constantly have to remind myself the order. I would rather them both be function(value, index). I'm constantly having to write this: $.each(arr, function(dontCare, value) { // do something }); I'm willing to bet more people care about the value not the index. Any idea why they arranged the parameter order like
ajax + url encodeing
When attatching data to an ajax() call using the get option ie .ajax({ url:'example.com', method:get, data: { a: 1, b:2 } }) does the URL (including everything that comes after the ?, ie the data) get URL encoded?
delay before animate() begins
Hello, I'm trying to animate the height of a div using jquery animate(). Please have a look at these before and after images: BEFORE: AFTER: What's happening here is that the user comes to a blank page with only the name textbox and the vehicle drop down list. When the user selects a vehicle from the list, the div becomes visible and animates height-wise (i.e. it expands). This is all well and good. Here is my CSS: [code] .VehicleFeatures { display: none; flex-wrap: wrap; padding: 10px;
post json - newbie question
Hi, basic newbie question... I have a button with id = postJson that triggers a script (below)... - the button is on top of the form - now I would like to add a duplicate 2nd button at the bottom of the form that does the same thing - so I duplicated the button and gave it id = postJson2 ... Q: rather than create a whole dupe of the script (to trigger the same thing) - is there a way to write it so that the script below will trigger from either button = postJson or postJson2? maybe like : $('#postJson').click(function()
Creating selector for ul/li's
Have a hard time finding the best combo of selectors to get the text value of a li > a parent of a child ul > li choosen. In example below when I click "Add Files" I need to get the parent value of "File Links": <ul class="dropdown-menu appNavBar"> <li id="appNav4" class="appNav"> <a class="trigger left-caret">File Links</a> <ul class="dropdown-menu sub-menu" style="display: block;"> <li id="fe3"> <a id="lnk_fe3" href=" index.cfm/fileexchange/main/home"
recognizing html element in JQuery for CSS class under class.
My HTML code below has nested CSS classes <div class="homepage"> <section class="hp-top"> <div class="container"> <div class="userMenu"> <ul> <li><a href="#" class="home"><span></span></a></li> <li><a href="#" class="News"><span></span></a></li> <li><a href="#" class="about"><span></span></a></li> <li><a href="#" class="contactus"><span></span></a></li>
Print iframe content
I have a kiosk screen that dynamically updates the src for an iframe when clicking different options. I am trying to create a print function that would print the content that is within the iframe. The iframe consists of locally hosted PDFs, website hosted PDFs and outside html pages. I have looked up and tried several options to no avail. My current setup has a contiainer div that contains an iframe and the print icon. The goal would be to have the print icon clicked which would open the print
toISOString() function not working.
I have this simple script to run- var date = '2016-01-01 00:00:00'; var n = date.toISOString(); alert(n); But instead it returns error: Uncaught TypeError: date.toISOString is not a function I want to convert the date string into ISO date format which is compatible with firefox. However its not working in Jquery. Is there a different function for ISO date format conversion for Jquery or is there any error in my script?
isotope filtering, how ?
Hey there, i have a gallery of 3 columns per row and in each column is a bootstrap carousel. <div class="row">
<div class"col-lg-6">...</div>
<div class"col-lg-6">...</div> <div class"col-lg-6">...</div>
</div>
<div class="row"> <div class"col-lg-6">...</div>
<div class"col-lg-6">...</div>
<div class"col-lg-6">...</div>
</div>
my question: how can I include the isotope filtering, which I switch with a dropdown-menue, what i need to include ? and where ? In general what i need to do,
add callback to function with ajax call
I have a function that is called on an element's blur. In there I have an if statement checking the return statement of a function. Well in the function, I am making an ajax call. I have been reading that this will not work because the function will return false before the ajax is done. So I read something about needing to use a callback, but I didn't fully understand it. Can someone help me figure out how to refactor my code so it will work correctly? First blur function: $("#OrderItem_itemQty").blur(function
Why I click the button but no response?
Here is my image. In my asp.net mvc page, I want to click the "Merge" button then popup a dialog, however nothing happened. What is wrong? Source:<br /> <input type="text" name="Source"> <button id="sourceBtn" class="btn btn-inverse btn-sm" onclick="LookupAccountBalance1();"> Verify </button><br><br /><br /> Target: <br /> <input type="text" name="Target"> <button id="tagretBtn" class="btn btn-inverse btn-sm" onclick="LookupAccountBalance2();"> Verify </button><br /><br /><br /> <button id="mergeBtn"
Using Global var to cycle through AJAX doesn't work
I am trying to call AJAX three maybe four times to get information from my DB. Can't get "global" var mapAddress to return. I've tried to position the function in various locations but can't get it right. I'm sure this has to do with asynchronous functioning but still don't understand it. Thanks for help, R <script type="text/javascript"> var recId=""; var mapAddress=""; // declaring here to create global var // ================================================================== // ===========
Problem with charts
I have to do a website for my class and I encountered a problem with creating a chart. I have spent all day yesterday and few hours today and I still can't figure it out. Why doesn't it show on a website? Please help guys! <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="Scripts/jquery-1.11.3.js"></script> <script src="Scripts/Chart.js"></script> <script> // Get context with jQuery - using jQuery's .get() method. var ctx
on() function in for loop
<button> 0 </button> <button> 1 </button> <button> 2 </button> <button> 3 </button> <button> 4 </button> <div id="log"></div> <script> var logDiv = $( "#log" ); for ( var i = 0; i < 5; i++ ) { $( "button" ).eq( i ).on( "click", { value: i }, function( event ) { var msgs = [ "button = " + $( this ).index(), "event.data.value = " + event.data.value, "i = " + i ]; logDiv.append( msgs.join( ", " ) + "<br>" ); }); } </script> When buttons are pressed: button = 0, event.data.value = 0, i = 5 button = 1,
Add javascript function to div
Hello, I have this task... <a href="#" id="btn_1">trigger form</a> <div id="myform"></div>and custom jaascript function: function generateForm() { var form = document.createElement("form"); form.setAttribute('method',"get"); // form method form.setAttribute('action',""); // form action url form.setAttribute('name',"frmName"); // form name form.setAttribute('id',"frmId"); // form ID var inputCtrl = document.createElement("input"); inputCtrl.type = "text"; inputCtrl.name = "data";
https with jquery =) please help =)
I would like people to open instagram from my Website. It may be in a popup, iframe. But I can not because it only opens with FancyBox http and not https you recommend?
replaceWith() does not work like expected
Hi there, This thing is driving me nuts. Tried all kinds of things to replace all img tags within a html string. So I have this html on my page: <section><div class="content">Here is the html that has to be checked for IMG</div><div class="replyinfo"><span>25 Jan 2015, 13:18</span><a href="#" class="reply">Reply</a></div></section> <section><div class="content">Here is the html that has to be checked for IMG</div><div class="replyinfo"><span>26 Jan 2015, 15:02</span><a href="#" class="reply">Reply</a></div></section>
How to remove the dynamically created text box using jQuery
I am new one to jQuery.I have a issues on dynamically add and remove text box using jQuery.Here adding dynamic text box is working perfectly,but issues on removing of text box. Its working but it will remove all the row of text boxes were created.But need to remove only the text box related to button or row.please check the below code. function addMore() { $("<DIV>").load("<?php echo $buyinput;$row_buydisp=0;?>", function() { var n = $('.product-item').length + 1; if( 5 < n ) { alert('Stop it!');
Autocomplete with Hyperlinks
http://api.jqueryui.com/autocomplete/ I am working with the example from the link above. Here is the code: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>autocomplete demo</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> </head> <body> <label for="autocomplete">Select a programming language: </label> <input
Nested table, get value of td with class i defined, but only on selected row
I desperately need help on this getting the value of a column thats nested inside a table. I cant get the logic or code right. My table: <table id="eventsToList" class="table table-striped table-condensed table-responsive"> <thead> <tr class="header"> <th></th> <th>EventID</th> <th>Created</th> <th>Description</th> <th class="pull-left">Address</th>
pre loading adobe edge animation content with jQuery
Is there a way using jQuery to preload adobe edge animation content. By that I don't mean the actual adobe edge animation but the PNG and JPEGSs used in the animation. at the moment I cannot find a way to properly preload an Edge animation ( I have a huge file with lots of PNGs ) I would be happy if the adobe edge preloaded function works but it doesn't. My entire page interrupts any DOM activities including jQuery or css loading bar animations or whatever I'd like to amuse the viewer with while
how to create dynamic json treans js
pls help how to create dynamic json treans js http://fperucic.github.io/treant-js/ Thanks
Get diffrent 2 times in jqueyr by click
Hello guys, i'm creating cms which calculate diffrent when the employee come in in the office, but now i'm going to calculate diffrent time by event click when employee loggin and click the button come in but i always get Nan result in jquery, You can see this demo already googling here but there should add date other hand i only have hour:minute:second, thanks for comment and answer
Minimum jQuery version that supports IE11 - am I reading this right?
It looks like from the chart found on the link below, that the minimum jQuery version that supports IE11 would be any version >= 1.0, am I reading this correct? https://jquery.com/browser-support/
How To Disable Mouse Enter Event and Only Detect Mouse Move to Left or Right
Can you please take a look at This Demo and let me know how I can disable any animation on Mouse-enter in the #carousel-example-generic ? I want to apply the .css() rules ONLY when the mouse is moving to Left or Right on the #carousel-example-generic ? what is happening now is, as soon as the mouse enters into the #carousel-example-generic jQuery is running the CSS rule but I want to do it only when the mouse is moving to left or right. Here is the code I have var startingPos = 0; $('#carousel-example-generic').mousemove(function(e)
JQuery propagating to children and disable/enable click event
Hi all! I am working on a kiosk screen. The screen consists of 5 circles that surround an image in the center of the screen. When one of the 5 circles are clicked everything else fadesout, that circle moves to the center of the screen, grows in size and 8 smaller circles fadein around it. One of these smaller circles is a back button that when clicked fades the smaller circles out, shrinks the main circle, moves it back to its original location and fades in all of its siblings. I am having two
[Fixed] Using Horizontal Drop-Down Menu Tympanus Codrops
Dear Friends, Just new to the forum. Not newbie in jQuery, however, also not expert. :) I'm trying to use thie Horizontal Drop-Down Menu (http://tympanus.net/codrops/2013/03/05/horizontal-drop-down-menu/), however I'm having a bit of a trouble. When adding the menu content dynamically, the sub-menu items will not be shown. If I copy the code generated and paste it in the HTML directly, it will work just fine. Am I missing something? Do I need to call any 'reloader'? Can you give me a hand? Thank
change event on radiobutton click
Hello and thank you to everyone who has previously helped me. This time I don't have a problem as my code is working. I am only asking if there is a more efficient way (i.e. less code) to accomplish my goal of utilizing a show hide based on a radio button clicked. See jsfiddle In the jsfiddle above, if you click the Other button, a required textfield appears. If you click any other radio button, the textfield disappears and is no longer required. It's the hide part of the code, below, that I figure
How to use recursion along with setInterval
Hi Everyone, My objective is to Request a database call STEP 1: if record is present then display the modal for five seconds while closing the modal again request a database call when the modal closes and repeat (STEP 1:) STEP2: if no record is present then request a database after every 2 seconds Below is the code I have tried and various other, but the problem is after the STEP1 is completed for say 4 records after call of these 4 records there is again a database call with all
.each function?
Hi all! I've received a complex task that I'm not able to answer. Hope you guys can help me! Task: You have a hypothesis that changing the order of the "Add to Wish List" and "Book Now" elements will increase conversions. Write the JavaScript needed to swap the 2 elements for every trip listed on the page when the "Change Order" button is clicked. Hint: You may want to write an each function to have this work properly. Make sure that you only have 1 "Add to Wish List" element and 1 "Book Now" element
Completing my code! - Copying a record between two objects
Objective: I have a table which has a column of check boxes in the first column. Then I have a button which applies an effect to the selected rows in that table. The button should copy the selected row, to another object. What the Code Below Currently Does: The code below applies the check boxes to the table, and places the button on the page. What is Missing from the Code Below? The action of the button, which copies the selected records to another table (object). The Code: // ------ Function to
Next Page