How do you use promises with jQuery?
I'd like to run _this.showDialogBox(e);
before if(!(e.target.id === "primary-checkbox") {
$('mini-box').hide();
}
using $.when().done( function(e){ });
Trouble using toggleClass on bootstrap's icon-bar
I am creating a special "hamburger" icon which, when hovered over, changes from transparent with white lines to yellow with black lines. Because I want the lines to change color when you hover over any portion of the box, I assumed that I would need to use jQuery (or at least javascript) to add a class to the icon-bars. I am having trouble figuring out how to do this. First, here is the HTML I'm trying to manipulate: <nav role="navigation" class="navbar-default nav-container">
Duplicates images and other info $.each
Hi, I'm recieving info from steam api and everything works good until I need to display the data using jquery. As u can see in this photo the 3 avatars are displayed. But in each column should be only one avatar, not all three. Also as u can see the "STEAM nuoroda" repeats 3 times also. This is my html code: <div class="profiles col-md-4"> <div class='userinfo'> </div> <p>Slapyvardis: <strong><span class="personaname"></span></strong></p> <p>Steam URL: <strong><span class="steamProfile"></span></strong></p>
change array separator using jquery
Hi, in my application on the click event of check box ,i want add particular value to array here is the code var ids = [];
$('body').on('click', '.chkbox', function () {
var jj = $(this).closest('tr').children('td');
var bb = jj.eq(5).text();
ids.push(bb);
}); this is working fine my requirement is to change the array separator. now it is comma. i want to change to semicolon normally my array returns like this jain-1,0,0,1,baiju-0,1,0,0 this
sum total value of button(clicked or selected)
hi everyone, i'm stuck on something. i need to know how possible it's to get the sum value of buttons click in a DOM. Usually, if a radio button is used i get the total value using these codes. $("[type='radio']").change(function () { var totalPoint = 0; $("[type='radio']:checked").each(function () { totalPoint += Math.ceil($(this).val()); }); however i'm using a group button in this case. Is there anything i could do? help me please. here's my fiddle just in case. https://jsfiddle.net/samcyn/d4Ljeqdt/
Superfish error on validation
Hello, I am using a superfish script to create drop down menus. It all works OK but when I try to validate the html code with W3C I get the following error message: Sorry, I am unable to validate this document because on line 47 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication. The error was: utf8 "\x91" does not
How do you convert a jQuery DOM element to a string you can use in a jQuery selector?
Let's say you have this code: var element = $('.gaiaElement').closest('#brand_container');
How can you use element to improve the following selector: $('.main-content');
Need help replicating an 'ease in/out' effect on one item in a menu bar
Hi guys! Could really do with some help with this - my site is located at http://www.davidmulqueen.kaen.org/RodgersCruiseHire/index.html Basically, I've altered my JS/JQuery to stop it picking up the last item in a list which comprises my menu bar ('gallery') so it can function as an anchor/link instead of a popout window. Because of this, I've lost the cool ease in on load/ease out on click effect the other menu items have. Any idea how I'd go about restoring this? Thanks in advance!
Hide and element and show another element
Hi, In my jQuery code I want to achieve that by clicking a link one element replaces another element: My code on Codepen Now the problem is that if I click the link ("Click me to swap"), the visible element fades out but the hidden element which should show, doesn't show. This is the jQuery function: function upload() { var i = 0; $('#upload').on('click', function() { i++; $('.upload-wrapper__item__icon-container--upload#' + i).remove(); $('this').closest('.upload-wrapper__item__icon-container--file').show();
Multiple DIV slides using Jquery
Hello, Im very new in Jquery and I was wondering if somebody can help me. I got from the next link a DIV slide what I wanna use: https://forum.jquery.com/topic/slidetoggle-multiple-divs-31-5-2013 Only, not next to eachother but above eachother 1. Question Answer 2. Question Answer -----------> 14. Question Answer The next I have: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
I am using two version of jquery pulgins in one file
I am using two version of jquery pulgins in one file
Desired jQuery action works only once and never again. Is there something obvious that I'm missing?
I'm trying to make a photo gallery from scratch. If one image is clicked, it should enlarge and all other disappear. If it's clicked again, everything goes back to normal(this one shrinks and others fade in). My code works, but only for one time. What is wrong with it? Is there something simple that I missed? Thank you for your help. <!Doctype html>
<html>
<head>
<title>title</title>
<meta name="viewport" container="width=device-width, initial-scale=1.0">
</head>
<body>
<style>
body{
background-color:
Adding a hyperlink to a jquery script
Greetings, I am looking to add a hyperlink to this script. jQuery( document ).ready(function() { jQuery( "<div>INSERT HYPERLINK HERE</div>" ).prependTo( "#content" ); }); is this possible with this script, any adjustments I would need to make. Hope it helps.
jquery message isn't showing
I have this code. It should show an error when trying to submit empty form - but it does not!. why is it happening? please tell me what's wrong with code. Thanks. https://jsfiddle.net/wpxk6fz8/
Gallery with lightbox
Hi, I created easy gallery with lightbox. Jquery code: $(function () { var currentIndex = 0, lightboxLis = $('.light-box li'); var overlay = $('<div/>', {id: 'overlay'}); overlay.appendTo('body').hide(); $('.thumbnail li').click(function () { overlay.show(); currentIndex = $(this).index(); lightboxLis.eq(currentIndex).show(); //put next prev show here otherwise it won't work due to your hover //when you hover the next prev button in your old version
Serial Number for dynamic table using jQuery
I have a dynamic table which has 2 dynamic rows .i.e students and their subjects and marks. The code is below : Click here to view the code Everything is working fine except, the serial numbers are not generated dynamically! Where could I have possibly gone wrong? Would appreciate any help/ suggestions! :)
Soo.. i just made an image slider
I made an image slider and succesfully inserted into my webpage BUT..................I cant figure out how to move it and it only shows a top portion of all the images. somebody HELP ME!!
Start new whatsapp conversation
Hi, I want to know how can I have jquery to start a new blank conversation with mobile number +123456789 when clicking on a link? Thanks, Jassim
multidimension json array
Hi there, I have a multidimension array: { "errorCode": 200, "errorMsg": null, "obj": [ { "comparableInfo": null, "id": 1, "name": { "comparableInfo": null, "val": "EUROPA", "id": 0, "description": null, "traslation": { "EN": { "comparableInfo": null, "lang": null, "val": "EUROPE" }, "IT": { "comparableInfo": null, "lang": null,
JavaScript Questions ?
Hi, can someone ask questions about JavaScript as well on this forum ?
Control Scroll in Child Page From Parent Page Using jQuery
Can you please let me know if it is possible to control the scroll to element which is in child page from parent page? Lets say I have a.html like this <div id="header"> <a href="index.html">Homepage</a> <a href="2.html#app">App</a> <a href="2.html#map">Map</a> <a href="2.html#tap">Tap</a> </div> and in 2.html I have <body> <div id="app" style="height:600px;">App Section</a> <div id="map" style="height:600px;">Map Section</a> <div id="tap" style="height:600px;">Tap Section</a> </body> now what I
the function each and map?
jQuery.each( array, callback ) jQuery.map( array, callback ) in the callback of each,keyword this will point to the iteratee of array, while of map,this will point to the global object. why design it like this? sorry for my English.
check for 2 actions user makes on submit
Hey everyone. I have a function that should check if a div is empty and also if a user clicks the submit button at the same time. If both are true then I want to return an error to him. I just don't know how to define the 2nd variable (var submit) of the click event with Jquery. can you help me with this little puzzle here?
How can i make two functions into one ?
Change and Ready function are duplicating. can i make it one ? $("#aus_state").css("display", "none"); $("#company_country").change(function(){ var country = $("#company_country option:selected").text(); if(country == 'Australia'){ $("#other_state").css("display", "none"); $("#aus_state").css("display", "block"); $("#company_post_code").attr("maxlength","4"); } else{ $("#other_state").css("display", "block"); $("#aus_state").css("display", "none"); $("#company_post_code").attr("maxlength","10");
$.post, $.ajax, $.get making server request using old values
I have a problem with my $.post and $.ajax function. I have a basic structure of the function but I do not understand why whenever I make a post request or ajax request(cache set to false), my php script receive old requested value sent before my current one.. I dont have any idea why it receives value from old request instead of new one. Any help would be much appreciated.
how come there is the function $.fn.ready?
$.fn.ready(callback) ,it just bind the callback to the event DOMContentLoaded for the document node. so,why not make it be a static function mounted to the $ object? it's strange to make it a function mounted to $.fn
Opening As one Closes + Refactoring
Hi, Hope you're all well. I'm building a menu which opens another menu, total of 3 tiers. At the moment the menu works great - but the panels overlap each other as they open. Ideally i want to open the sub menu which closes the previous one so only one menu is open at a time. I have done a fiddle for you to see. https://jsfiddle.net/ev35gu2b/ Please help, many thanks.
trigger a radio button change from a link
can I do that calling a radio event from a normal a link ? var form = $( "form[name='checkout_form']" ); var rd_shipping = $( "input[name='radio_shipping']" ); // a radio button var shipcalculate = $("#shipcalculate"); // an a href link rd_shipping.change(function(){ form.submit(); }); shipcalculate.click(function() { rd_shipping.trigger("change"); }); thanks to all
Having Issue on Looping In JSON File
Can you please take a look at This Demo and let me know why I am not able to load all objects in the JSON file under `utility` into the table var data = { "utility": { "Water": { "account": "99999", "balance": "5555", "owner": "Fred" }, "Phone": { "account": "7777", "balance": "6666", "owner": "Mark" }, "Power": { "account": "A9885", "balance": "2222", "owner": "Suzan" } }, "clients": { "David": { "account":
.click(function() input.focus()
Hi when clicking a normal link i'd like to put the focus into an input type text the following doesn't work jQuery(function($) { $('#link_any').click(function(){ $('#input_any').focus(); }).trigger("click"); }); thanks to all
select box get selected value onload
Hi ! this code actually works for me but only when select box change jQuery(function($) { /////////////////////////////// $( "#selectbox" ).change(function() { var country = $('#selectbox').val(); if(country == 'extra'){ $('#selectbox-extra').attr('data-hidden', 'show'); } else{ $('#selectbox-extra').attr('data-hidden', 'hidden'); } }); ///////////////////// }); I want to check onload AND onchange if option = 'extra' is selected and then apply or not $('#selectbox-extra').attr thanks
Problem with jQuery snapping / scroll to
Okay, here's the site I am working on: http://cf5.e6f.myftpupload.com/?nocache=1 I suggest checking it out on a mobile device, otherwise you'll need to do it on a desktop with your browser window as small as it can go horizontally, and also shrink it up vertically as well to mimic a mobile screen. Now, start scrolling down until you get to the 'Resume' section. You'll see the issue I have. The content for the 'Resume' section exceeds the viewport since it's long. However, when you scroll down, it
JQuery 1.12.0 and old browsers
Hello! After update 1.11.3 version to 1.12.0 I got problems with old browsers. Error sounds like "NS_ERROR_XPC_NOT_ENOUGH_ARGS: Not enough arguments". Looks that problem is third argument in removeEventListener, in some places calls running without it. I know this argument is optional, but in older versions it always passed. Any ways to fixing it? Thanks for feedback, Dmitriy
How to put a loader inside a for loop that calls JSON
I do a Json call in a for loop and at every cycle it inserts a record to a database. Everything works good but sometimes it would just skip the for loop and not insert any record even though in the DOM I can see all the selected items that needed to be added to a database. My question is there a way I can trap such issue? I"m thinking putting a wait loader would not allow user to submit the form until it completes all cycle. How to do that? or is there a more efficient method to call JSON instead
$.get not displaying all the data?
Hi everyone, I am trying to see the data that is seeing being loaded with the $.get function. Unfortunately, $.get("index.html",function(data,textStatus, jqXHR) function data (member) is not returning everything in index.html? I don't know if the dev tool in Chrome is just clipping off after a certain section (kind of letting you know information keeps on) or if data is simply not returning everything on the page? <div class="center_reset_… " <---- This is the last line data returns or sees (notice
Resizing boxes to fill empty space
Hello ! I am using this code : CSS main span{ display: inline-block; height:250px; line-height:250px; margin:0px; border:1px solid #efefef; min-width:200px; max-width:350px; } HTML <main id="main"><span class="items"></span><span class="items"></span><span class="items"></span><span class="items"></span><span class="items"></span><span class="items"></span><span class="items"></span><span class="items"></span><span class="items"></span><span
jQuery add and remove Class breaks on Chrome
Hi, I have this custom slide in animation based on css transitions with add and remove Class. Example at:http://codepen.io/TheEnd/full/pgGJWX/ The code goes like this, ///* animate code start here currentSlideX_Wrapper manipulation - .slide */// var currentSlideX_Wrapper = $this.parents(".slideX"), nextSlideX_Wrapper = currentSlideX_Wrapper.next(".slideX"); //animateInNextSlide currentSlideX_Wrapper.removeClass("active");
Menu that is similiar as compose
I'm creating a compose that you can add text inside of a body and I'm looking for meny that you can use in order to edit the text. Do you know where I can download as a open source in relation to web development? Thank you!
Problem updating value using DatePicker in a dynamic table
Hello. I am trying to work on a HTML table where the user can select a checkbox and update a date value. Here is the DatePicker function and the JSP definition of the table: $(function () { $("input[id$='ModifyStatusDate']").datepicker({ dateFormat: "yy-mm-dd" }); }); <tr> <td align="center"> <input style="width:50px;" type="checkbox" id="selectedSched"
Why doesnt Dialog open before each runs?
It seems I cant figure out why I cant get a dialog box to open or a div to show/hide before the each function runs... even though I place the open action before the .each function. The Show function only runs after the each function is completed. How can I get apDiv1 to show, then the each function works , and when done hides apDiv1? Thanks in Advance $('#ApplyM1').click(function() { $('#apDiv1').show(); $('.checkbox1').each(function() { // my stuff }) $('#apDiv1').hide();
Next Page