Geo Location
Hi, I'm trying to retrive visitor latitude and longitude to pass like a parameter in a php script. this is my code: function getPosition(){ if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(getLatLong); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function getLatLang(position) { var lat = position.coords.latitude; var long = position.coords.longitude;
How to link from webpage.php to jQuery function
Hi all, I'm trying to check if user is logged in or not. So I'm using sessions for it. Now my doubt is, if I had user name in the session I want to hide the Login button. I'm validating session using php so I want to invoke a jQuery().
$.post problem
Hi, I insert a record into DB with this code: $.post("assets/addspot.php", { title: vtitle, longitude :vlongitude, latitude :vlatitude, email:vemail, stato : vstato, user : vuser, phone:vphone, web : vweb, mobile : vmobile, image :vimage, description : vdescription
Replace some HTML
I am brand new to Jquery and not finding exactly what I want. (don't know what to search for) So I thought I'd try here. I have this code... <strong id="cups" class="styleColor" data-to="11244">11244</strong> I want to replace 11244 for the data-to to be a new calculated number. This is a count-to plugin in a template we purchased. I want the count-to number to ever be changing depending on some calculations I make on the fly when the page loads. So I will do the calculations in a script then
How to get the date back from datepicker into Code.gs in google apps script for spreadsheet
Thanks to contributors on google+ and stackoverflow I now have a google spreadsheet with a script and a form attached, with which the club's newsletter editor can export items from the club's calendar and get them nicely formatted in the spreadsheet, ready for further editing and printing to a PDF file for distribution to the club members. The editor can fill in the form to specify the starting and ending dates, and the script does the rest. But I would rather use datepicker so s/he can select the
Show and hide navigation
I am trying to figure out how to toggle aspects on my pages. I have a navigation bar at the top of my page and when I click one of the options I want a dropdown with the different options. I have made all the html and css, just I have no idea how to toggle back and forth from everything. I have read alot of information for the last few days and cant find anything that is working or helping. This is the default code when you load the page: <div id="main-menu-links"> <ul> <li> <a
jQuery AJAX succeeded, but $_POST is empty
index.php: <script> var image = canvas.toDataURL('image/png'); $.ajax({ type: 'POST', data: image, success: function() { alert('Ok.'); } }); </script> <?php var_dump($_POST); ?> This returns "Ok." alert and array(0) { }. How can I get jQuery image variable?
top.location.href doesn't send the full URL
Hey I want to write a function which reads out an entered URL from a input field and sends this URL as query string to the next site. Here is my jQuery Code: $(document).ready(function() { $("#myform").on('submit',(function() { var url = $("#user-url").val(); url = encodeURIComponent(url); top.location.href = "index.php?application.php&url="+url; })); }); and the HTML Part: <form form id="myform"> <input type="text" id="user-url"/> <button type="submit" class="grey">Submit</button>
regular expression for accepting alphabets & tab key spacekey
What is regular expression for acvepting alphabets , tab key , space key
Trying to get one column from SharePoint list view
I am a newbie to JQuery. I went through a Lynda.Com tutorial but I still don't quite 'get it' with the selectors. I have a SharePoint view which displays a number with 4 decimal positions and I want to change it to 2. I can't do this with OTOB SharePoint but I should be able to do it with JavaScript and JQuery (if I had the skillset for it.) Part of the problem is SharePoint doesn't always provide ID's and other distinguishing items in their html to facilitate the selections. Imagine that. So my
$.get not working in browsers
I am using $.get to fetch the contents of a text file that resides in the same directory as my .htm and my .js files. Here is my code: $.get("myfile.txt", function(data, status) { myarr = data.split(','); document.getElementById('sentence').innerHTML = myarr[0]; $("#dnv1").children().html(myarr[1]); $("#dnv2").children().html(myarr[3]); $("#dnv3").children().html(myarr[4]); $("#dnv4").children().html(myarr[5]); $("#draggable").html(myarr[2]); }); When I view my
Copying div from other page
Hello all, is there anyhow to copy the html div from other page without having to load it into another container? I searched a lot and this was the only way that I found out to do so. I've read the documentation and went far in the search for it. This is how it works if I use the load: var n = $('#contentcontainer').load('documentType.jsf #filters').clone(); that way I am able to do so, but then I would have to load everytime the action is taken, I want to just copy the div without having to load
select click on mouseover
Hi there, I have an image and on image I put an icon, that you can see when the mouse is over the image. I would like catch the click on icon. my html code: <img src="images/property/property1.jpg" alt=""> <span class="property-category"> <a class="addlist" href="#"> <img src="images/fav-book-icons.png"</a> </span>My jquery; $(document).ready(function(){ $('.addlist').mouseover({ alert("click"); });
2 Level Cascading Dropdown Box using web service
Hi Forum, This is my first post :-) Does anybody have an example of a 2 Level Cascading Dropdown Box using web service. I did some searching around and cant find anything, I just want to jquery code without really using a plugin Any help would be great Graham
Can't find the quirk in my jQuery - need help debugging!
I've been working on some jQuery for a site's navbar and it works for the most part: on the home page the menu icon is clicked to reveal the menu items and once the menu is scrolled out of view, the site's "main" menu becomes fixed to the top of the page. On the rest of the site, the main menu is just fixed to the top of the page. Here's the dev site in action! Where things get tricky is that the menu at the top of the home page only triggers to open the menu so once the menu scrolls down the rest
upload image in MySql Table
Hi there, I'm trying to upload an image from a html form into mysql table. I the form have several input, so my jquery is: $("#spot_submit_review").click(function() { var vtitle = $('#title').val(); var vlongitude =$('#longitude').val(); var vlatitude = $('#latitude').val(); var vemail = $('#email').val(); var vstato =$('#stato').val(); var vuser = $('#user').val(); var vdescription =$('#summernote').code(); var vphone=$('#phone').val();
Removing underline on a llink
I tried using my own CSS to remove the link's underline .accordianContent .ui-link { text-decoration: none; } But I had to resort to: <div id="accordianContent" data-role="collapsible-set"> <div data-role="collapsible"> <h3><a href="#" title="" style="text-decoration:none;">JSON Tutorial</a></h3> <p>Getting started with JSON</p> </div> Is there a way to get around using 'style' in the code? thx
JQuery Mobile: Header height
I've just started using Jquery Mobile. I need to build a responsive web site that is basically a mobile-ready HTML site that can be easily converted to a phone app later with PhoneGap and a single code base that runs on a website and most of the mobile devices with minimal effort to bridge compatibility. My first problem which sort of goes at the heart of whatever jQuery mobile is suppose to be exactly: How do I change the width of the header. ` <div data-role="header" data-theme="c"> <h1>dumdum</h1>
Javascript and JSON help with this script
I was wondering if someone could please tell me why this html file does not display the way I want it to. Thanks
Alt text in expand collapse
I'm just getting back into mobile hybrid development after 6 years and starting off slow. I am using, data-role="collapsible-set", and I'm trying to figure out how you would add the alternative text for screen readers to let the user know that it is "Open" or "Closed". Or, do I have to write my own script? thanks
complex query in Jquery .
hey guys have a look at this line of code :: var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) whats the order of execution in the above line of code ? its pritty confusing , can somebody tell me . the above line can also be found on git here . Thanks . gautam .
Getting URL value into clone select box
I have a form where i'm asking room details and how many children. Then if it is >0 how old are they. When the form is sent to show the list of rooms I want the values selected to be in the select box with what is selected but it is displaying the default 1. How do I get the URL parameter to put the selected value from the returned URL into the cloned select boxes? Thanks age1 = getUrlParameter('age1'); age2 = getUrlParameter('age2'); age3 = getUrlParameter('age3'); $('#numberOfChildren').change(function(){
Filter with jQuery by input range
A few days ago, I asked on this forum about filter with jQuery. Some people helped me but now I need to do filter no by checkboxes, but with input type="range". Is it possible? My code looks like: http://jsfiddle.net/ajwj7kt9/3/
Short question to keydown/.hasClass/.setClass
Hello, I'm new to jQuery and want to learn a little bit more :-). In my example I have a <div> with the id "box1" containing three <p>s. Now I want to get the div visible/invisible by pressing the key "s". First of all I created two css-classes: .invisible{ visibility: hidden; } .visible{ visibility: visible; } and added invisible to my div with the id box1. $(document).ready(function() { $("*").on("keydown", function(e){ var test = $("#id1").clone(); if(e.which == 83){ if($("#id1").hasClass("invisible")){
jQuery Window Scroll code formatting issue
Hi there! I'm a newbie with writing jQuery on my own and I'm running into a snag with having jQuery add a class once the window has scrolled down after a set amount of pixels. The navbar currently has some code that toggles classes to create a fade effect to make the navbar appear when clicked. It's static and sits down a little ways on the page. My problem is adding the jQuery that continues to add classes as the window is scrolled down to basically add the class that will make the navbar fixed
I would like the pop up tooltips to show on page load and not on user clicks. How can I do it?
I would like to show the pop up tooltips on this code when the page loads rather than when the user clicks. It probably is hard to do. I already tried adding a jquery document ready script in the head content but I'm assuming I would have to add more functionality to the javascript where it says click. Here is the link to the demo. http://www.codeproject.com/Tips/799641/Overlay-a-tutorial-on-an-existing-web-page-with-jQ I like this particular plugin because it dims and highlights. I would like to
Help needed implementing jQuery.noConflict
Hey, I'm having some issues with some parts of my website using a newer version of jQuery and an additional plugin using an older version. I found out there is a no.Conflict command within jQuery, but can't seem to get it to work quite how I would like... I've tried a few combos and this is the one I'm stuck with at the moment, but's throwing up errors for some other plugins that require 1.9.1 or higher, but the site seems to be functioning regardless. Just can't get my head around why it's reverting
By default alert is coming?
Hi Here is my program :-------- <html> <head> <script type="text/javascript" src="jquery-1.11.3.js"></script> <style> .intro{ background: #000; } </style> <script> function g_fun() { var items=['1','2','3','4']; var newitem=$.grep(items,function(chkval){ if(chkval=='1') return false; return true; }); alert(newitem); } function m_fun() { var items=['1','2','3','4']; var newitem=$.map(items,function(chkval){ if(chkval=='1') return false; return chkval; }); alert(newitem); } function fun1(){ return
Tabs Bookmarked with Direct Link
Hello, thanks for any and all help. My jquery tabs code is below. I need to add the ability for tabs to be directly linked from outside pages to the hashed url. jQuery(document).ready( function () { jQuery( '.tabs .tab-links a' ).on( 'click' , function (e) { var currentAttrValue = jQuery( this ).attr( 'href' ); // Show/Hide Tabs jQuery( '.tabs ' + currentAttrValue).show().siblings().hide(); // Change/remove current tab to active jQuery( this
get xml value based on attribute with jquery
I want to get all the values of the items where the name="id" and append these values to the div to be used for future purposes. I have the following XML: Pastebin link and this is my jQuery: $.ajax({ url: "http://test.be/", type: "POST", dataType: "xml", data: soapMessage2, crossDomain: true, contentType: "text/xml; charset=\"UTF-8\"", success: function(xml) { $(xml).find('item[name="id"]').each(function() { var libr = $(this).text(); $('#lib').append('<p><a href="#">' + libr + '</a></p>'); });
Accessible data tables using Talkback
I'm sorta at my wits end about a simple data table and having Talkback being able to associate the row and column headers to the data cells. It works perfectly when read it as a responsive mobile web page but fails when converted to an android app. I have sent messages to Eye-Free, Google Forum, to see if Talkback and\or Lollipop is the issue. I was wondering if anyone has had this problem and what was your work around. I have tried plain <th>, <th scope="", headers\id and aria role (columnheader,
retrieving data from json url
hello people i am a beginner in jquery and have to use it to retrieve profile informations from an url json object and display it on the screen ... please i need help asap .. thank u very much
Calling jquery function on a embedded jsp table
I am adding jquery tablesorter plugin to my j2ee application. Currently, I have one main JSP page and based on a condition, it will toggle (show/hide) embedded another jsp page. This embedded JSP page has a table on which I want to add tablesorter plugin. This toggle feature is being implemented using using css and ajax. Here is how I have this now: In JSP page: <a id="la<%=i%>" href="javascript:toggle_detail('a<%=i%>','false')"> <img id="ia<%=i%>" src="../resources/plus.gif" border="0""><span
How can I change this JavaScript code to a function?
Hi, Could someone please help me to change this JavaScript code snippet to a function? <script> var headertext = [], headers = document.querySelectorAll("#responsiveTable th"), tablerows = document.querySelectorAll("#responsiveTable th"), tablebody = document.querySelector("#responsiveTable tbody"); for(var i = 0; i < headers.length; i++) { var current = headers[i]; headertext.push(current.textContent.replace(/\r?\n|\r/,"")); } for (var i = 0, row; row = tablebody.rows[i]; i++) { for (var j
.on method is not giving the output
Hi All I have the following program: <script> $(function(){ $('div').on('click','input[type="button"]',function(){alert("hello");}); }); </script> <body> <div class = "divs"> <input type = "button" value = "Propagate"> </div> </body> So while clicking on the button with the value of "Propagate",it is not generating the required output(i.e that is not alerting hello). Varun
Replacing and url help needed
Hi I need help with the below. I'm trying to link to a dynamic url with the below, the jquery is not accepting the '?' and I need to replace the year, month and date so that the outcome is: website/index.php?id=2015-01-01 onSelectDate: function(date, month, year){ window.location.replace("index.php?id="+[year, month, date].join('-') + '.php');
Generating Random Letters
Hi, Im new to jQuery and was wondering how I would go about generating(animate) random letters (both lower case and upper case). As well as having them randomly show up in random areas of a contained space(square box). Any help would be great as to where to start would be great.
Web part tabs
Good evening, I have a question about JQuery web part tabs. I am extremely new to this and I really appreciate the chance to possibly get some help via this forum. I am creating a new Intranet home page using SharePoint 2013 and Bootstrap 3. I have a blog web part, calendar web part and a custom list web part that I would like to have tabbed. I can use the Bootstrap tabs but only HTML information can be placed in each tab. From searching online it looks like I can add some JQuery code to an assets
Value from Select Box
Hello Everyone, First time posting or even using jQuery. However, I've made my way through my code enough that I am at a crossroads. Here is my issue. I have a select box with a given number of options (duh)... anyway here is how I have it coded to help keep things uniformed for hiding and showing of these items <select id = "select1"> <option value="0"> </option> <option value="1">Option 1</option> <option value="2">Option 2</option> and so on... </select> Here is the my problem
Licence Questions
Hey there, i want use JQuery mobile in my project. The license say i can use it however i want(MIT Licence) but i must keep the original copyright. Is it enough to write in the pagefooter "this site use JQuery mobile including a Link"? or should i change the License of my Project to MIT License? Thanks for your Answers.
Next Page