Can't get a value
Hi I have a credit card payment form in which I need to automatically calculate 2% of an entered payment value, show that calculated value in its own field and also show the total payment value including the 2% in a third field. This problem is beyond my very basic knowledge of jQuery. Is someone able to help me with a script to achieve the required outcome? Living in hope Peter I have included a block diagramme below to help explain the process as well as an excerpt with the relevant markup, taken
How many parameters can we parse into jQuery function?
Good day everybody, I'm a newbie in javascript and jquery. Currently i am studying a course from codecademy.com . In one lesson, i use function "hover()". I realize that it can take 2 function concurrently. My question is: How many parameters (such as function(){} ) can we parse to jQuery function? Is it possible to parse 3, 4 parameters to jQuery function generally? Is it possible to parse 3,4 parameters to jQuery function typically? Thanks a lot!
How can I prevent two datapickers from being displayed after a successful ajax call?
Hi everyone, I’m doing an ajax call in a partial with a datepicker that loads data in a div container. Everything works fine except when it returns I have two datepickers on the form. One with the select button and the other without. I would like to only one datepicker on the form. How can I prevent two datapickers from being displayed after a successful ajax call? Here’s the script I’m using. <script type="text/javascript"> $(document).ready(function () { $("#datep").datepicker({
Memory leak with JQuery and Chrome
Hi, Started with JQuery a few weeks ago, and I'm having a bit of a problem with my code. I'm writing a page that uses Ajax to load up images. The user types in tags in an INPUT box, and then I use JQuery/Ajax to call php which queries a MySQL DB and returns the images matched. I noticed that if I kept on doing this for a bit, that my browser would use more and more memory, until it either froze, crashed or Windows complained about lack of memory. So I started to look into it, and I've got down to
Focus on PDF(Viewer) in iFrame
Hi, i am very new in using jQuery. I've got a problem with the focus-function. I have a iFrame with an PDF(Viewer) inside. To scroll the document it is necessary to click in it. So i tried to set the focus by using jQuery on mouseover. <iframe id="iframeDocumentViewer" src="about:blank" width="100%" height="100%" onmouseover="SetFocus();"></iframe> function SetFocus() { $('#iframeDocumentViewer').focus(); } This doesn't work. I have no idea... Hope someone can help me. Thanks.
Menu not working in the mobile view
I am helping maintain this site but I didn't build it. The menu option in the smaller width, mobile view supposedly used to work but is not working anymore. Maybe some query got broken, I am having a hard time figuring it out. Any thoughts and suggestions welcome Thanks! http://hushmagazine.ca
Issue on Using One Switch Botton to Toggle Functions in jQuery
I am using two buttons to slide up and down the page at this sample as: <div id="map"><button type="button" class="btn btn-default green goinfo">Go Info</button></div> <div id="info"> <button type="button" class="btn btn-default green gomap">Go Map</button></div> can you please let me know how I can reduce the buttons to do do the same job? something like : <button type="button" class="btn btn-default slider">Switch View</button>and this is the jQuery that I have jQuery('body').css('overflow','hidden');
Jquery Accordion
I'm trying to create and accordion, I would like to do it with out the jquery ui version. So far I've managed to do it, but I would like the second option to be open instead of all of them. Here is the JsFiddle: JSFIDDLE Here is my html <div class="tabbed-single-wrapper"> <a href="javascript:void(0);" class="tab-header"> <div class="max-width"> <h2>Tab 1</h2> </div> </a> <div class="tab-content"> <div class="max-width phase2">
Confused on usage of JQuery Selector reference
As stated on SO , I recently implemented JQ 2.1.0, and ran into an issue on a simple object reference acquisition. I remember previous implementations where i only had to do var obj = $("selector"); and this acquisition would get me all references to accessors and such that i need to perform. The biggest problem is now i have do use an indexer of child control in order to get access to the object in question. var wnd = $( "#chat" )[0]; This seems kind of counter intuitive, when i only have one
Apply Style on parent acnhor tag for each li
I want to apply style using jQuery on the last anchor tag of each li where there is no item for that anchor so that it's foreground color should be red,here below i've hard coded values so every one can understand the scenario,so for eg:if Cat1 anchor had no item then it's color should be red similarly if Subcat1 anchor had no item then it's foreground color should be red and so on. <ul class="nav"> <li class="mainparent"> <a href="#">Main Category</a> <ul> <li> <a href="#">Cat1</a> <ul> <li><a href="#">Subcat1</a>
Problem using jQuery to add a cloned form dynamically
Hi everyone,i have a form and an add new form link that adds a multiple form like the first one dynamically, and inside the form there is an author text input with also a link to add dynamically multiple author's input. the problem is that when i add multiple forms..only in the first form i can add multiple authors, and not in the other forms. and the author's text inputs are added outside the first form. Can somebody help me identifying the probleme in my code, please. Also can somebody informe
javascript on webpage to run a jQuery ajax loop update a div on web page without event
I need a jQuery ajax loop to test a field in a file for a value = “END” if not equal wait 10 seconds and check again. After each check write to a div updating some variables on the browser page. When condition value = “END” then exit loop. Can that be done and it there a example of how to do it. James R. Martin J. Martin Associates
problem using jQuery to fire transform.
Hi all, I'm currently using jQuery 2.1.1 min and running Windows 7. For some reason the following works with IE11 and the latest Google Chrome but not for the latest Opera, Safari or Firefox. $sel.css({ transition:'all 1s', transform:'scale(3)', color:'red' }); Can anyone see why this would not work in all of the latest browsers? Thanks. TC
jquery not loading on IE
Hi I have a project using jquery 1.7.1 and one of my pages is not working for testing I edited my $(document).ready function with a simple alert in it : $(document).ready(function() { alert('here'); }); but it is not working only in IE ( 9, 10 and 11) with compatibility mode is there any parameter that I can set in pages for this kind of compatibility ? this page works on chrome and firefox my guess is that all jquery fetarues for this page are not working on IE not only document ready one ...
each() not working as expected
Base on on the height (variable) of the image(s), css property (position/left/top) is being assigned to position it center (vertical & horizontal) within a <div> with in a fixed height. Class assigned to <div> = .imageContainer <script> $( document).ready(function() { $( ".imageContainer img" ).each(function() { $('.imageContainer img').css({ position:'absolute', left: ($('.imageContainer').width() - $('.imageContainer img').outerWidth())/2, top: ($('.imageContainer').height() - $('.imageContainer
adding the values of dynamically created text box
hello, i have form named as form_student. i have three fields as text box : 1) roll no 2) name 3) marks in each semester first two fields are normal text box. the third field has one text box(name=txtSemester) and a hyperlink(add semester) associated with it. when a user clicks on the hyperlink(add semester), it will create a text box below the current text box of semester. i have also a span(id="total") below the third text box which will show the total marks after adding each marks of semester.
Jquery Concatination ?
$('#gallery a').click(function(evt){ evt.preventDefault(); var imgPath = $(this).attr('href'); var oldImage = $('#photo img'); var newImage = $('<img src="' + imgPath + '">'); newImage.hide(); $('#photo').prepend(newImage); newImage.fadeIn(1000); oldImage.fadeOut(1000,function(){ $(this).remove(); }); //end Fadeout });//end click $('#gallery a:first').click(); }); // end ready
Jquery Ajax working on localhost (xammp) but not working on Server (cpanel)?
Jquery Ajax working fine on localhost (xammp) but not working on Server (cpanel) ! also ajax with Javascript working fine , but throught JQuery it has problem ! (on server) i changed send method to POST but problem same. this is my website : concert20.ir an this is js code: var arr=[]; function func1(id,status){ var str; var a=id.split('-'); // a[0] = chair number // a[1] = singer id // a[2] = place length=arr.length; if(status=='رزور شده')
How to create a wall page in jquery and j2ee
Hi, Am trying to create a wall page using jquery and j2ee.User can post contents in wall and also see others post..similar to facebook.......the problem here is i cant find a way to make it dynamic.....means the post entered by a third person cant be seen in my wall unless i refresh the page.i dont wanna refresh the page ....i want to enter the post content in wall as soon as it is entered in database without effecting other post and it should be seen by everyone. for example if there are 5 post
show and hide radiobuttonlist on checked property of checkbox
In my program . there is checkbox(id-cbMain), a radiobuttonlist(intially hidden, id-rbSub), a radiobuttonlist(initially hidded, id-rbchild). I want, when cbMain is checked, then rbSub should be visible, and if a particular radiobutton of rbSub is checked the only rbChild should be visible. as soon as checkbox is unchecked both the radiobutton list should be hidden. <ul> <li> <input type="checkbox" id="cbChk">Main CheckBox</input> </li> <li id="liSub" class="hide"> <input
Need help with jquery slide box
please excuse the cheesy photo, just trying to get the outline of this setup. Can someone tell my why this slide box is not working? here's the site: http://tds2.bitballoon.com
How can I call the on click function even if the user does not click on the first button in a list of dynamically created buttons?
Hi, I have a number of submit buttons in a loop that are made dynamically. I’m using jquery like this: $(document).on('click', '.submit', function () { mydropdown = $('#Category'); if (mydropdown.length == 0 || $(mydropdown).val() == "") { alert("Please select an 'a category'."); return false; } }); but the alert does not fire and the page still gets submitted it I click a button other than the 1st
How can mask the CC number.
can anyone give me an idea to mask the credit card number? I just want to show the last 4 digit number after click on button. I do not want to use the any plugin. I am using Jquery.
Slowness in IE8 in obfuscated Javascript code
I'm developing an application that is using IceFaces, which is using jQuery 1.9.1. I am seeing very slow behavior in IE8. It seems to happen on a mouse click, and it seems to be related to the size of the page. The more content on the page, the longer the delay is. I've attached a screenshot of an IE8 profiler report. Unfortunately the Javascript code is obfuscated, but I am positive that it is jQuery. I've also attached the code snippet that I think is causing the problem. Can anyone tell me what
e.offsetY seems to be inconsistent - have I found a bug?
I'm trying to find out where a user has clicked in a div. For instance, if he clicked halfway down a DIV that has height 100pixels, I would want to retrieve "50". I got help on this forum on how to do that, and it seemed to work fine. But then I put an image in the DIV. The image was too high for the DIV, so I added a style: "overflow-y:scroll" to the DIV. To get the position where the user clicked, I now had to add "scrollTop()" to the number above. This worked fine. If I scrolled down, and clicked
Can I do this with less writing?
$(document).ready(function() { $("#d1").hide(); $("#d2").hide(); $("#i1").mouseenter(function() { $("#d1").show(100); }); $("#i1").mouseleave(function() { $("#d1").hide(100); }); $("#i2").mouseenter(function() { $("#d2").show(100); }); $("#i2").mouseleave(function() { $("#d2").hide(100); }); }); This is my code. I've got a lot more of these d's and i's and I want to make the same thing with them all. Is there a way to not repeat this code over and over again and only changing 2 id's?
Jquery Ajax Call( Web Service )
Hi Is It possible to call the web service from local machine to the remote server using ajax call in jquery. Thanks in advance.
Need help reading variable on POST
Hello, I have a PHP page that makes a checkbox appear after a certain textbox is exited. This part of the functionality is working - the user leaves the textbox, the AJAX call is made, and if certain criteria are met, the checkbox appears or it doesn't. Here's where I need help. When the checkbox appears on the form and the form is submitted via POST, I can't get its value. <!DOCTYPE html> <html lang="en"> <head> <script type="text/javascript" src="jquery-1.4.4.min.js"></script> <script type="text/javascript">
lightbox stopped working
Not sure what is wrong, it just stopped working... http://theartoflovingcatsanddogs.com/art-item/simply-siamese-38/index.cfm
issue on android 2.3 : document.location.href
from javascript i would like to navigate between html pages, but on android 2.3 i have an issue withe document.location.href = "#Browsing"; it doesn't works. while on android 4 and above it works. anyone has an idea/ thanks
IF statement only works two to three times
I'm trying to make this page working that has a vertical line of pictures (thumbnail-sized) which you can then click on to make them scroll to full width and show lots of text and happy stuff. I've already managed to do all that. However, if I click on one thumbnail, any open thumbnails are supposed to close. I've implemented an IF statement and class-checking for that: $("a#shins-rec1").clickToggle( function(){ if ($(".shins-rec").hasClass('done')) { $(".shins-rec").filter($(".done").not($(this))).animate({
KEEP CHECKBOX CHECKED AFTER SUBMIT AND REFRESH/RELOAD PAGE
I have some view like this: [CODE] <%= form_tag( riepilogo_path, method: "post", id: "sel") do %> <% for posti in @postis %> <%= check_box_tag "posti_ids[]", posti.id %> <%=h posti.numero %> <% end %> <%= submit_tag "OK"%> <% end %> I want to check checkbox and keep checked after submit and refresh or reload a page. I write jquery code like so. But it is not works. [/CODE] [CODE] $(document).ready(function() { $("#sel").click( function(){
Dinamic list of elements
Dear all, hello :) I have problem with color of list elements. It is <li> tags, every with diferent id ... id='elem_li'+i ... i is 0 for first, 1 for seconde.... Every list have <div> with text with index i and id 'text'+i and some buttons delete, save and edit with same... I have color and hover function - that i do with moduo i%2==0; Thats all works, but problem is when i delete odd or even element, i have to same color one neer other.. How that i can fix. Maybe with for or each loop but i dont
Set cookie dynamic based on id
Hello! I have an Array of items, comming from a data source. What I want to do is to change the background color of the outher div when the user clicks on it. I have and id that can be a number from 1 up to let's say 100. I cannot do this with CSS because of the page will be refreshed after a click so I would like to set a cookie for this. However I cannot figure out how to do this. I use thie jquery.cookies.js <div class="xxx" id="{@ID}"> <a class="yyy" href="example.aspx?Title=@Title"> <div
Issue on Loading Data From MySQL to JavaScript Array of Array Using jQuery Ajax
I have a php and jquery code like below <script> $( document ).ready(function() { var data =[]; $("#submit").on("click",function(){ $.ajax({ type:"POST", url:"map.php", success: function (html) { $('#message').html(html); } }); }); }); </script> PHP <?php define ( 'DB_HOST', 'localhost' ); define ( 'DB_USER', 'root' );
trigger optional param is undefined
I am using jQuery version 1.10.2 I am trying to pass an optional arguments to the click event from trigger... but I am getting an undefined parameter instead.. $("[data-id='" + x[i].itemID + "']").trigger("click", 'something');// line from a different function $(document.body).on("click", ".chb-g", function (event, param) { alert(param); }); so its fire, but the parameter get undefined, and so the 'event. Data' as well get undefined
Modals in responsive design
Hi, I have modals on the images on this page: http://www.johnfieldformalhire.co.uk/evening-wear.html I was wondering how I can rid the the images of their modal links when viewed on mobile as the pics don't need to be shown any larger at that size. I thought about hiding all the content and displaying a simplified version with display:none in the media queries but this seems as though it's long winded and using too much code. Cheers if you can help. R
first tab content not displaying by default
Hello all Forum Members, I am using Jquery version 1.7.1 on my webpage. I have several div's on my webpage. In each div, there is one tab container containing 3-4 tabs. on link click, I am displaying only one div at a time. Problem, I am facing is that first tab content not displaying by default. Code I am using: $(document).ready(function () { //Hide all content $(".tab_content").hide(); //Activate first tab
Wow SLider issues
HI, This is prachi. I have used wow slider animation but it's not working in Internet Explorer 9 and 8 . Can Someone Help me
Maintain scroll position on div when return to page
I have a div in the center of my webpage that contains a table the scrolls horizontally, the table is built in jquery and you simply scroll left to right. The column titles are the links, so that when a category ios click you go to a new page that contains all the documents in that column but htis time you can click to view them. What Im trying to do is then when they click to return to the page, I woudl like the scroll bar to return to the position it was in. Start of output from source code <div
Next Page