Layout resetting after 'back' button, hhen JS populates a list element
Hi there. Ive got a UL with ID ='listaTurmas'. All i want to do is, everytime this function is called, the list contents is refreshed according to the Sessao.turmas array. The first time it shows up, it works fine. The second time, layout is completely lost. Would apreciate any help ! THis is my Div: <div data-role="page" id="turmas" data-theme="b"> <div data-role="header"> <h1>List</h1><a onClick="history.back(-1);" data-role="Button">Back</a> </div> <div data-role="content"> <ul data-role="listview"
Social Sharing Widget Disappears on Back Navigation
No clue why this is happening. Please try this: 1. start here: http://19thway.com/cck/ 2. navigate forward to recipe page (social widgets on top left) 3. navigate forward one page using "locate ingredients" at bottom 4. click back button top left (no social widgets!!) Can anyone explain. Thanks
jQuery trigger play issue
http://goo.gl/sio8b It will play shutter sound after click play button, and play mail sound after 2 seconds, but on mobile it's only play shutter sound, I thought audio play event only trigger by real click behavior, how to trigger browser play the sound with out really click on the element. I already use preload property, but the sound still a little bit played lag. Android Dolphin Browsers both work Android Chrome only shutter iPhone Safari only shutter iPad Safari only shutter
How would get this loop to work correctly to append div
<!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="testMyJson.css" /> <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <style> .the-container { width:400px; height:250px; border-style: solid; border-width:3px; border-color:black } .the-container ul { margin:0; padding:0; list-style:none; } .the-container li { width:30px; height:250px; margin:0 5px; position:relative; float:left; } .the-container li a { position:absolute; bottom:0;
adding a javascript array to the post variables
I am catching a submit in jquery, performing a check and submitting the form if the check passes. If the check passes, I would also like attach a javascript array I have created to the post variables that get sent to the PHP page. Here is the code I have so far. All I am missing is attaching the array. $('form').submit(function(e) { var barcodes = new Array(); $('.highlighted').each(function(i, obj) { var barcode = $(':nth-child(2)', $(this)).html();
AJAX
I have been experementing with standard javascript ajax it goes something like this Var U = new xmlhttprequest Send data function { U.open(properties); U.setRequestHeader(properties U.send(data); } When data is recieved (U.readystatefunction) { do something with the data } Oh and the initial creating of the object is replaced with a string of if statements which test the browser for compatability with various alternatives to xmlhttprequest in order to select a compatable one. would i be better
Hello friends! Help please: problem with the tag "select" on a menu
The problem is to choose an option tag "select" without closing the menu. Help please! Job: http://jsfiddle.net/Yrz5c/9/ <div class="presup"> <ul> <li><a href="#">Button-one<span>▼</span></a> <ul> Cont-one <select id="select"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option>
Creating a JSON Object Array
Hi all - The below solution works. However I'm not sure this is the best approach. Can someone supply a "better" way of creating the json object below (if there is one)? Thank you for any advice you can provide. var buildInvItemsObj = function() { AVDB.transaction(function (tx) { tx.executeSql("SELECT * FROM invoice_items WHERE invStatus = ?;", [ 'Incomplete' ], function (tx, results) { if (results.rows.length > 0) { var jsonObjItems
jQuery 1.8.1 | How to get dynamically set li number of ol with corresponding title?
Is there a way to get the li number and title (after clicking on the li) of an ordered list that is set dynamically via ajax or jason? I use this as example for displaying the li in the hard-coded ol: $("#List ol").append('<li><p>' + '<img src="'+thumbnail+'"'/><br />' + '<span class="title">'+imageTitle+'</span></p></li>'); A function dynamically fetches (after selecting an option from a pulldown menu) the thumbnails (fixed amount of 25 thumbs) and displays them (with their titles) in the ol div.
Is it possible to just keep the jQuery mobile code for the nav bar?
I have an existing mobile site which I am using Phonegap to turn into native apps. My existing html tool bar uses css position: fixed which is not compatible in iOS or Android. Therefore, I would like to use the fixed nav/toolbar out of jQuery mobile. I already have it installed and it looks great :-) The only problem is that the rest of the jQuery script (which is not being used) is affecting passing parameters when I use the search function already built into the site. I know there are ways to
I am trying to prepend an image until something loaded.
I have the following code. My prepend is not working. While my images are loading the ajax-loader.gif spinner is not displaying. Is the code syntax right. $(document).ready(function () { $(loaderImage).prepend("#book").prepend($('<img src="books/images/ajax-loader.gif", style="position:absolute;left:40%;top:50%;z-index:5000"/>').addClass("ShowLoading")); BookID = getParameterByName("bookid"); //Get the query string param that has the book Id CurrentPage = 0;
CSV file to HTML
Is there a Jquery mobile code that will help me to import csv to html page ? Thank you very much
Attribute Equals Selector only retrieves initial vaues
Hi all. I've just encountered a problem, described here: http://api.jquery.com/attribute-equals-selector/#comment-79799646 Basically, when you use Attribute Equals Selector (although in my case it was actually Attribute Starts With Selector), the selector only retrieves the initial values of the elements, even if the value has changed since loading the page. The author of the comment in JQuery API wrote that this does not happen in IE, but in my case it does (after all, the comment was written 2
Slow reaction on Playbook OS
Hi, I'm developing an app for android an Playbook OS. On android the app runs fast, transition-effects are looking good and everything is fine. But on my Playbook (Playbook OS 2.1) the app runs slow, sometimes the reaction on user-clicks takes about 10 - 15 seconds. I used web inspector to have a look at the web console but no errors appeared there. For my app I'm using Phonegap/cordova 2.1, jQuery 1.8.2 and jQuery mobile 1.2.0. Unfortunately I have no idea what could be the reason for this lack
Issue regarding checkboxes in IE
I've got an issue where checkboxes generated with jQuery gets the value "on" in stead of the correct value, also described in this question http://stackoverflow.com/q/4071289/927408 on StackOverflow. Anyone familiar with this, or got an idea on how to solve it?
issue with $.post
Hi all, I am getting used to js/jq but i'm having issue with the $.post as when i click the button that has been sent to post the data in the form, it creates a query string in the address bar which only get does this. So why does post do this as well. Any help will be great. Thanks
Fade addclass
Im trying to fade/or animate addclass but nothing happens, when i add the second prameter (time) it gets stuck. Any suggestions? $('.foodlab, .skafferiet').hover( function(){ $('body').stop(true).addClass('foodlab-color') }, function(){ $('body').stop(true).removeClass('foodlab-color') } ) $('.foodlab, .skafferiet').hover( function(){ $('body').stop(true).addClass('foodlab-color', 500) }, function(){ $('body').stop(true).removeClass('foodlab-color', 500) } )
Jquery image hover
Hi guys, I really need your help, I can't find a tutorial to make something like this: http://www.sanitobel.be/ When you go hover the menu section, it becomes RED and the image change in only one canvas... Anyone can help me to achieve this or give me a tutorial? Many thanks, Jhon
using setinterval to make my ajax call repeatedly not behaving correctly?
function CheckNewImages() { if ($('#hdnNewImageCheckRequired').val() == "True") { $('#newImagesAlert').show("slide"); var data = '{"caseID": "' + $('#hdnCaseID').val() + '", imageCount: "' + $('#hdnImageCount').val() + '"}'; $.ajax({ type: "POST", url: "<%=GetRoot() %>Teledermatology/loggedin/teledermwhatsnext.aspx/CheckNewImages", data: data,
are 2 scripts possible?
I'm brand new to JQuery, but I'm already stuck. I have existing code within this: <script language="javascript">...</script> I tried adding this: <script type="text/javascript" src="../../js/jquery-1.8.2.min.js"> $(document).ready(function() { alert("got here"); }); </script> I'm expecting an alert when the page loads, but nothing appears.
Calling a jquery function from inline html
Hi guys Really new to JQuery, but I know PHP pretty well, so hopefully that will help me. My problem is this ... I need to call a jquery function from an inline event handler, like so ... <a id="contact<?=$business['bus_id']?>" onclick="toggleContacts('<?=$business['bus_id']?>', '<?=$business['bus_count']?>');" Now, the function is declared within the usual document ready function, what is the proper way to do this? The reason I need to do it this way, is because the function needs access to the
Badge Icon with Bubble Count (like iOS) in Jquery Mobile
I have a header with few icons, i want to show a bubble count dynamically in a icon like badge icon with notification count. How can we do in jquery mobile? I searched in jquery mobile for bubble count but its currently available with listview, but i want to show the count in a icon right top corner like iOS notification count. Find the below reference url for badge icon that needs to implement in jquery mobile, url: http://en.wikipedia.org/wiki/Apple_Push_Notification_Service
using load function within <ul> tags
Hi there im trying to use the jQuery news ticker (Found here: http://www.jquerynewsticker.com/ ) to load data from a feed html file using the following code: <ul id="js-news" class="js-hidden"> <div id="news-item"></div> </ul> <script> $("#news-item").load("latest-news2html.html"; }); </script> The reason im doing this is that im working on a website for a friend who needs to be able to edit the ticker content, but the CMS her site is on doesnt recognise the ticker or allow you to make
problem in calling restfulwebservice with jqery and ajax over cross domain
Hi, I have implemented restfulWebservice and deployed in jboss server in abc domain(http://abc.com:8180/restfulweb). when I am using jquery and ajax to access the restful service from different application(which is .net app) and different domain(http://xyz.com:1123/care/hello.html), I am not able to see the result on the page. It is working perfectly in local domain but not in the cross domain. Find the below code is used to call the restful webservice. $.ajax({ type : 'GET',
Enter Key Issue in JQuery Mobile Dialog
Hi, When I type a data inside a textrarea in a JQuery Mobile Dialog in the below format a b c and on click of the submit button in the dialog when i try to retrieve the value of the textarea in the main page using the textarea id i get the value as abc instead of the above mentioned format. The enter key was truncated. Can anyone help me on this. Because of this issue My data gets saved with a wrong alignment while saving to db.
Simple delay for jFlow help!
I need to add a delay to jFlow, so something else runs one second before it stransitions, and I can't find the way through. Here's a link to the documentaiton for the timer, where I think is the way to go, but I'm affraid it's intended for step animations, rather than what I want. http://www.flowslider.com/for-developers/controllers/timer I'll try preventing the auto-play and setting my own timer in the while, but I'll leave this posted since I suck at managing JS timers and I'm affraid the pause
data-icon not showing in Internet Explorer 8
Here's the test page I'm working on http://test.slimspa.eu/andrea/mobile/index.php you can also click on links to open the other pages. The problem is that *all* icons (home icon, arrows, etc) are *not* displayed in IE8. example code for icon: <a href="index.php" data-role="button" data-icon="home">Home</a> (perfectly working on other browsers) I've searched a lot on the internet and in this forum too, but still didn't find any apparent solution to that. Note that if you go with same IE8 on the jQuery
Help to validate correctly: form with ajax
Hello friends. This form works to email. I need help: when validate display the div "this form has been sent correctly" Example: http://pruebajquery.site50.net/ $("#form1").submit(function(){ if(validateUsername() & validatePassword1() & validatePassword2() & validateEmail()) return true; else return false; }); $(document).ready(function() { $(document).ajaxStart(function() { $('#loading').show(); $('#result').hide(); }).ajaxStop(function() { $('#loading').hide();
parallax scrolling tutorial
i am new to jquery. i need best parallax scrolling video tutorial. anyone can help me. thank you
jQuery on Desktop Applications
Would it be possible to use jQuery on a desktop app and configure that JS which uses jQuery with a Windows Scheduled Task? Precisely what I am trying to achieve is to have a simple AJAX call to a particular page on my website at scheduled intervals.
Checkbox not an input?
Here is a function: $(document).ready(function () { $("input.commentBox").click(function () { if ($(this).closest('div.editor-field2').children('input:checked').val() == "True") { $(this).closest('div.formQuestion').children('div.hidden').slideDown(800); } else { $(this).closest('div.formQuestion').children('div.hidden').slideUp("fast"); } }); }); It works great if the input item is a radio button,
Issues with photoswipe and Ajax
The following is code of my page. The Colorbox Functionality works if i test the page individually but breaks down on the device.Basically its an multi tabbed page and the present tab holds the image. Can anybody please let me know why? <!DOCTYPE html> <html > <head> <title> Temp1 </title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0-rc.2/jquery.mobile-1.2.0-rc.2.min.css" /> <script src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
The script I'm using to redirect my homepage isn't working the way I need it to
I'm using the jquery script below to redirect my tumblr homepage to my latest post. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script> $(document).ready(function() { $.getJSON('http://mydomain.tumblr.com/api/read/json?callback=?', function(result) { window.location.href = result.posts[0].url; }); }); </script> I'm having two problems with it. First, it doesn't redirect instantly, it loads my homepage and then changes
jQuery Cycle - repeated numbers/bullets
Hello, I've run across an funny issue when using the Featured Posts widget for the Suffusion theme in Wordpress. The theme's author can't quite figure it out, either. This widget uses the jquery cycle plugin and the website with the issue is http://watsoncatholic.ca What happens is that the bullets (or numbers) at the bottom of the slider are doubled. The index (idx) goes from 0-4, and then this is repeated again. The code that calls the .cycle function is: $j('#<?php echo $widget_id;
How to change the built in "back" button in a jqm listview for a custom one?
Hi, Is there anyway to change the built-in "Back" button at the jqm listview for a custom one? Thanks in advance for your kind replies!
Select all/unselect all checkbox
Hi, I'm using this code (http://jsfiddle.net/TzPW9/1/) which remembers which check box was checked on the page. I would like to add a select all/unselect all check box but I'm not quite sure how to do this. any help appreciated. When I add this (see below) to the page it works but seems to interfere with the jQuery function from http://jsfiddle.net/TzPW9/1/ so the checkboxes aren't stored. jQuery(document).ready(function(){ jQuery("#all").click(function(){ if(this.checked == true){ jQuery('.check').attr('checked','checked');
var abc & var $abc
What is the difference between var abc & var $abc ?? Thanks Foysal
Superfish does not work as expected..
Our former web developer used Superfish Plugin and jquery.hoeverIntent.js for the hover effect of our website menu. He also set up the default configuraitons for the Superfish below. However, the menu immediately responds to the mourse hover event even when the mouse is in the menu area very briefly. I want the hover effect only when the mouse stays on the menu area for a while... Where should I look at the cause of the problem? Could anybody point to me a direction? Thank you! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
How would i go about readying these functions for use in a page?
I'm a bit of a noob, so my code is quite experimental at the moment and all over the place. I found some code that looked better organised - my flavour of it is shown below, but I'm unsure how to trigger it in the page/document.ready function. Anyone help? vouchers = { init: function () { vouchers.attachHandlers(); }, attachHandlers: function () { $('body').on('click', '.click-reveal', revealCode); function revealCode (e) { pd(e);
superfish menu open submenu
I am using the superfish menu, which works like a charm. There is just one option i can't seem to get working. I would like to open up a certain submenu externally (eg via calling menu.open(3) for opening up submenu 3) Is this possible or how should i get this working? TIA
Next Page