Event handler for dynamically created checkboxes doesn't work
I want to use my own event handler for all five checkboxes. I create one checkbox in the code and then clone it four times. My problems with this code: I can check and uncheck the first checkbox (the checkbox in the code). But the first checkbox doesn't use my event handler but its own (I set a breakpoint in my "$('input:checkbox').live('click', function (event) {..." code and it is never reached if I click the first checkbox. The four other boxes reach my event handler but all four get checked if
JSon php and jquery
Hi, I have some problem with json when i try to work with json object that returned from php, here is the jquery code: $(document).ready(function() { $.getJSON('../php/functions/all_city.php',function(data){ alert(data); });and here is the php code: <?php require_once 'connection.php'; $link = conenct('localhost', 'root', '', 'w_db'); mysql_query( "SET NAMES utf8" ); mysql_query( "SET CHARACTER SET utf8" ); mysql_set_charset('utf8', $link); $query = mysql_query("SELECT cityName FROM city ORDER BY
canvas pls help
http://www.russellbeattie.com/blog/media/canvas.html guys how to draw the background image for the toggle elements using canvas i looked into the above code but couldn't figure it out http://jsfiddle.net/s6hBG/7/
Problem with event binding on clone rows
Hi , I am working on a functionality where on the blur of every cell in a table, I have to trigger a auto-save. For the last cell of the last row I have to add a new clone row with the same blur event binding as in the exiting rows.. Following is the code ..Please help i have stuck for a few days now.. $("#myTable1").live("blur", function(){ var elementValue = document.getElementById("<%=count%>").value.toString(); var value = $("#<%=count%>_hidden").attr('value').toString();
.replaceWith() /.html('..') reach ancestors
Hi, <p id="1"><div class='selected'>this is an example</div></p> $('.selected').html( '<div class='selected'>this is an example</div> '); I get: <p id="1"><div class='selected'><div class='selected'>this is an example</div></div></p> and I can get the closest paragraph outer HTML: $(this).closest('p').clone().wrap('<p/>').parent().html(); However I want this: $('.selected').replaceWith( '<div class='selected'>this is an example</div> '); to get: <p id="1"><div class='selected'>this is an example</div></p>
Multiple toggle and expand/collapse image problem
I have two toggle divs that have same class name. When i click one of them, the plus symbol on the right side is not replacing with the minus symbol unless i click both of them. http://jsfiddle.net/adige72/rxW3H/ html: <div class="collapseTitle">Open 1<div class="symbol"> </div></div> <div class="collapseContent">Content 1</div> <div class="collapseTitle">Open 2<div class="symbol"> </div></div> <div class="collapseContent">Content 2</div> js: var $coll = $('.collapseTitle'); $coll.click(function()
Jquery code
I have the following java script code. This java script code, onclick of the button creates clone of newdiv and appends on my_div, with id= null. Please provide me with the corresponding jquery code. function addWork(){ var obj= ''; document.getElementById("newdiv").style.display ='block'; obj = document.getElementById("newdiv").cloneNode(true); obj.id =''; document.getElementById("newdiv").style.display ='none'; document.getElementById("my_div").appendChild(obj);
CYCLE - Problem with Large Slideshows
I'm trying to put together a Cycle slideshow using fairly large images and a lot of them, and have used CSS to solve the problem of the "unstyled content", but I cannot get the slideshow to advance (manually) until a long loading time has passed. Is there a way to make it advance to the next as soon the second slide is loaded (or not even that), rather than waiting for a whole bunch of them to load? It needs to start immediately, even if the slides are still loading. For example, if the second
Help with jQuery ajax loading accordion
I think this is more of a general jQuery question, thats why I am posting in this forum. I have an index.html which loads the jQuery, and jQuery UI scripts. I am trying to load part of the page using .load(), but this new page contains a jQuery UI Accordion element. The page loads, but the accordion is acting strange, as if only parts of the accordion script are working. Do I need to somehow reload the jQuery scripts every time I update the page with new jQuery elements?
related posts with thumbnails
How to make thumnails using jquery like widget in http://linkwithin.com/
Rich Text Editor using JQuery
i want to make Rich Text Editor using JQuery plugin that i can modified the display
How to force page reload/refresh of previous page when back button is pressed?
This question was asked in the jQuery Mobile forum and the last entry offered an apparently easy solution but I could not make it work. In that forum (link) I posted my setup attempt and aked help from the author but I am not certain if s/he is still monitoring it. I have also attached a text document of my forum entry. Any help will be appreciated!! Gerry
JQuery animation plugin?
I need JQuery plugin to make an image animation that i can change the size of that image and the duration in animation
need help!!! with TABBED NAVIGATION not working
okay so Im taking this class to learn Jquery and I have this assignment where i am learning how to use selectors, traversing methods, etc.. Just the basics. Well I have created this document and was able to get the top nav to work okay but not 100% but the part where i am really having problems is on the tabbed navigation on the bottom. I have tried doing this based on the instructions that were given to me. Can anyone look over my doe for e and help me understand what I may be doing wrong and
Listview not show up after coming back to cached page
After creating and populating a listview in code on a cached page, I migrate to another page but then come back to the original page. In Chrome and FireFox I see the previously generated listview but in IE 7 and 8 the list view doesn't show up. I inspect the DOM and see the cached page and previously generated listview items. I'm not sure why they're not displaying, i don't see any visibility CSS applied. Is this a known issue? Thanks!
jQuery menu not working properly
The problem is that the selected class is not activated when page is on the selected page from menu and when I hover over the menu the hover image never shows (background-position: 0px 0px;). insted of background-position: 0px -40px;) How can I fix this or what is wrong? Thanks in advance. I am talking about the animate({backgroundPosition:"(0 -40px)"},{duration:150}) that doesn't scroll down the image to the selected part of the image grapichs, image is half top side of it blue and the bottom is
Problem in fetching data from SQLite database and displaying it as list
Hello! I am new to jQuery Mobile. I am trying to fill a list with "li" items by fetching records from SQLite database. The problem that I am facing is that all items are displayed as a single "li". Below image shows what I am getting And I should be getting is The code that I have written is var strItems = ""; var query = "SELECT id, name FROM categories WHERE ID IN (1, 2, 3)"; try { initDB(); //fillCategories(); localDB.transaction(function(transaction){
loading multiple pages via Ajax
Hi, Is it possible to load multiple pages via Ajax? jQM demo loads multi-page template wihtout Ajax and I have noticed that all extra pages load via Ajax are not added to DOM. Can it be implemented? Best regards, Janusz
how to select only one div among divs with same css class?
hi, Currently i am trying to create a tabbed menu. For this I am using a parent(container) div with multiple divs inside it. Each corresponds to one tab and since all these tabs (divs) will have same implementations so I have used same class for each of them but different divs to differentiate between them. Now I want only one of the tabs to be selected at any instance. But I am not able to find out a way to do that. following is the html what I am using. <html> <head> <title>jQuery 1.7.2</title>
Button Custom Icon not working in PhoneGap?
Hi all, I am trying to use custom button icon, the attached example works when running in browser, but doesn't when runs in emulator/real phone (where the '+' icon is shown instead of the custom search icon), I am using Google development tools for Android for development. Any idea what I have done wrong? Thanks! Best Regards, Chee Seng
JQuery Mobile & Phonegap Navigation
Hey guys A while ago I started to work on an Android (and iOS) app with JQuery Mobile. It worked quite good, except I had two problems with the navigation. First, in all Phonegap versions after 1.2.0 (at the time I worked on the app, there was 1.4 out) I had the problem, that when I go back with the Android back button, there was something like an infinite loop. Let's say I started on page 1 and opened page 2, now when I press back button, it keeps switching from page 1 to page 2 and back, every
Unobtrusive with dynamic form and regular expression is not working
Hello, sorry for posting this problem here but i didn't know where to do. it is reall related to the jquery plugin from microsoft that makes unobtrusive validation. I have a dynamic form and it has two inputs, email and password, the form submits buy jQuery using ajaxForm function. unobtrusive validation didn't work, so i changed the code as the following trying to call validation inside "beforesubmit" function, but i got the problem that the regular expression validation of the email format always
jQuery mobile css after refresh
Hi, I know that questions related to mine were already asked but unfortunately nothing helped me so far. So the problem is that in some cases (after refresh for example) the css is not applied - actually I'm not sure that it's only the css. When JQM is being loaded well it adds some elements to the html and attributes like class. When the problem appears nothing is added so this might be the reason of the missing css. One more thing that might be relevant is that the communication with he server
fixing div with page
Hi , i want to know how i can set a div to fix at page left side. even when page is scrolled. I am begineer so i want to code myself rather than using plugin. Thanks
How to display the page loading widget while loading dynamic content?
Hello, I'm often adding content dynamically using $.getJson in order to retrieve values from a php script. The problem is that it takes a few seconds to get the content and to display it. How can I display the loading widget during that delay? Thanks a lot.
A None jQuery problem
A None jQuery problem has come back,So am thinking that you guys on here would on the Answer to this problem. Am working on a PHP form that has the datepicker init. I have added a new css file just to change the size of the picker, and it all works fine in IE9, all works fine if viewing it, with-in the root of file-server (On the server). But trying to View it in firefox, chorme, and safari they all show the old format for the calender. Which is to Big. Have changed the setting in these
I need help in making menu design
Hello everyone I explain you now what exactly i want I need to make one website where i will be having a background image. (1) There will be one squirrel on background image (2) so whenever we put pointer over the squirrel one box will be open (3) in that box i will have Menu Option . Please i need it soon. anyone can help me? Please provide me code for that
form submit doesn't work?
I was working however somehow it doesnt work know do you have any idea? <form id ="my_form" action="gs.php" method="post"> <input id="search_bar" name="q" type="text" autocomplete="off" /> <input id="button" name="submit" type="submit" value="Search Events" /> </form> <div id="results"></div> <div id="map_canvas"></div> <div id="event_list"></div> $(document).ready(function(){ $('#search_bar').keyup(function(){ if($('#search_bar').val() != ""){ $('#results').fadeIn();
problem with selected first child.....
I just don't get what's happening here.. http://mayacove.com/mobile/test_mobile.html this concerns main section of the page, not top nav... I have a hidden link @ the bottom, "back to top"... I want this link to appear only when the top link in main section is clicked ("Languages & Software"), but try as might, everything I have tried doesn't work... for example, for testing: $('body .wrapper:first-child section').css('border','1px solid red');is ignored.... thought I'd try with .eq(), but don't
gridview limit check boxes to only one checked
I have a gridview control that's bound to a stored procedure, but also contains four non bound checkboxes. What I want to do is limit the user to only one check box checked. That is to say, if the user already has a check box checked and checks a second check box the first is unchecked. I've tried a number of things but can't seem to get it to work. I assume, which is always dangerous for me, that what I need to do is on the onClick event of the checkbox, is to get the id of the ckeckboxand then
Can I lazy load images after scrollstop?
Our search results include the user's profile image. I need to lazy these images until the user scrolls and the images enter the viewport. However, I'd like to wait until after the JQM scrollstop event is fired before loading the images. The JQ plugins I've evaluated don't support this (as far as I can tell). Does anybody have a solution for this?
Referencing Sharepoint menu items
Hello I got a design for a site which sets the top menu items to be of different colours. I couldn't figure it out without use of jQuery and have also problems with that as well. I have to implement it with Sharepoint and it more or less defines the menu markup as below: <div class="menu horizontal menu-horizontal"> <ul class="root static"> <li class="static"><a class="static menu-item" title="Subsite" href="/Pages/default.aspx" accesskey="1"><span class="additional-background"><span class="menu-item-text">Front
Events in jQM bind(), live(), on(), delegate()
Can someone explain me what event method should be used for jQM? With this I mean bind() & live() & on() & delegate() ... I know that from jQuery 1.7 the on() method is preferred, but jQM docs gives us multiple examples. Maybe standardize this...
Jquery Mobile - Element is hovered after changePage
I am facing a really strange issue and I have been trying to solve it for days now. I've researched the issue, however I didn't find anyone else who faced the same issue. The scenario is the following: I am building a web application for desktop and mobile devices. I have my home page with a table grid, for my menu items. I register onlclick listener on the TD tag where I call Jquery Mobile's changePage. Something like this: $('#home').live('pagecreate',function(event){ $('#db td') .bind('vmousedown',
Problem with slideshow and adding classes
im using this plugin http://dimsemenov.com/plugins/royal-slider/documentation/#basic-usage and im looking for a way to change menu class if image has current class. If the current image in the slideshow has class bright i want to addClass bright to menu. im using this code <script> jQuery(window).load(function() { if ($('#bild').hasClass('dark')) { $('#widget-menu').addClass('menu-dark'); } else if ($('#bild').hasClass('bright')) { $('#widget-menu').addClass('menu-bright'); } }); </script> this
Accordion Embedded in Sortable Connected Lists
Hello, I'm new to jquery and I'm willing to build and embedded accordion within a Sortable Connected Lists... I already succeeded embedding the accordion within the tabs however I get two issues: 1- When I drop an accordion from one tab to another I can no more see it's content when I click on the header. I can see I can open it (the little arrow show that it is opened) but no way I can read what's inside the accordion. It's somehow "hidden"...) Looks like the div is broken somewhere. Any clue ?
Documentation for v1.8?
Congratulations on the release of the neat v1.8. Looking good so far. (1) Is there a target date for availability of vsdoc for v1.8? Can I build it myself (I couldn't find any specific instructions on GitHub)? As expected, there are all sorts of execution errors when running a development project using v1.8 code and the old v1.7.2 version of vsdoc. It would be terrific to have the proper vsdoc for v1.8. (2) Please could someone confirm whether the raw xml help info (api.jquery.com/api) has yet
pjax popState and animations
Hi, i have a div that slides out of the screen, loads the new content and slides back. I use jquery pjax and that part works great: $('#menu a').on('click', function(event){ event.preventDefault(); var target = $(this).attr('href'); $('li.current').removeClass("current"); $(this).parent().addClass("current"); $(content).transition({left:$(document).width()}, 900, 'out', function() { $.pjax({ url: target, container: '#content', fragment: '#content', success: function(){
removing class from previous page when you are on the next page
This seems to be a little hard to explain, but I will try my level best. I have used jquery tablesorter for paging. working fine. Actually I have a list of songs and by default first song plays at page load. The TR of the song become active by custom jquery function which turns the class (classname = current_playing) so as to show that this song is playing. working fine. when I click on other song (other TR) then the previous song is made inactive and the TR's Class(current_playing) is removed which
is this a bug?
EDIT: Pretty sure it is, or behaviour changes from 1.7.0 onward. Reporting. I've been trying to isolate a second possible bug (or intentional behaviour change) where there is an inconsistency between 1.7.2 and 1.8.0, but I can't seem to reproduce it in a minimalised code. But during the process of trying to recreate it I noticed that the following html: <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> </head> <body> <script type="text/javascript">
Next Page