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/
Return value from event handler
How can I get a value that's updated from inside an event handler ? For example, I have the following in which I want the coordinates to be returned from the handler: var mx, my; function handler(evt){ mx = evt.pageX; my = evt.pageY; console.log(mx, my); // works good // Say I want to return x coordinate return mx; } var retMX = $("div.test1").mouseleave(handler); // this doesn't happen, how can I make something of this sort?
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 to bind a callback in capture manner?
in Javascript,we can bind a callback like this: ele.addEventListener("click",func,true); the last parameter true will make the event broadcast in a capture manner. but when using jquery,how to get the same result?
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!
Animating (Non-Stop) jQuery Ui Slider On Button Click
Can you please take a look at This Demo and let me know how I can dynamically run the slider from value to max and back to min and again ... $(function() { var slider = $( "#slider" ).slider({ range: "min", min: 1, max: 280, value: 140 }); $('.btn-succes').on('click',function(){ slider.slider('value', slider.slider('value') ); return false; }); }); @import url(https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/images/ui-bg_flat_10_000000_40x100.png) <link href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.css"
Errors I have no clue how to fix
i don't even know where to begin. I installed a theme that I later found out was junk (I know! I'm not an expert, just a girl) Now that I've removed that theme and installed another one, the same issues are happening. The site just won't load and I'm lost. IT's wordpress which I'm sure i'll get yelled at for that too.. :/ Heck, I don't even know if I'm in the right place. If not, please direct me to where to go to figure out what to do. The site is http://godrocks.co I use the option+control+i
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();
Can't display data in input search of a view of laravel 5.2
Please how can tel me what is the solution of this pb: I use jQuery ui in autocomplete input form in laravel 5.2 , but i can display (fig) link laravel 5.2 autocomplete my index.blade.php is: @extends('layouts.app') @section('content') <div class="container"> <div class="row"> <div class="col-md-10 col-md-offset-1"> <div class="panel panel-default"> <div class="panel-heading">Dashboard</div> <div id="search"> <div id="search-wrapper">
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>
JQuery Mobile Select list not working on Iphone
I am trying to load JQuery mobile on mobile devices for a form. The select lists work on IPad but not on IPhone. On IPhone, the select fields are not clickable. If I try to click on it, it will take me to the top of the page. Can anyone help me? I am using a multi-select list and a single select list.
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:
slicknav not working on iphone 6 safari
I have slicknav working on a desktop in chrome, ie, safari and firefox. When I run on the iphone 6 it works in chrome but not in safari. my js function looks like: $(document).ready(function(){ $("#nav_lat").slicknav({prependTo:"#mobile_menu"}); }); the safari console from iphone 6 says: $("#nav_lat").slicknav({prependTo:"#mobile_menu"}); is not a function. Have no idea how to fix this. help appreciated. Updated with the following: If I use: $(document).ready(function() { $("#nav_lat").slicknav({prependTo:"#mobile_menu"});
colorizing datepicker
hey i am new on this forum. I hope i created this discussion in right place. My question is First of all you can create datepickers with + button as much as you want. When you create first datepickers and select the dates check result datepickers. It will be colorized with green. Then create new datepickers and select the dates. New date of range was not applied to result datepicker. It must have red color with highlight2 class. Can you help me to figure out how to solve it thanks. hopefully you
Cannot see debug infos
Check that HTML code pls: I want to see that text before but its hidden by the following result of code: <!DOCTYPE html> <html> <head> <meta charset='utf-8'> <meta name='viewport' content='width=device-width, initial-scale=1'> <title>Pharma Warenwirtschaft Mobile</title> <link rel='stylesheet' href='css/themes/wawi.min.css' /> <link rel='stylesheet' href='css/themes/jquery.mobile.icons.min.css' /> <link rel='stylesheet' href='http://code.jquery.com/mobile/1.4.5/jquery.mobile.structure-1.4.5.min.css'
Image upload
How do I check the height and width of the original image that is being uploaded please? What ever I have tried doesn't work. It needs to be at least 400px wide and 460px in height or the preview gets stretched reader.readAsDataURL(this.files[0]); this.files = (this.height); $( '#cropimage' ).on('load', function() { var image = $(this), cropwidth = image.attr('cropwidth'), cropheight = image.attr('cropheight'),
background-image resized to draw on canvas
I am trying to download a canvas image based on sketch.js and the solution I find is as below. I previously set up and resized a background image on the canvas like this on the SketchPad based on a selector. Then I load in the image from an input. $('#file-input').change(function (e) { var file = e.target.files[0], imageType = /image.*/; if (file === undefined) return; if (!file.type.match(imageType)) return; img = new Image();
Getting a single element from a selection
Hi I am unable to solve this: Write a jQuery Code to get a single element from a selection <body> <ul> <li>Html Tutorial</li> <li>CSS Tutorial</li> <li>JQuery Tutorial</li> </ul> </body> Output should be: 'JQuery Tutorial' Thanks so much for helping me Jayashree
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.
Problem with regular expression and validators
Hello, I am creating a site with classic .net 4.0 and jquery 1.8.3 My problem is: I have 2 textbox with validators (number and date). The validators should work when I digit the characters. This validator works for the first textbox: var txtTestID = ‘#’ + ‘<%=txtTest.ClientID %>’; var reg = /[^0-9]/g; $(txtTestID).bind(‘input propertychange’, function () { $(this).val($(this).val().replace(reg, ”)); }); But ... when I have to validate the date doesn't work: var txtDataRicezioneDa = ‘#’ + ‘<%=txtDataTest.ClientID
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/
Function not bound in document.ready
I have the following script which should bind the input form so that it doesn't refresh when enter is pressed. < script type ="text/javascript"> $(document).ready( function () { $( 'input.form-control' ).keypress( function (e) { if (e.keyCode === 13) return false ; }); }); </ script > However, it just does bind anything to the input. It does work when I try debugging it on firebug, putting a breakpoint from the start. Anybody know why?
$(function(){}); and $(“document”).ready(function(){}); not acting the same
If I use: $(document).ready(function() { $("#nav_lat").slicknav({prependTo:"#mobile_menu"}); }); It doesn’t work on the iphone 6 but it does seem to work everywhere else However, if I use jQuery(function($) { $("#nav_lat").slicknav({prependTo:"#mobile_menu"}); }); It seems to work every where Could someone explain what's going on?
Doubt about JQuery - Bootstrap multiple selection.
Hello! I'm using the jQuery multiselect with bootstrap, and I have a doubt. Need some options are automatically loaded when the page opens, how can I do this? The image shows the three options that need to be loaded automatically when page opens: Thanks!!!
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
Using JQM to Clone a page.
Hi, I have tried a few ways to clone a page and append it to the body. https://jsfiddle.net/m5rco7cv/ Basically I want to clone the page (#pageResult_0) and create a new page with the id #pageResult_1; I know how to clone elements of pages but not on an entire page. Any help would be great. Thanks in advance. PS, I have tried this but it doesn't seem to work either - https://jsfiddle.net/m5rco7cv/5/
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! :)
Ipad click issue
Hi , My HTML Code look like below <div id="ActionTilePastDueWork1" class="actiontile" onclick=""><label text="test"></label></div> <label text="test"></label> <div id="ActionTilePastDueWork1" class="actiontile" onclick=""><label text="test"></label></div> <script type="text/javascript"> $(function(){$(document).delegate('#ActionTilePastDueWork1', 'click',{'actionTileCriteria':'from_whs=@warehouse, AGING_DATE_TIME<GETDATE();', 'url':'/scale/insights/2757?filters=SearchPaneWhs:{{{FROM_WHS}}},SearchPaneAdvCrit_Field:{{{WORK_GROUP}}},SearchPaneWrkTyp:{{{WORK_TYPE}}},SearchPaneAdvCrit_Field:{{{AGING_DATE_TIME}}}'
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!!
How can I determine which tab is open, when a tab is selected?
I have a tab control, within a form, and need to set the controls on each tab page 'required' when the tab page is visible, and to 'not required' when the tab page is not visible. Is there something like an 'onShow' event assignable to individual tab pages that I can use for this purpose? The idea is to place three mutually exclusive sets of fields on each of three tab pages, with all the fields on each page required when the page is visible, but not required when not visible. This is in an effort
Seek bar for non audio element
I have a fake jPlayer audio who's time and progress bar are set to that of the real player so that it looks like they are the same. Here's that code in the source jPlayer.js file: updateFakePlayer: function(realjPlayer) { var self = this; var playlistjPlayer = $(realjPlayer.cssSelector.jPlayer).data().jPlayer; this.status.currentTime = playlistjPlayer.status.currentTime; this.status.currentPercentAbsolute = playlistjPlayer.status.currentPercentAbsolute; this.status.currentPercentRelative = playlistjPlayer.status.currentPercentRelative
image devider cutting off parallax effect ?
I am using a parallax plugin to create a simple parallax background , a simple demo can be seen HERE. Now there is this devider on the page, see below: devider: http://i.imgur.com/hdXLZ6j.png That's actually an absolutely positioned image inside the <main> element , now i have added an parallax effect to the container below the divider, the problem is that the divider is cutting off the parallax effect , how do i avoid that ?
using the Validate plugin with the intl-tel-input plugin?
Hi there We would like to use the International Telephone Input (intl-tel-input) plugin with our existing form which uses the Jquery Validate plugin. Has anyone ever tried to combine these two before? Is it possible? Our form consists of one field, which is to be validated for either email or telephone input. The current logic on the form detects whether an email address is in the field or a number, and changes the validation rules in the Validate plugin depending on the desired format. Thanks in
help installing jquery
hi i am new to jquery and i want to learn it. by the looks of things, you need to know how to work with command prompt, which i dont. can anyone help me with this. thanks. dave.
jquery_cropbox
Is it possible to remove the zoom controls? I can remove the controls altogether but I want the message about dragging to appear when you hover but not the + and - signs. It doesn't look as though you can.
Vertical Slider control...
Hello, I'm trying to use the JQuery slider control in a vertical orientation. The idea is to setup a layout like this: [ total number of items] || [] Percent of leveraging of items n% || [ new item count ] [ used item count ] and as the percentage is changed the new item and used item will be adjusted accordingly. My question first question... how do I adjust the length of the vertical slider? I have found on how to do this for a horizontal slider, but not for vertical, and when attempting to apply
cropbox and upload
I can't see what is wrong with this. When I upload an image it is using the height and width of the previous image not the one just uploaded by the look of it. Thanks <!DOCTYPE html> <html> <head> <title>jQuery-cropbox</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/> <link type="text/css" media="screen" rel="stylesheet" href="jquery.cropbox.css"> <style type="text/css">
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
Next Page