How to Add values from checkboxes
Hello Everyone, I am trying to sum the values from the selected checkboxes ... But so far what i am getting is like 2,3...what i want is 5....Can anybody help me out to get this logic please. Thanks!!!! <html> <head> <title>jQuery With Example</title> <script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $('.btnGetSelectedValue').click( function(){ var chkId = ''; $('.chkNumber:checked').each(function()
Change style on auto complete component with combo box
http://jqueryui.com/autocomplete/#combobox I am using the auto complete component with combo box But I don't know how to change the combo box style. eg. size, color...etc How can I change it?
Data-Role Content, Scrolling To The Top Of A Div Inside It.
I am completely flummoxed on how to scroll to the top of an internal <div>. I have created a fiddle here that I hope tries to explain what I aiming to do. The red bordered box holds the content as I wish to maintain state between some pages rather than have it revert to the top before transition. On the large part this is fine but there are a couple of pages that I wish to have the content in its original state starting with the first paragraph. In a browser I can use $('#trial_one.internalDiv').scrollTop(0);
New.. .Need Help
Hey I am very new at jquary. I am in the process of building a website, and I want to add a content slider for her 13 pages of ( modules) , I am using slidorion, but i cannot get it to work and I really do not understand any of the code language... ANY HELP???
Trim unwanted div tag
Hi, I have a value which is of the format : <div class="ExternalClass{GUID}"><p>as</p></div> I want to retrieve the value "as" from it. How to achieve this in jquery? Thanks
Image LOAD and ERROR events are not fired depending the browser in use
I've a very strange problem making work a preloader. I've created a simple preloader for my site that claculates thew status of images load and show a progress bar. With firefox all works fine, while in Chrome and IE some events seems not fired... The site contains 16 image, with Chrome only 15 are calculated (both between success and errors), while on IE only 5! This is the code: $(document).ready(function() { .... var imgsNumb = $("img").length; var doProgress=function(){ lodedSize++;
Draggable connect to Sortable (array of Sortables rather than one sortable reference)?
Is it possible to set the connectToSortable to be an array of sortable elements which are not all the same class? element.draggable({ connectToSortable: [".sortableType",".somethingOtherType",".anotherSortableType"], start: function(event, ui){ }, stop: function(event, ui){ } }); I have an element I would like to be able to drag into multiple locations where each location is made up of different things. I have tried using
jquery
i create one jquery but not proper output get. html: <table id="gvCustomers"> <tbody> <tr> <th style="width:150px;">Contact Name</th> <th style="width:150px;" scope="col">CustomerID</th> <th style="width:150px;" scope="col">City</th> <th style="width:150px;" scope="col">edit</th> </tr> script: $("#gvCustomers tr th").live("click", function () { alert("hi this is tested"); alert(this.text()); }); i want to get perticular header text when i click on header of table but in this only first
How to select cloest td value?
here is the code http://jsfiddle.net/boajay/8RCTT/ i want to select the value (test1),any one know how to do? thx
TinyMCE Plugin
Hello: I inherited a web application and today I noticed it had more than 14,000 entries referring to TinyMCE. I need help. I need to make some edits and I am trying to figure out where this plugin is connecting to the database. I cannot figure it out. I go to the front end and search on the element, then go to the back end and search by name and I get this: tinymce.PluginManager.add("link",function(e){function t(){function t(){i||0!==o.text.length||this.parent().parent().find("#text")[0].value(this.value())}var
Accordion: Internal links inside content won't open a different section in Accordion.
Newbie here. I really enjoy this widget but I am not sure how to get an internal link to open another panel. For example, say there's a link in Section 3's content that links to content inside Section 2. Not sure how to go about modifying this code to make it work in the way I would like it to. Thank you to anyone who can lend a hand!
Is it possible to rename and order the table columns?
I am truly to have to come back here again today. I have googled all day looking for solutions but came up empty. The code below was generously provided by Godsbest. $("#example").on("click", "a[target='tab']", function(){ var me = $(this); var url = me.attr("href"); var tabName = me.data("tabName"); var tabIndex = parseInt(me.data("tabIndex"), 10); $.get(url, function(data) { var table = $( '<table cellpadding="4" width="100%" cellspacing="0" />' ), tr = $( '<tr/>' ), td
jquery get value from drop down
how to get values from one drop down list to another drop down when check box is clicked eg: if state drop down is in Current Address and when Check box is clicked Address is Same as Above it should display State name Same as Current Address in Permanent Address
Why won't ".end()" work if used after ".first()" in a chain?
Hi, I have a simple bit of script. changeToCollapse.toggleClass('box box-default').toggleClass('slab-pane').addClass(active) .children('.slab-pane').toggleClass('box-collapse collapse slab-pane') .end().children('div').toggleClass('box-collapse collapse').attr('id', 'collapse-' + $this.attr('href').replace(/#/g, '')) .children().first().toggleClass('box-body') .end().end().children('header').toggleClass('box-heading')
jquery .each() within a json array
Hi! From the server side, PHP sends such a json object: {"status":1,"recId":"PL-17534","collectionDate":"08-04-2014","collectorsName":"asdf","donorsName":"","sciName":"asdf","family":"asdf","comName":"asdf","variety":"","area":"asdf","photoFiles":["1.jpg","internet.jpg"]} So i want to change the html content of an element , by customizing the contents of json object in the photoFiles array. I tried something like this but doesn't seem to work $('#photosTab').html(function(){ $.each(json.photoFiles,
audio works in IE9 but not IE11
I have some jquery code that calls a function called playSound, which plays a sound file when a dialog box opens. The sound file plays in firefox but not in IE11. It even plays in IE9. Does IE11 require some specific programming? I'm using jquery-1.8.3.min.js function playSound(soundfile){ $('#dummy').html("<audio autoplay='autoplay'><source src='" + soundfile + "wav' type='audio/wav' /><source src='" + soundfile + "mp3' type='audio/mp3' />Audio tag not supported.</audio>"); } playSound("media/alert.");
Ajax success value to parent function
Hi I am trying to get the Ajax function return values. <script type = "text/javascript"> function GetString(key) { alert(key); var keyValue = ""; $.ajax({ type: "POST", url: "ajax.aspx/GetString", data: '{key: "' + key + '" }', contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { keyValue = response.d; alert(keyValue); }, failure: function (response) { alert(response.d); } }); return keyValue; } </script> <script type = "text/javascript"> function Getdata(key)
Make a cross domain Post with credentials and a callback
I'm trying to Post some variables Cross Domain using jquery's ajax method. The user's credentials must be accessible on the receiving end, and there must be a callback (containing a redirect) that doesn't fire until the post is "done". With the traditional callbacks basically getting ignored, this synchronous approach looked promising as it essentially "waits" until the post is finished. But, while this works perfectly in Chrome, it fails in FF And, naturally nothing works in IE, including the passing
How to prevent double click change state on Menu?
I have a navigation tab which on click adds a class, say "active". The problem is when i re-click on "active" it goes back to "in-active" state. Can some one help me here. Link to JSfiddle: http://jsfiddle.net/EGR65/ The script goes like this : <script>(function($){ $(document).ready(function() { $('#yolloSwag a').click(function(){ var x69_Ownage = $(this).find('.showDropDown_X69').toggleClass('active_X69Arrow'); $('.showDropDown_X69').not(x69_Ownage).removeClass('active_X69Arrow'); var active99
Horizontal slide between two ul : different positions
Hi ! I'm trying to create a slide between two <ul> tags when I click on an image button. Click on the "image button" at the top right corner to see : http://jsfiddle.net/Xroad/CnSEa/3/ $('#content-clients').css('left', '150%'); $('#btn-clients').click(function () { $("#main ul:first").animate({ left: '-150%' }, 500, function () { $(this).css('left', '150%'); $(this).appendTo('#main'); }); $('#main ul:first').next().animate({ left: '0' }, 500); });
Can't get formatcurrency to work
Sorry, I know I'm messing up something basic but I can't get this to work. I used this demo with the on blur sample: http://www.bendewey.com/code/formatcurrency/demo/ Can't get it to work. Here's my form with the field Projected Start-up Value: http://youradminpartners.com/sales-contact-entry/
Customize Cycle2 Controls
Is anyone aware of a setting in Cycle2 which will allow the user to hover over the slideshow to make the prev/next control images display? I want the control images to display in the lower right of the slide show when the user mouses over any part of the slideshow. Currently, the user has to mouse over the cycle-prev and cycle-next divs; which span the slideshow top to bottom. That method does not allow me to place the controls together since the user would have to "fish" for them to make them
Is it possible to define Offset value for scrollTop?
I have the following script, <script> $(document).ready(function(){ $('#yolloSwag a').click(function(){ $('html, body').animate({scrollTop: $('#Dailyoffers_X69').offset().top}, 999, "easeInOutQuad" ); return false;}); }); </script> This perfectly works fine and scrolls to the div#Dailyoffers_X69. But I was wondering if it is possible to define the offset value relative to the div#Dailyoffers_X69, say +-10px etc.
jstree - how to use method get_top_selected
Hello jsquery users I am trying to use jstree plugin. The tree is viewed perfectly and the leafes are perfectly selectable. I want to push a button and then get displayed the selected nodes. I looked up many proposals and tutorial but could not yet solve the issue. my html form looks like: <form id="suchphrase" name="suchphrase" method="post"> <button id="summary" class="btn">Summary</button> </form> <div id="jstree_demo_div"></div> my js is as: Can you help me with this?, Thanks for assistance,
jquery Cycle -- slideshow
Using jquery Cycle plugin, how can I use the "prev" and "next" buttons to cycle through images ( more than 2) without using the pager method? Can someone help with with an example? Thanks in advance.
Themeroller download not working?
I am trying to use Themeroller for the first time and can not get the download function to work. When I click the [Download Zip] button nothing happens. I'm using a Windows 7 PC running the latest version of Chrome and Firefox and get the same result in both browsers. There is no error and the browser doesn't appear to be doing anything. Here is the test theme I created: http://themeroller.jquerymobile.com/?ver=1.4.2&style_id=20140430-97 Any guidance or advice would be appreciated.
UX: JQM Header renders incorrectly for several seconds when page is loading.
JQM V1.4.2 Browser: Chrome, Firefox. Platforms: Android V4.x. The browser window paints the jqm header very weird when the page is loading (see video). The content spans several lines in the browser. After a few seconds (10 seconds on a smartphone, which is rather long) the jqm header is displayed correctly once all CSS/JS is loaded and executed. Screencast: https://dl.dropboxusercontent.com/u/5629939/temp/20140430-jquery-mobile-header-startup-gui.mp4 The video was made on a desktop, on a smartphone
Help with magnific popup plugin
Hey. I need help wih this plugin. It's a part of Ultimate Shortcodes Plugn to wordpress. I would like lightbox to shwnot only picture and title but also a content of the post. How can i make it? Now it looks like this: <div class="mfp-figure">'+ '<div class="mfp-close"></div>'+ '<div class="mfp-img"></div>'+ '<div class="mfp-bottom-bar">'+ '<div class="mfp-title"></div>'+ '<div class="mfp-counter"></div>'+ '</div>'+ Here mfp-title gives me the title of the post, i would like to get content as well.
values comparations
I have two values and I need to compare both, well I have this code but when I do something like this the code doesn't do anything in the if part. var speechtext = $("#speech").val(); speechtext = speechtext.replace(/ /g, ''); var cedula_2 = new String(speechtext); var elements = document.getElementsByClassName("index"); for (var i = 0; i < elements.length; i++) { var prueba = elements[i].innerHTML.replace('<span id="MainContent_dt_estudiantes_lblcedula_', ''); prueba
Loop through DIV storing REST Values
Hi all, I have created a div to store values from a REST call as follows: $("#projectSiteVariables").data({ "projectTitle": value.Title, "projectTitleID": value.SiteTitleID, "projectActiveTitleID": value.ActiveSiteTitleID, "projectArchivedTitleID": value.ArchivedSiteTitleID, "projectTypeID": value.ProjectTypeID, "projectYear": value.Year, "projectSCURL": value.SiteCollectionURL
Help add more 'if' to code
Hello My code checks the username entered in a PHP file. The jQuery then displays if the username is taken or not. I have added code to the PHP file to also check if the username is below 3 characters or over 16 characters. How do I add another if within this code to display the correct result? I know the code will be if(d=='under'){ $("#usernamemessage").html("Username not long enough"); } But don't know how to implement it into the exsisting code. Thanks <input type="text" id="txtusername">
reading table values using jquery
As it is evident from below question, I am new to jquery. I have a table that is defined as : it has only 2 columns (but can have multiple rows) and I am trying to read the values using jquery. I can read the first column(drop-down list) fine. But the second column ( <input type="text" ) does not work. Any idea why? $('#studentTable > tbody > tr' ).each(function () { var $tds = $(this).find('td'); var $studName = $tds.eq(0).find('option:selected').val(); //works var $food = $tds.eq(1).val(); //doesn't
Toggle or Mouse Event Img size
I have images inside a div with a class, that I want to resize on mouseenter, go back to size at mouseleave. For some reason I cant get it to work. Any thoughts of what I'm doing wrong? I also tried Toggle and that wouldn't work either. Thanks! <script> $(function() { $(".single_entry img").animate({ width: 100}, 500); }); $(".single_entry img") .mouseenter(function() { $(this).animate({ width: 300
change transform attribute of g in D3.js calendar view
I am referring D3.js calendar view http://bl.ocks.org/mbostock/4063318. everything is working properly. but the issue is my data is something like: [{"Date":"04-26-2014 17:39:29","Available":"10","Open":"90","Low":"80","High":"90","RGraph2":[{"Date":"04-29-2014 17:39:29","Available":"10","Open":"90","Low":"80","High":"90","RGraph2":null},{"Date":"04-28-2014 17:39:29","Available":"10","Open":"90","Low":"80","High":"90","RGraph2":null}]},{"Date":"04-24-2014 17:39:29","Available":"10","Open":"90","Low":"80","High":"90","RGraph2":null}]
jquery.validation.js error display handling
Hello, Source: http://jqueryvalidation.org/ I have questions, i noticed that when i use the same id tag the error messages shows up in random places. for example. <input type='text' class='required email valid' id='inputstyle' name='test1' /> <input type='text' class='required email valid' id='inputstyle' name='test2' /> <input type='text' class='required email valid' id='inputstyle' name='test3' /> The names are different but the id's are the same, if input test3 is wrong the error will show up
Event.keyCode always return 'undefined' in .on('input')
Hello guys, I was wondering to create a ticket to report a bug, but I read that I need ask here first, so here I'm. I have a specific problem in the startup I'm working on that is solved by the following jQuery method: .on('input', function(){ }); The 'input' event trigger every action inside an input or textarea (copy, paste, focus, keyup [I think]). The thing is: I didn't want an alternative to this method, I already solved my problem using a 'quick fix', I just want know why the following
fading stopped working locally
Hi all I am developing a site and for the life of me I cannot see why jquery fading or sliding will not work on my site (which I have used many times before in the past on other sites). Take this example: $("#loginform").fadeTo('slow', 0, function() { $('#loginform').remove(); $("#forgotpassword").fadeIn("slow"); }); Now, all that happens when I click a link to trigger that code, the #loginform disapppears without fading out and the #forgotpassword appears
Autocomplete source
Hi, I am struggling with the source option in autocomplete. The source data arrives as XML so I trying to reformat the data into an array of objects on success but the response callback does not work for me. In the code below, the first function for source does the correct server request and the array produced by jQuery.ajax.success is in the correct form AFAIK. jQuery("input[name='cod']").autocomplete({ source: function(req, response) { jQuery.ajax({
Page scrolling to top of page before transition?
Using JQuery Mobile, is there anyway to stop the page scrolling to the top before a slide transition? I am using JQuery 1.11.0 and JQM 1.4.2. PS, Is this just a perculiarity when viewing on the desktop and fine on the device?
shapeshift plugin: how to use
I need to have a page which looks like this ( http://mcpants.github.io/jquery.shapeshift/ ). What will break down for a novice ( used python but not jquery) to have it run successfully. I am querying a list from database and want to throw it in a container ( like in link above ) and have user throw selective in the other container and do operations on selected ones.
Next Page