How to calculate in a loop ?
Hello Ho can I calculate values extract from the table and dsiplayed in a loop ? I would like to calculate : for ex : 800 + 10 = 810; Thank you ! This is the code below : while($data = $sql_04->fetch(PDO::FETCH_OBJ)) { $modeDistribution = $data -> mode; $frequence = $data -> frequence; $frequence_2 = $data -> frequence_2; $quantite = 0; if($modeDistribution == "Marche" ) { $modeDistribution = "Marché"; } //-------------------------------------- //Duree recolte if($frequence_2 == "jour") { $quantiteTotalePeriode
Error in link include
Hello My Friend! I have a problem, i'm begginer and show this problem in my browser: Uncaught ReferenceError: jQuery is not defined Uncaught TypeError: jQuery(...).css(...).datepicker is not a function <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>jQuery UI</title> <meta name="" content=""> <link rel="stylesheet" type="text/css" href="../Scripts/jquery-ui-1.11.4.custom/jquery-ui.min.css"/> <link rel="stylesheet" type="text/css" href="../Scripts/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css"/>
Backwards compatibility
Hi I just started working with jQuery at the company I work for. I turns out out software is using version 1.6.3. which is 4-5 years old... I'm looking in to how problematic it would be to upgrade to a newer version. Are there any documentation on backwards compatibility or upgrade guidelines? Do you have any idea to what version it would be somewhat easy to upgrade to? Thanks a bunch Anders
jquery issue on data-role="popup" on ios9
We are facing this issue on iOS devices , since we updated ipad and iphone to ios 9 before iOS 9 it was OK. the popup appears and suddenly disappear. this appear on the mobile, not on computer browser. I have used the "data-history="false"" method, It doesn’t work. Here is my code: <div data-role="footer" data-theme="a" data-position="fixed" > <a href="#menu-items" data-rel="popup" data-transition="pop" data-theme="c" style="float:right; padding-right:1px;font-family:serif; font-style:italic"
AjaxForm broken
I have had AjaxForm running successfully for a while now. My code no longer works. The demo and sample code provided by http://malsup.com/jquery/form/ do not seem to work now, either. Has something broken in these scripts? <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> <script src="http://malsup.github.com/jquery.form.js"></script> or <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
able to create cookie but not able to update
Good evening, i am using jquery cookie plug in that i downloaded from https://github.com/carhartl/jquery-cookie . i am able to create cookie with this code . but not able to update cookie using jquery's on change event . it says TypeError: $.cookie is not a function alert($.cookie("self")); created cookie ,using following code : $.cookie('self','not_checked', { expires: 7 ,path: '/'}); it was created, i checked in browser cookies. i used following code for updating : $.cookie("self", "checked");
Entering the date as 1/1/03" or "01/01/03" in text box and pressing tab gives an error "Invalid format".
HI there, We have changed the jquery version to 1.11.3 and if we type the date manually as 1/1/03" or "01/01/03" and press tab or enter it does not supports and generates a n error "Invalid format date". Can someone help on this issue. File:jquery-ui.mim.js
change page issue
Hi I want to change a page in jQuery, so that i Can use the $.mobile.changePage("#url"), so its work perfect . for example ,currently I'm in page A now, so the page url is localhost/A, in A page I can use $.mobile.changePage("#B"), so page will be redirect to B page and the url is changed to localhost/A#B. and now I can refresh the page A page will be shown but url is localhost/A#B. so please help me.I want page was only be in B, when I refresh a page and I'm using multipage conpcept Thanking you,
Interaction Between Tables
Hello everyone and thanks for your help in advance. I need to develop an application that has a page with a table of a customer's charges and payments made. I'm trying to figure out how to click on a particular table row in payments and then click on a table row in charges that will in turn write back to a database to apply the payment to that particular charge line. In turn the payment and charge lines will be recalculated. I know this can be done, but I'm pretty stuck on how to get started.
Add ID or Class to parent
Hi, How do you add a Class or ID on the radio button if the text "This is the text here." exist? <input name="option-16-19" value="26" onclick="validateValues(document.add,1);selectOption(this);" type="radio" /> This is the text here. Thanks.
Cycle 2 templateing not working
I was just trying to use cycle 2 captions and i used the following HTML: <div class="cycle-slideshow" data-cycle-fx=slide data-cycle-timeout=0 data-cycle-prev=#prev data-cycle-next=#next data-cycle-slides=">a" data-cycle-youtube=true data-cycle-youtube-autostop=true data-cycle-center-horz=true data-cycle-center-vert=true data-cycle-auto-height="640:360" data-hide-non-active="true" data-cycle-caption="#custom-caption" data-cycle-caption-template="{{team}}">
Getting flexslider to work on popup
I'm trying to create a pop up that will display a slider of all the images that belongs to an item. I've managed to create the popup to display the correct images but my slider isn't working correctly, I've tried to create a jsfiddle to show what I mean but that didn't pan out so well. So here is a link to the page, just click on one of the images and a popup will be shown and you can see the 2 images that is suppose to be the image nav and if you go to one tab and then go back then the main image
Jquery validation and styling the error message
I would like to change the css used to style the error messages for jquery validation. I know i could create my own label.error { ..... } but i really don't want to do that. We are already using a multipe css styles from an external library we are referencing for all our error messages. Sure i could copy/paste the css inside label.error {} but that would be a pain if the external stylesheets ever change. Please note we are not using Less or SASS (don't know if they make it easier) and don't plan
Customized navigation arrows not displaying in cycle 2
Hey guys i am using cycle 2 for a project of mine and basically all i wanted to do was add a custom arrow for the left and right navigation. I saw this example in the documentation HERE (see the first example). Now i tried it by myself , i have the following HTML: <div class="cycle-slideshow" data-cycle-fx="scrollHorz" data-cycle-timeout="0" data-cycle-prev="#prev" data-cycle-next="#next" > <img src="http://malsup.github.io/images/p1.jpg"> <img src="http://malsup.github.io/images/p2.jpg">
White screen on transition whilst changing an image.
Hi, I am trying to change an image using this code prior to transition from a page: a3 = "red_x.png"; $('#red>div>span>img').attr('src', 'assets/images/app/' + a3 + '.png' ); But I get a white screen on transition: However if I use the code like this, it works fine, $('#red>div>span>img').attr('src', 'assets/images/app/red_x.png' ); Has anyone any suggestions as might may be causing this. Thanks,
Another newbie question: Replot jqplot meter gauge on widows resize
I already found very good help some days ago but I'm facing a new problem. I try to replot a jqplot meter gauge when the browser window is resized. I could find some examples during my research that seem to work fine but as soon as I try it myself, I can't make it work. Here is my code: My fiddle can be found here $(document).ready(function(){ s1 = [72]; var plot0 = $.jqplot('chart0',[s1],{ seriesDefaults: { renderer: $.jqplot.MeterGaugeRenderer, rendererOptions: { label: 'Your Score is <div class="score">'
Using DOM as an offline cache
Is it possible to use the DOM as a cache during periods of network outage? I tested this on the splash page (pageshow event) to load about 20 pages in a loop using: $(":mobile-pagecontainer").pagecontainer("load", url, { showLoadMsg: true }); After this, I can step through all pages in the same order as I loaded them using: $(":mobile-pagecontainer").pagecontainer("change", redirect.url, { transition: "slide", loadMsgDelay: 75 }); This is a questionnaire site, so stepping
Cloning a Div and changing the ID.
Hi, how do you clone a div and at the same time change its ID? I have created a fiddle to try and show what I am looking to do. https://jsfiddle.net/a4poster/zo6wyehg/4/ Thanks in advance.
Problems with Elevatezoom with Fancybox in Chrome
Hello, I am trying to get a combination of Fancybox and elevatezoom working together. I got it working in FF and IE but it will not work in Chrome. I was wondering if someone could help me? Link to test page: test.html Jquery Code <script type="text/javascript"> $(function() { $('.fancybox-buttons').fancybox({ maxWidth: 512, maxHeight:768, openEffect : 'none', closeEffect : 'none', prevEffect
Uncaught TypeError: $(...).catcomplete is not a function
<script src="js/jquery-1.7.2.min.js"></script> <script src="assets/js/owl_slider/jquery-1.9.1.min.js"></script> <script src="js/jquery.ui.core.min.js"></script> <script src="js/jquery.ui.widget.min.js"></script> <script src="js/jquery.ui.position.min.js"></script> <!--<script src="js/jquery.ui.autocomplete.min.js"></script> --> <script src="js/jquery-ui-1.9.0/ui/jquery-ui.js"> </script> <link rel="stylesheet" href="css/jquery-ui-1.8.21.custom.css" type="text/css" /> <script> $.widget( "custom.catcomplete",
cycle 2 data-cycle-youtube-autostop=true not quite working
I have the following cycle2 HTML code: <div class="cycle-slideshow" data-cycle-fx=scrollHorz data-cycle-timeout=0 data-cycle-prev=#prev data-cycle-next=#next data-cycle-auto-height="640:360" data-cycle-slides=">a" data-cycle-youtube=true data-cycle-youtube-autostart=true data-cycle-youtube-autostop=true> <a href="http://www.youtube.com/v/f7AU2Ozu8eo?version=3&hl=en_US&rel=0">Paul Irish</a> <a href="http://www.youtube.com/v/seX7jYI96GE?version=3&hl=en_US&rel=0">Alex
calculating Expiry date
Hi all, I'm new to JS and JQ, I have written some code for an ASP .NET form. there is one text field called txtJoinDate and other one text field called Expire Date. I implemented datepicker for the txtJoinDate and I displayed the picked date on the txtExpireDate. I need to make a calculation so that the expire date will be one year after. here is the code: $("#<%=txtJoinDate.ClientID %>").datepicker({ altField:"#<%=txtExpireDate.ClientID%>"
ajax method type post
hi friends i want to this form to be witdh fonctins jquery ajax help me pleasse <form method="post" action="popup_0.xhtml"> <input type="hidden" name="t" value="new"> Name:<br><input type="text" name="usr_name"> <br> <a id="text">kkkkkkk</a>Body:<br><textarea name="popup_txt" rows="5"></textarea> <br><input type="submit" name="submit" value="Send message"></form>
Progress Steps - addClass to active step
Each step represents a new page and form, looking for a more dynamic way to show the step progress as the user hits each page. var bsSteps = $(function() { $('.bs-form-1).find('.step1').removeClass('disabled'); $('.bs-form-1').find('.step1').addClass('complete'); $('.bs-form-2').find('.step2').removeClass('disabled'); $('.bs-form-2').find('.step2').addClass('complete'); $('.bs-form-3').find('.step3').removeClass('disabled');
change language when user visits domain.com#fr etc
Hi, i have a site which has a language switcher on it. It uses jquery-lang.js it works fine, but now I need for it to change automatically when a user visits domain.com#fr etc. I have no idea where to start on this. Firstly I need to add the hash to the url #fr then i need THAT to trigger the language change. Any tips? Thanks in advance Andy
Upgrading Jquery Mobile 1.2.0 to 1.4.5
Hi Friends, I am upgrading my jquery mobile project from 1.2.0 to 1.4.5, but few css classes used in 1.2.0 are not working in 1.4.5. and our own custom css classes are also not applying. Eg: ui-icon-arrow-l . Back arrow is not displaying.(This was available in 1.2.0) Below is the order in which our css files are added to page after upgrading to 1.4.5 csscollection.Add("Content/jquery.mobile.theme.support.1.2.0.css"); csscollection.Add("Content/mobile.css"); csscollection.Add("Content/admin.css");
Jquery Stop stacked element from disappearing on hover
I'v been stuck on this for ages. $(".poster-wrapper.tint").hover(function () { $(this).siblings(".controls").slideDown('fast'); }, function (e) { //Here is where I need if statement. Only slide up if the poster **and** the controls class is not being hovered on $(this).siblings(".controls").slideUp('fast'); }); .controls is ontop of the .poster-wrapper, so when I hover over poster wrapper it shows the controls class correctly, but when I hover over controls class they slide away again obviously because
Uncaught TypeError: Cannot read property 'value' of undefined
$.widget( "custom.catcomplete", $.ui.autocomplete, { _renderMenu: function( ul, items ) { var self = this, currentCategory = ""; $.each( items, function( index, item ) { //alert("index="+index+" and item = "+item); alert(item.value); if ( item.subcategory != currentCategory ) { ul.append( "<span class='ui-autocomplete-category' style='float:left;'> -- In "+ item.subcategory + " </span>" ); currentCategory = item.subcategory; }
load the page content using jquery
Actually what i need to do is.First load the page content with load_value=0 and again load the page content with load_value=1 using for loop. here what exactly my doubt is, After completing the first iteration how to make its load with the load_value=1 ie. is increment of load_value.Its working with only one value of load_value either 1 or 0 but not of both with using of iteration. please help me guys it really urgent for me.. loadMore(); function loadMore() { $("<DIV>").load("<?php
Get attributes of some photos
Here is my site https://market.marmelada.co.il/products/273919 Please refer to the lower most images at the bottom, above the footer. I believe that some of it is built with javascript I need to get as a single string, constructed as comma separated sub-strings of the urls of the most lower images. Actually its the src attribute value, something like "/photos/170x134/1294252.jpg, /photos/170x134/1294252.jpg, /photos/170x134/1294252.jpg" Can someone help please? Thx
$.Mobile.chanePage showing white screen in iphone 6 ( IOS 9)
I am using Jquery mobile 1.2. when executing the below code, white screen is appearing on the screen. Particularly in large screen. If i apply the property transition : "none", it is working fine. But i don't want to loose the transition. Can someone please help on this. function _ReturnToHome() { $.mobile.changePage("#Home", { reverse: "true" }); if(_isIOSSafari()) { setTimeout(function() { _setCompletionStatus(); }, 500); } else _setCompletionStatus();
ReferenceError: $ is not defined
Okay, so I have the following: $(function(){ $.getJSON('https://app.knowledgeowl.com/api/head/article.json', { _authbykey: "56a7d8c123131c4058361687", project_id: "55c4ffd132131c789e294fe6", "status[$in][]": "published", "status[$in][]": "review", "_fields[]": "name" }, function(data) { console.log(data); }); //get JSON }); And I kept getting this error:
get data from db to set as default in dropdown list created using jquery
here is my below code create the dropdown using jquery. but what i need to do set default selection on this type of jquery creation based on mysql value. i did with this following code but its not working.please help me guyz.. <script> $('#orderbox2' + categories).text('Currency Notes'); //its not working for default selection) categories = { "Select":[{value:'select',text:'Select'}], "United States":[{value:'<?php echo 1;?>', text:'Select'},{value:'<?php echo usa;?>', text:'Currency'},{value:'<?php
Bugs in template. jQuery and Wordpress
So I want to build a website. A girl from around this forum advised me to buy a template from templatemonster. But here I found some reviews that their templates sometimes have bugs. So if I give you a link to a template, can someone check the code. Before I’ll buy it and spend some money? Or if someone from around here has the experience with their company, can you share it? What’s your opinion? Are they good? And also can I use jQuery with it? Here is the template I want to buy wordpress-theme.
Refresh Radio-Buttons
Hi, im new with jquery and have a problem with radio buttons: <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2a" value="1"> <label for="radio-choice-h-2a">Button1</label> <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2b" value="2"> <label for="radio-choice-h-2b">Button2</label> <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2c" value="3" > <label for="radio-choice-h-2c">Button3</label> Im loading the informations, if
What does this code do?
$("#myForm").select2({
minimumInputLength: 2,
width: width,
matcher: function(term, text) {
// THIS IS WHERE I COMBINE THE METHODS
return text === 'Other' || text.toUpperCase().indexOf(term.toUpperCase())==0;
},
sortResults: function(results) {
if (results.length > 1) results.pop();
return results;
}
});
There are no action listener and 2 methods are defined inside the selector and seems to just sit there without doing anything. Can someone
Why Doesn't My Dialog Close On The Button Click?
Hi guys, I have jQuery code that's executed on a button click which brings up modals based on the validity of the user input. I have buttons on the modals that when clicked should close the modals, I have 4 different if statements and the modals close when the button is clicked on all the modals except the one in the last if block and I have no idea as the code is the same, what is wrong here? Here's my code below $(function(){ $("input[name=addAnotherExpense]").on("click", function(e){ e.preventDefault();
Issue passing parameters in $.getJSON
I have parameters like: status[$in][] fields[] How do I specify in the $.getJSON parameter like that with the brackets and $ sign?
Newbie needs help: Load file into jqplot Meter Gauge Chart /AJAX&JSON
I'm facing a problem loading a simple external file with just one value into my jqplot meter gauge. Here is my working fiddle with hardcoded data: https://jsfiddle.net/enqjh8m3/1/ I read through the jqplot documentation and looked at some examples but I just can't make it work. It's the first time I use jqplot and I'm not very experienced working with js. But havent we all started somewhere? Here is my approach to load a file called keyscore.txt, which just contains [66] My not working code: <script
jQuery and IE11
I am (re) starting with jQuery after a long absence. Am I doing something wrong or is normal that the following code does not display the corresponding icons in IE11? <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Button - Icons</title> <link rel="stylesheet" href="http:///code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="http://code.jquery.com/jquery-1.10.2.js"></script> <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
Next Page