validate atleast one check box is checked ....
I have 4 check boxes that are dynamically generated <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td width="26%"><input name="membercategory[]" type="checkbox" id="membercategory[]" value="1" /> Life Membership </td> <td width="26%"><input name="membercategory[]" type="checkbox" id="membercategory[]" value="2" /> Donor Member </td> </tr> <tr> <td
Auto suggestion field wont work
Hi, I'm beginner in JQuery please help me, I have search form where users can type some categories about client information, and there's auto suggestions showing under the field coming from MySQL database, I wanted to be more user-friendly, that's why I used field with auto suggestion, after searching over the web, I found one nice tutorial, but the problem is it does not work on mine. I use twitter bootstrap and codeigniter, can you check me out where is my problem? thanks, view file
drop down link wont work
Drop down link wont work once clicked. I notice that when I click drop down, I got hash character in url e.g. ...reports/home_members/search_customer# Then once clicked it will not work anymore. I have to click to some link first before it work again. Any ideas?
ajax to php (POST)
hey guys im trying to post data to php via ajax...now ive tested the script and it seems like the problem is the data being sent...casue if i return json data without relying on data being sent from the ajax request then it works perfect. so my question is how do i sent the data correctly so i can get it in my $_POST variable. $.ajax({ dataType: "json", type: "POST", data: "{'category': '" + category + "'}", // problem url: "http://url.com/category/sub-categories",
I cannot understand the statement left: '+=400px',
I could not understand the statement: left: '+=400px', After some searching I understood that the += sign written to mean relative but I could not understand relative to what ? May I kindly be helped to understand this. This has come inside of the page: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Using Multiple Callbacks</title> <link href="http://localhost/misc/_css/site.css" rel="stylesheet"> <style> #figure { position: relative; width: 400px; margin: 0 auto; height: 300px;
Post-image move before post-header on each single-post through jquery
I want if some body add div with class "post-image". It will automatically move it before div with class "post-header" and do this function on each div with class single-post. E.g. this is main //'post-image' after 'post-header' <div class='single-post'> <div class='post-header'>Title</div> <div class='post-image'><img src='.../img1.png'/></div> </div> <div class='single-post'> <div class='post-header'>Title</div> <div class='post-image'><img src='.../img2.png'/></div> </div> and i want this like
Increase/decrease input value by 1
Hi guys, I'm trying to make the value of an input field increase or decrease by 1, depending on which button is press. However, my code doesn't seem to work. Can someone take a look at it and tell me what is wrong? Thank you. Here is my code: http://codepen.io/vkhu/pen/ogwyBP
jQuery slideshow: Fade in first image
Hi, I'm using this code for a slideshow and it works well: JS $(function(){ $('.fadein p:gt(0)').hide(); setInterval(function(){$('.fadein > :first-child').fadeOut(1500).next('p').fadeIn(1500).end().appendTo('.fadein');}, 3000); }); http://jsfiddle.net/7g27j9gj/ What i want to change: Fade in the first image (currently it's immediately shown) but only at the first pass. Thanks!
using jQuery in user script in Chrome
Is there an official guide on how to use jQuery in a user script in Chrome? A Chrome user script is like a greasemonkey script in Firefox.
Callback function of $.get logs only two asterisks.
Hello, I am trying to use "console.log" to view the response of the server. My code is as follows : <script type="text/javascript"> $.get("process.php", function(response){ console.log(response); }); </script>And the only thing my browser logs are two asterisks. The PHP code was as the code below: <?php if ($_GET){ $rec = $_GET["name"]; $msg = "Welcome, " . $rec . "!"; return $msg; } else { return "No data recieved by the Server"; } ?>Would you be kind to guide me throught solving this problem?
how can I attach event to change in element prop (disable)
hello: thankshow can I? attach event to change in element prop (disable) so when element1 is change to disable - an event listener will trigger func thanks
Query a JSON in Google Maps
Hi I have a Google maps page that is is working quite fine so far. I add a number of markers to the map using a function and a static JSON. I would now like to replace the static JSON and query the data using jQuery/AJAX. I have tried various options, but somehow I keep getting the error, that the JSON is not defined. I feel I'm just missing a small thing. Currently I create the markers using this function call, where planes is the static JSON holding the information regarding the markers: setPlanes(map,
Hover on touch doesn't work !
The pseudo-element hover does not work on touch devices, I'm looking for jquery code recommendations to over come this hurdle which I'm presently facing ?
Selecting dynamic checkbox
Kindly help me in this problem- I have been adding dynamic checkboxes associates with the records got fetched from database.I have a checkbox so that selecting it make all other dynamic checkboxes selected. here is snippet- $('# tbl_A').on("click",".chk_all",function(event){ //chk.all is the class of //select all checkbox if($(this).checked) { $('.chk_cls_candidate').each(function(){//.chk_cls_candidate refers to class of other dynamically generated checkbox $(this).checked=true; }); } else
jQuery wowslider problems
Hi, I'm working on a (free, hobby) website for a local parish church, and have included a jquery photoslider, Wowslider. It works fine locally, but when I upload it, the "live" version of the slider breaks - with the images not loading and the div being completely oversized and pushing out the rest of the page content. I'm really lost as to why it's happening, and don't really know where to start in my troubleshooting. Is there something I need to add, or take out, to get the jquery to run happily
How to create a specific JQuery UI Slider box that follows the handler?
I am trying to create a jQuery UI slider that makes a box follow the handler, it is supposed to resemble the slider on this website - https://www.betterment.com/pricing/ - I would like to create one such so that the value changes just like the content on the picture underneath From my research from other questions at the following underneath: Jquery UI slider how to make a box follow the handler? I managed to create a simple one in JsFiddle shown here: http://jsfiddle.net/mvnvu5qq/1/ - I would like
How alter width of jQuery Mobile Panel
Hello, I have a Panel in jQM 1.3.1 working on a page but I need to increase its width. I have applied this CSS: .ui-pannel-inner { width: 25em; }which does increase the width "visually" so the Panel is now "wide", but the framework creates a <div class="ui-panel-dismiss ui-panel-dismiss-position-right ui-panel-dismiss-display-push ui-panel-dismiss-open" data-panelid="PanelOptions"></div> whose width is apparently defined based on the default Panel width. This <div> serves as the "clickable"
explain this code please
I have this code but it is first time I see a selection like this in the line "var mybtn". Please any one give me a reference or documentation to this kind of selection as I could not find any. Also please explain why tag "<button/>" was used not "<button>" or something else <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> </head> <body> <button type="button" class="btn">Click Me!</button> <script src="js/jquery-2.1.3.min.js"></script> <script src="js/btn.js"></script>
Another Question About .data()
Say you have a button A that brings up a dialog box. And the dialog box itself has a button B. When the user clicks button A, you want to store some data that you will use later (when the the user eventually clicks button B). I'm using the .data() function to store the data on button B itself. However, it's not working. The data is not available in the handler for button B. I store the data as follows: $('#buttonB').data('myData', theData); Button B looks like this: <Button onclick="handleButtonBClick(this)">
My Jquery UI won't work!
Hi, my jQuery UI doesn't load on my page! I is really frustrating! All I need is for someone to take me through it step by step, really in detail... Thanks, Edgar My code: <link rel="stylesheet" href="jquery-ui.min.css"> <script src="external/jquery/jquery.js"></script> <script src="jquery-ui.min.js"></script> <script> var sidebar = function() { $('.menu-icon').click(function() { $('.sidebar').animate({ left: "0px" }, 200);
Animation stops while page is loading in safari
I have a site that is experiencing some slow load times that i'm trying to diagnose and fix. In the meantime I've set up a loading that animates across the bottom of the page as soon as a user clicks to navigate to a new page. This works great in every browser expect Safari (both mobile and desktop). I have verified that the animation itself works in Safari by adding starting the animation on page load. The problem is that as soon as you click to navigate the animation stops. Is there any way around
Hi, i need help to create a recursive function to read all list structure
Hi, i need help to create a recursive function to read all list structure. I need "alert()" the content inside of each "<li>" start from the first <ul> until the last one. Bellow follows an example of list to works.... important... the function must be unchangeble.,, but must result the result accordly i change the list... <ul> <li>A</li> <li>B</li> <li>C</li> <li>D <ul> <li>A.1</li> <li>A.2</li> <li>A.3 <ul>
JQuery Mobile Panel as Menu
I am using some code I found using a panel for a menu. The nice thing is when using a mobile device (i.e. iPhone or iPad), if appears as a small icon or image at the top that can be touched and the menu drops down. I really like the look and feel of this, but when I go to a larger device or laptop with larger screens, the menu is fully opened and takes up a large portion of the screen. Was wanting to see about how to make it so that the panel menu is always collapsed. I'm using code that is called jqm-navmenu-panel.
Disabling button loaded after the document is ready
Hi; I need to disable a submit button that is loaded dinamically after the document is ready. I have no problem to do this using the document on event and triggering elements events: $(document).on("click","a.button.saveForm", function () { $(".detail-button").attr("disabled", "disabled"); }); The problem is that I have not found the way to change de attribute of the button without using this kinds of events. Is there any way to change the attributes of any element loaded after document is ready
Display file "Open, save as" dialog before downloading the file
Hi, I am trying for download files (doc, xls, pdf,ppt) using jQuery. I have the full path of the filename, which I am now passing to window.url. Problem is the file is directly getting opened, but I would like to show the "Open, save as " Popup. Below is the code used: // aspx <input type="button" id="filesDownload" value="Download" /> // Sepearate JS file: $('#filesDownload).click(function () { InvokeDownloader(); }); function InvokeDownloader() { var
Pages hang when there are http 404 on images
Hello, jQm 1.4.5. If I have pages with images that are not available, I return a http 404's. When I then view the page it shows correctly, but if I then refresh the page it seems to hang. When not using jQm the pages refresh normally. Any ideas on what I could check? sending the not found code: .. if (!response.isCommitted()) { response.reset(); } response.sendError(HttpServletResponse.SC_NOT_FOUND, resoursePath); return; .. Cheers Greg
need a little help with toggle menu
I am building a new site which uses a drop down or toggle type menu from the top of the screen. Now the site has two menus effectively. One is the nav for the site, the other is the social media nav. Im using the following to activate the menus: $(".menu_toggle").click(function() { $(this).toggleClass("active"); $(".menu").slideToggle() }); $(".social_toggle").click(function() { $(this).toggleClass("active"); $(".social").slideToggle() }); Ideally I would like it to action only one of these and by
How to freeze selection in jQuery UI widget - Selectables?
Hi there, I've implemented the selectable plugin as shown in the tutorial (http://jqueryui.com/demos/selectable/). I want that only preselected items should be selected and rest of the items should not get deselected/selected through mouse click/keyboard. Its like I want to freeze my selection programatically. How to achieve this? Edit: Additionally I tried the disabled option, but that doesn't seem to work. $( ".selector" ).selectable( "disable" ); Cheers, S
.html() for old version of browsers
hi, Im using .html() function of Jquery in my website but old version of browsers doesn't support it what shall I do?
Cloning jQuery Mobile Page content
How do coders here go about replicating shared page content across two or more pages? How do you recreate such shared content for each page without excessive time spent doing it?
Autocomplete Response function normalizes data?
I have a stackoverflow question here regarding how response works and why its printing my HTML tags in the final output. $('#mainSearch').autocomplete({ appendTo: ".inputWrapper", minLength: 3, source: function (request, response) { var customer = new Array(); $.ajax({ async: false, cache: false, type: "POST", url: "http://localhost/EmployeeDirectory/GetEmployees", data:
required field on show/hide div base on drop down
Hi, I have drop down field to show hidden div (that has field) when he/she selects the "OTHERS" value. It works fine, But, I want it the user to type something in the field (that has required) before she/he submits the form. here's my script <script text="text/javascript"> $(function() { $('#customer_id').on('change',function(){ if( $(this).val()==="Others"){ $("#other_valid_id").show() } else{
Trouble Installing jquery Microsoft JScript runtime error
Hi, When I try to install jquery via the website, the uncompressed dev 1.11.1 version, I receive an error: Error: 'defaultView' is null or not an object Code: 800A138F Source: Microsoft JScript runtime error Has anyone else received this error before? I'm not sure what I need to do to successfully install. Thank you!
unable to replace element with replaceWith()
I'm trying to create a responsive search menu for a web app I'm developing, but I'm unable to get the replaceWith() method to work the way I need it to. The sample code below loads an html page that shows two select elements with ids "asset" and "laptop_model", and hides a third select element with id "desktop_model". What I want is for the "laptop_model" element to be replaced by the "desktop_model" element whenever the value of the "asset" element is set to "Desktop". But instead what is happening
Syntax error when including jquery
Hello all! I've been trying to include jquery in one of my pages as it's required by lightbox. However, whenever I insert <script type="text/javascript" src="/includes/javascript/jquery-1.11.2.js"></script> into the <head> section of the page, lightbox reports that "jQuery is not defined." The error console in Firefox has this to say: "Error: SyntaxError: syntax error Source file: http://zf1.farstrider.local/includes/javascript/jquery-1.11.2.js Line 1 <br />" There is no <br /> tag anywhere
shorten repetitive code & randomize divs
I have written a code that will have a lot of repetition in it as it stands. Ideally, I would write this shorter and be able to randomize the divs. I don't know how to start and if it's even possible. I'm guessing with a loop. I'm still pretty new to coding so I'm having difficulty seeing if it's even possible with my setup. I have added a jsfiddle here: http://jsfiddle.net/ShariDB/jnnnsfqk/ It's an experiment, where participant's would get 40 trials. In every trial they need to predict
Is their any way to use include file in jquery mobile
Is their any way to use include file in jquery mobile pages?
Implementing Google Places with JQM? Predetermined search????
I'm a NUB here at the forums so thanks in advance for anyone that can help! Here's what I'm trying to accomplish: Mobile device gets users current location When user clicks ONE button it does a search, but the search needs to be a predetermined category so the user does NOT have to type anything in the search box. For example Pet stores, spas etc. Whatever it's set to in the code. Will display the predetermined search term results that's in the code and based off users location. I'm assuming I can
Ajax Loader not working
I am new to JQuery Mobile Developer I want to show AJAX loader for each AJAX call in my CORDOVA single page application I have used $.mobile.loading('show') and $.mobile.loading('hide') but is not working please guide Thanks in advance Mitesh
Easy filter script
Hello I'm trying to do an easy filter script to show the elements I want to see depending the option I've chosen. I don't want to use an external script. I'd like to do it by myself. On the one hand, I have the option in two lists <ul class =" provincias "> <li data-provfil =" 6 ">Text</li> ... </ul> <ul class =" categorias "> <li data-catfil =" 6 ">Text</li> ... </ul> and, on the other hand, I've the elements: <section> <article> <header>
Next Page