I need a little help about arrays+json+ajax
Hello, I am developing an application that creates a series of menus from a database and collected json. Here you can see my development. although, the submenus are created manually. http://jsfiddle.net/7teVR/ the JSON array I get is the following: ["Option1", "Option2", "Option3", "Option 4"] I was trying to do the JSON array like this: Note: the number that appears next to the subcategory indicates the amount of files that have that category. code: { "Menu1": { "SubMenu1": { "Category1": "0",
How to create unique cell ids when creating dynamic tables in jquery
I have the below code which creates dynamic html table. The 4 rows get repeated based on user's choice. The current code crates unique id for tr but i am interested in giving unique id to td elements. Can someone please let me know how to achieve this. <table id="master_table" border="0"> <tr> <th>COL1</th> <th>COL2</th> <th>COL3</th> <th>COL4</th> <td> </td> </tr> <tr> <td> <input type="text" name="col1" class="col1"/> </td> <td> <input type="text" name="col2" class="col2"/> </td> <td> <input
Issue on Checking Check box State On click (Checked or Un Checked)
I am using a Bootstrap Switch component instead of core html check box and I am having issue on getting the state of the check box on click. Can you please take a look at This Demo and let me know how I can enable my code to get the state of the checkbox change and alert in different states? $(document).ready(function () { $("[data-toggle='switch']").wrap('<div class="switch" />').parent().bootstrapSwitch(); $('#test').click(function () { if ($('#chkSelect').attr('checked')) {
Generate jQuery element from HTML, and find from it
I wrote the code as follows, but it didn't work well. var f = jQuery('<h1>foo</h1>').find('h1'); console.log(f.size()); // expect 1, but actually 0 console.log(f.text()); // expect "foo", but actually "" What's wrong?
unable to scroll down pages on android
My App works perfectly (phonegap local build) on ios and android. yesterday i tested on samsunga galaxy Android 4.x and i was stupified that i couldn't scroll down ( touch screen) on any page in my App !
jQuery mobile: pageChange, pageinit, and swipe
Hello everybody, This is my code: actually it 's a listview and I want to get to a matched page whenever any item in the list got swiped. can somebody help me to see it doesn't work? Thanks!!! <!DOCTYPE html> <html> <head> <title>My portfolio</title> <meta name="viewport" content="width = deivice-width, initial-scale =1"> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" href="themes/myThemes.css" /> <link rel="stylesheet" href="themes/jquery.mobile.icons.min.css"
jQuery Cycle not working in Chrome
I am using jQuery Cycle on a site and for some reason it works in IE, Firefox but not in Chrome? Any ideas? It is running on www.stfrancisbayproperty.co.za
estimate of release with standard datepicker?
Hi. I saw the roadmap said a datepicker would be in the next release. Any estimate of when this release will happen? (I've had some great success with jQM, but burned time on the datepicker wrapper before finding that others had already encountered the same problems I had. Specifically, click events going through to jQM widgets below the calendar in pop-up mode, inability to set the date programmatically in inline mode, and a few smaller problems discovered while trying to work around those.
jquery hide and unhide
hi guys i did a jquery for when i click in check box hide and unhide a div. if somebody select the checkbox appear the div (I HAVE THAT) i want when the checkbox is unselect appears another div. any ideias? jquery: $(document).ready(function(){ $('input[type="checkbox"]').click(function(){ if($(this).attr("value")=="red"){ $(".red").toggle(); } }); }); html: <label><input type="checkbox" name="colorCheckbox" value="red"> red</label> <div class="red box">You have selected <strong>red checkbox</strong>
How to improve jqPlot parseOptions/jquery.extend performance
I have an app that uses jqPlot and I want to make it perform better - i.e. have it render the charts faster. Using the Firefox profiler, I'm able to drill down on the time being spent in the various parts of the code, and I've found that the call to jqplot takes ~85% of the time. Of that 85%, ~60% is spent in the jqplot.draw routine and ~20% is taken in the jqplot.parseOptions routine. In addition to the static configuration data (legend related stuff, grid related stuff, cursor and highlighter stuff,
Remove data-iconshadow="false" from JQM Collapsible title
I have been trying to do this for a while with CSS and also data attributes but it is driving me up the wall. It's easy to remove data-iconshadow from buttons, but from collapsibles, not so. In the Developer Console I can see JQM is applying "data-iconshadow='true'" even after I told it not to using this code (in several places): <div data-role="collapsible-set" data-iconshadow="false"> <div data-role="collapsible" data-theme="f" data-collapsed-icon="baby" class="ui-icon-nodisc"
addint value to a table column wise
I have two tables A and B I have a table full of values in table A. I want to have a button for each row and when clicking on it. I want to check the values of the coressponding row and want to add a row value of Table A to Table B (column wise) Please help Thanks in advance
Listview not appear in mobile
Hi All, I am new to jquery mobile. I have course list. I can see this in my localhost system. After that i have moved to live server . But, I can't able to view the list my basic model[samsung E1282] mobile. What is the issue and how can i overcome this.
In "Cycle" plugin, cannot get "Previous" and "next" buttons to work
Hi there, As title says, I cannot get Previous and Next buttons to work. Cycle Plugin works, but only when click on images to scroll thru. Here is my code: HTML: <div id="right" class="slideshow"> <img class="review" src="../img/reviews1.png" width="100%" height="100%" /> <img class="review" src="../img/reviews2.png" width="100%" height="100%" /> <img class="review" src="../img/reviews3.png" width="100%" height="100%" /> <img class="review" src="../img/reviews4.png" width="100%" height="100%"
Random play html5 video timer
Hi guys, Hoping for some help. I have a number of HTML5 videos on my page, and would like a random one to play for 5 seconds, then pause then a different random video play for 5 secs... and so on. Any advice would be greatly appreciated!
Calculation - How do i make a easy series of calculation?
Hello, i made a calculation but i want to make the code easier because i want to extend it. http://jsfiddle.net/HSTDL/ It is a calculation to determin how much money you made after x time when you ad y money on a regular basis of a quarter year. And each quarter you get the same yield. $(document).ready(function(){ $(".divi").keyup(function(){ var val1 = +$(".betrag").val(); var val2 = +$(".quartal").val(); var val3 = +$(".nettodiv").val(); $("#result2").val((val1+val2)*(1+val3*0.712/100/4));
About transforming tabs with css3
Hey, I have the following html code (using angularJS): <div class="list-posts" ng-repeat="post in site.articles"> <article> <div class="article-headline"><h2>{{post.headline}}</h2></div> <div class="article-author"><em>@{{post.author}}</em></div> <div class="article-body">{{post.body}}</div> <div class="tabs"> <ul> <li><a href="#fragment-1">Comments</a></li> </ul> <tab-comments ng-controller="CommentsController as comments" id="fragment-1"></tab-comments> </div> </article> </div> So I put the "fragment-1"
How update dropdown data from a form ?
Hi, I have a table in a database Table1(ID, name, status), I want when the page load, a form appear with a dropdown ,a text field, and a submit button. the dropdown got populated from server side with data (<option value="ID">name</option>) . want when the user select a name from the dropdown, the name will be copied in the text field, after changing the name and pressing the submit button, the table in the DB will be submitted, and the drop down will show new data. the server side is easy (java servlet,
Bootstrap alert JS won't slide down
Using this JS: $('#comment').click(function(e) { e.preventDefault(); $('#comment').slideDown(); }); } And this html code: <div id="comment" class="alert alert-info" style="margin-top: 20px; display: none;"></div> <button type="button" class="btn btn-default btn-sm" id="route_update">Edit</button> it should, if successful, slide down with the message...But it doesn't, the blue bar won't go down(it's not displayed). Any suggestions? Any help will be appreciated The complete js can be seen following
Return not working fine
Hey there, I'm trying to make a function which calls a php script and then get the users password and return it. I use post for this. When i use return inside post or outside but i declared a variable inside post it doesnt work either. But if i return the username it works fine. This is my code --- JAVASCRIPT --- function getpass(username) { $.post("getpass.php", {Username: username}, function(response) { return response; // the php script works fine, i tested it. });
Listview : How to use the finger to move an element to the right ?
Hello, I've created a listview that works well but I would like to add some functionalities to the listview. Actually, when the user uses his smartphone with his finger, I would like that when the user makes a move with his finger to the right, the"<li>" element slips to the right and that then, the element comes back to his initial place and changes of color. Is it possible ? Do you have a solution or help ? Thank you <div data-role="page"> <div data-role="header"> </div>
Pb with Chosen plugin
Hi all, I'd like to change options of a list dynamicaly with Ajax. Here's my code (simplified for more convenience) : //Ajax request here .... $('#my_select').empty(); $('#my_select').append(new_options_in_html); So far so good, the previous options are deleted and the new ones are inserted in the #my_select list (I've checked with Firebug). The problem is that the new options won't display in the list. Seemingly the Chosen plugin generates this code for the display: <div id="my_select_chzn" class="chzn-container
Problem with drag & drop
HI, sorry for english, i have a problem with drag & drop ,i can put a draggable element in a droppable and with this code jQuery('#att1').droppable({'drop':function( event, ui ) {$(this).html("");$( "<p></p>" ).text( ui.draggable.text() ).appendTo( this );},'out':function( event, ui ) {$(this).html("casella1")},'revert':'true'}); I have some fields droppable and some elements draggable if i insert a draggable in a droppable the name of draggable appear on the droppable but if i go on a droppable
Deleting my plugin's Github repo and rebuilding it from scratch using SubGit?
I'm the author of the jquery-picklist plugin, and my codebase is developed in my Subversion repo at Googlecode Project Hosting. I'd love to eventually move development to Github directly, but day job and life have prevented me from picking up all but the most basic git commands; I'm afraid I'd really screw something up if I just moved over completely to git right now. (Or maybe I'm just getting old and stuck in my ways. :P) Anyway, when I release a new version of my plugin I update my local git repo
getJson won't retrieve me anu result
Hi, im developing a jsp page using the struts technology. The problem is that i need to invoke a java class retrieving a JSON object from it, but at the moment it won't work This is my jquery code $.getJSON( "checkData", {idp:idp},function( data ) { alert('json'); //some code }); struts.xml is correctly configured to call the checkData.java class using the space name "checkData" that i pass in getJSON method. The class is correctly invoked, because i see all details
mobile app using jquery for my etsy business
want to make a mobile app using jquery for my etsy business, is there some type of template or information that can help me. thanks
ajaxError and ajaxComplete firing twice upon abort
I was aborting an ajax request inside ajaxSend function, and I noticed that the ajaxComplete and ajaxError global event handlers bound to document are being called twice, and in their second execution they throw TypeError: Cannot read property 'send' of undefined. When aborting ajax calls outside of ajaxSend, it behaves normally. Is it supposed to work like this? Tested using 1.9.1, 1.11.1, 2.1.1 JSFiddle $(document).ajaxSend(function( e, jqXHR ) { $("body").append('aborting ajax...<br>');
How to develop an Eraser Tool ?
Hello everyone, i am trying to develop an eraser tool that should erase the part of an image using mouse control. Image is uploaded by the users. Thanks
Ajax + PHP Save data form
Hi All guys, First of all, I don't understand why but I don't see the message (fade) for the success or failed saving. Thereafter, I need to implement the saving data without refreshing the page This is the controller <?php class Admin_Controller_Cms extends IV_View_Base { public function routesAction() { $this->assign( 'aRoutes', Default_Model_RouteEntity::getAllRoutes() ); $this->renderTemplate( 'cms/routes.phtml' ); } /** * ajax response action */ public function routeupdateAction()
Advise on Jquery Scroll plugin
Hey Guys i have a 1 Page website that i am developing , it was 5 sections to it , i have used bootstrap as the framework , <div class="container" id="home"> </div> <div class="container" id="Objective"> </div> <div class="container" id="potfolio"> </div> <div class="container" id="team"> </div> <div class="container" id="contactus"> </div> this above code is just an example , now there is a navbar right on the top . I need to achieve 3 things : 1. when i click on any of the navbar element Eg. "contactus"
Stop propagation is not stopping propagation, or so it seems.
How do I tell jQuery to do this, and then if a link is clicked, do that? With the code that follows, I have a small animation that runs when the page is loaded, wherein several images fade in consecutively with a small time lapse in between. Then, there is a directive to make a css z-index change to an image when it's corresponding link is clicked. Here is what I have: $(document).ready(function(e) { $("div.box").each(function ( i) { var div = $(this); setTimeout(function
thumbnails does not work when hovering quickly.
I'm trying to iterate through thumbnails and its not working as expected. When moving the mouse from one image to the next slowly it works but if I move the mouse from the first image set (fruits) to the third image set (memes) very quickly, some of the images from the first image set shows up in the last image set. Here is a working example: Jsfiddle example THanks for your help
differentiate the return statements
Hello friends i have three buttons. i want that when i click Hi button the event handler for all the button type should skip the executing the handler for this button. but for other buttons the handler should execute. however i make this but the handler is executing for hi button too. i tried return statements with true,false and nothing but it is not skiping the handler. That is why i could not differentiate between the return true,false and only return. please help regarding this and solve my
autocomplete fails after several times when theme is changed
using jqueryui 1.9.2. i have an autocomplete box in a jqueryui dialog. i'm trying change the theme with theme roller and added ref to jquery-ui-1.9.2.custom.css <link rel="stylesheet" type="text/css" href="/Content/themes/start/jquery-ui-1.9.2.custom.css" />). just by adding this ref the autocomplete fails after several times, i.e. it works fine usually twice then fails to show any items unless i refresh the page. if i remove the ref to the css it works fine until im blue in the face. This behaviour
Animated css-value changes twice after there has been clicked once
Hello, There has been posted a question slightly similar to this one before, also by me, and got a perfect answer for that problem. I basically have a vertical row of thumbnails and want to make each one slide open horizontally while any other open ones close. However, I had a change of mind in the meantime and decided to add another animated change in the bottom-margin. This all works except when you click on the same thumbnail you have opened, to close it again. It then closes normally, but immediately
Add class is not working
Hello friends i have three submit buttons. and i want to add the class1 on the button which has the text 'a' by clicking on the button which has text 'Click me to add'. But when i click this button it gives nothing. Please help! HtML-- <div> <div> <input type="submit" name="name" value="a" /> <input type="submit" name="name" value="b" /> <input type="submit" name="name" value="CLick me to add" id="Sub" /> </div> </div> CSS-- <style type="text/css">
jQuery Accordion with Buttons at Header
Hi, I have few problems with Accordion where I will those as points. Before that please find the accordion I am using. 1. I have added buttons to Accordion header but while I am clicking on the buttons the Accordion is collapsing beacause of the below collapsible : true. But I dont want the button to interact with Accordion so that I can perform operations. i.e, when I click on buttons the accordion should not close or open. The button should have it's own action. 2. How could
datepicker() not showing up in UI on input type text click.
This is my cshtml code <div style="text-align: left;"> <div>Start Time?</div> <input type="text" id="datepickerStart" /> </div> This is my cshtml code which doesn't work and the datepicker doent show up $(document).ready(function () { $("#datepickerStart").datepicker(); }); UNTILL I insert an alert like below $(document).ready(function () { alert("HI"); $("#datepickerStart").datepicker(); $("#datepickerEnd").datepicker(); }); My UI is cshtml and all my javascript in a separate .js file and
PDF Link
I have a problem with a pdf link. <div data-role="main" class="ui-content"> <div data-role="collapsible" data-inset="false"> <h2>Internacional</h2> <ul data-role="listview" data-theme="a" data-divider-theme="b"> <li data-role="list-divider"></li> <li><a href="../www/pdf/eia_intern.pdf"> <p><strong>Evaluación de impacto en el medio ambiente</strong></p> <p>Contexto transfronterizo (Espoo, 1991)</p>
vertically center a cell in a JQM table
Hello, I use the JQM Table widget to make a table with two columns. The elements in the second column are higher than those in the first column, so, with the default top alignment, the result is not pretty. I would therefore like to vertically center the elements in the first column. I tried using CSS (vertical-align:middle), but this doesn't work. Is there a way to do it ?
Next Page