Rebind keypress to element after unbound with one() method ?
I'm trying to rebind a button that was previously unbound with the one() method, like this: $(document).one('keypress', 'button', function(e){ // do something once here ... }).on('keyup', 'button', function(){ // How to rebind keypress to button ? }); Because the keypress event triggers non-stop while a key is continuously pressed, I use the one() method to trigger function only once, and because I need keypress in order to use String.fromCharCode(e.which), how can I rebind button to keypress using
Selecting a tag in jQuery
Say we have html <ul> <li>First</li> <li>Second</li> <li>Third</li> <li>Fourth</li> <li>Fifth</li> </ul> <ul id="results"> </ul> Then if I try $('<li>').text('hi'); nothing happens. What does $('<li>') do as opposed to $('li')? Thanks. Refer to the second example from http://api.jquery.com/map/
Ajax Calls
Hi folks, Using ASP.Net , I am uploading huge files using iframe control, parallely calling Some Webmethod. Untill the upload finishes the webmethod status is showing pending. Irrespective of upload or iframe activity , my webmethod needs to call and return the response. Please advice, Thanks in advance.
SEC7133 MIME- Handling with IE 11
Hi everyone, I was testing my Website with different browsers and under IE(Internet Explorer) 11, I got the following error. SEC7113 "CSS was ignored due to mime type mismatch" File jquery-ui.min.css I only tested IE 11 and Chrome ver: 48.0.2564.109 (I believe is the latest), but this only occurs under IE 11. After looking around and clicking here and there, I find an explanation regarding the MIME-Handling. According to IE it is set in place to prevent people from hacking into a website through
Jquery latest
Hi everyone, Its been a while since I played with Website programming, recently I loaded a webserver module and noticed that the tabs in Chrome didn't displayed properly. What I mean by this is that they appeared as links on the left-side instead of actual tabs. In my Dreamweaver software, it seems fine and everything works as it should. Anyways, I have noticed that my jquery is out of date: <!doctype html> <html> <head> <meta charset="utf-8"/> <meta http-equiv="pragma" content="no-cache"> <meta
Actin based on selected option
I'm trying to get a comand to run instantly when a user selects an option from the select options. My code looks like below. <select title="" name="marital_status" id="marital_status"> <option value=""></option> <option value="Dating">Dating</option> <option value="Divorced">Divorced</option> <option value="Married" selected="">Married</option> <option value="In a Committed Relationship">In a Committed Relationship</option>
Need help to validate with jquery
It work fine but it also add null value need hell to validate Form HTML file <div class="Addform AddP_show"> <input type="button" class="btn btn-success" value="View Project"> <a href="#" class="close1">[ X ]</a> <form action="Add_pro_exec.php" method="POST" name="Addproject" id="Addpro" class="form-horizontal"> <div class="form-group"> <label for="ProjectName" class="col-sm-2 control-label">Project Name:</label> <div class="col-sm-6">
change the values of text box when page load using jquery
I need to change the value of dependent text box when the page load,I did with after the keyup, change and mouseover method, but exactly what i need is changing of values when page load using jquery. here this is my following code,Please help me guys.. $(document).ready(function(){ $("#product").on("keyup change mousemove", '.product-item select, .product-item input', function() { var $line = $(this).parents('.product-item'); var currname = $line.find('.dropdownbox1 option:selected').text();
Need help on ANIMATING BALL trailing light effect
I need assistance on creating a "trailing lights effect" to a .png ball image. I have created this game in AS3. (see attachment (example_effect.swf). I need to convert the animation to HTML5. Which I have allready done. But the problem I am having is the animation. I cant seem to figure out how to animate the "ball" with trailing lights to convert it to html5 animation & also the "zoom effect with numbers". I do have the core animation happening but cant get the effects that represent the .swf
set a default selection on select box dropdown list using jquery.
Here this is my for following code for creating dependent select box using jquery. what i am exactly needed is how to set default selection of dropdown,I am struggle on this selection.Please help me guys... var categories = { "Select":[{value:'select',text:'Select'}], "United States":[{value:'0', text:'Select'},{value:'55', text:'Currency'},{value:'67', text:'Card'},{value:'56', text:'Cheque'}], "European":[{value:'0', text:'Select'},{value:'30', text:'Currency'},{value:'40',
How to get draggable to work in child window?
Hi, I am using the latest jquery and jquery ui. The problem I have is that I open a window. This window I have a webpage inside. If I include jquery and jquery ui into the child window directly. Everything works perfectly. However, I want to use jquery on the parent window to append jquery and jquery ui to the child window and the ui code inside a function. Then run the function from the parent window. It only works if I directly add jquery and jquery ui in the child windows document by modifiying
asynchronous functions
I am building a site which has dynamically generated content entries and some of the info for each one comes from a unique source. This means a dynamic list of content is loaded and then for each item of content a ajax request is made to get some unique data related to it. My problem is this If i make a loop which itterates over the list which an ajax call to get the unique content each itteration of the loop will wait while its ajax call completes. I dont want to do this. I want the loop to continue
Email is not validating
Hi, I have this page: http://careers.meskholdings.com/enter.php I have set the email validation to true as you can see here: http://careers.meskholdings.com/enter.js But it's not validating required rue and not email rule. Kindy help.. Thanks, Jassim
page is showing in Chrome but not in Firefox
I have this fiddle: https://jsfiddle.net/v4qL77e1/5/ It does work well in google chrome but not in Firefox. The contenteditable div is just not showing in it. Can you tell me please how can I take care of it? thanks.
Load image in IE
I'm trying to use load function to get images sizes once they have been loaded. It works in all other browsers, but trying to get it to work in IE10+. The load function is just failing silently in IE. I did see some talk about assigning a date to the src, but it warns against using this for files hosted on CDNs, which this will be. So can you show me how to fix this & play nice w/ CDNs ? $(document).ready(function() { var myz = 100; $('div[id^="myimgdiv"]').find('img').each(function() {
Number of table cells to fil the screen width
Hi everyone, how is possible to fit a random number or table cells with a min width (<td>) based on the device's screen width and the rest of the cells just to wrap underneath? In some short of way I am looking for a responsive <tr> where the cells which do not fit in the screen to wrap underneath... ? Bear in mind that all the cells are with a single <tr> tag. Does that make sense? Thanks in advance. Dimitris
Updating hidden fields
I have 3 fields on an aspx page: <asp:HiddenField ID="hfOne" runat="server" /> <asp:HiddenField ID="hfTwo" runat="server" /> <asp:HiddenField ID="hfThree" runat="server" /> I also have a button as follows: <asp:Button ID="Process" runat="server" Text="Process" /> I wish to: Capture the Button Click Change the hfOne.val based on a function that takes hfTwo.val and hfThree.val. I have the following, which is incorrect: <script type="text/javascript"> $(document).ready(function
Is there any promisses interface for Ajax global events?
According to jQuery documentation, the global Ajax event handlers must be implemented using callback functions on the document. Otherwise, local jQuery.ajax() implement events using promises. Is there a way of doing so for the global events?
How secure are the localStorage?
Hi, I am currently using $_SESSION in PHP to store my session variable specially for checking if the user is signed in or not, user email address, etc. What's the alternative in JQuery and JQuery Mobile? Can I use localstorage as an alternative? Is it Secure? Thanks, Jassim
1.10.0.min.js on cdn not avaliable
Hi experts and support teams, I just realize http://code.jquery.com/jquery-1.10.0.min.js is a dead link? Any chance fixing it? Thanks so much, just used it in a production environment. Not sure if that is a good idea. Cheers, Josh
jQuery AJAX submit form
Hi, I have created a Sub-Total basket here: Sub-Total app on Codepen Everything works fine except of Ajax submit form and the end of my jQuery code. I want that by clicking on the submit button an alert box appears which shows the values of the form as JSON. The alert box should show Something like this: {"items":[{"name":"Cotton T-Shirt, Medium","price":"1.99","cost":"1.99"},{"name":"Baseball Cap, One Size","price":"2.99","cost":"2.99"},{"name":"Swim Shorts, Medium","price":"3.99","cost":"3.99"}],"subtotal":8.97,"total":10.764000000000001,"tax":1.7940000000000003}
Grab emails from URL?
Hi guys I'm trying to grab emails from URL and display. <script type="text/javascript"> $(document).ready(function () { $("#submit").click(function () { var curUrl = $("#url").val(); function extractEmails(curUrl) { return curUrl.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi); } document.getElementById('result').innerHTML = curUrl;
Copy the text to clipboard
I got a variable value from the server. Originally it was from alter window so it is hard to copy/paste the text. So I use the following code to retrieve it. function copyToClipboard(textToCopy){ $("body") .append($('<input type="text" name="fname" class="textToCopyInput"/>' ) .val(textToCopy)) .find(".textToCopyInput") .select(); try { var successful = document.execCommand('copy');
Jcrop not dragging
It uploads the image alright and highlights an area to be cropped but you can't drag the area and I have no idea why? Which bit does the drag or do I have some css missing? I presume it is possible to crop ore than one image on a page with more than one copy of the Jquery code with different field Ids? Thanks function updateInfo(e) { $('#x1').val(e.x); $('#y1').val(e.y); $('#x2').val(e.x2); $('#y2').val(e.y2); $('#w').val(e.w); $('#h').val(e.h); }; // clear info by cropping
jcrop not a function
I am trying to use jcrop I have this at the top of my page <script src="http://studiga.delta-xray.co.uk/sites/all/modules/add_property/js/jquery.min.js?o2190n"></script>
<script src="http://studiga.delta-xray.co.uk/sites/all/modules/add_property/js/jquery.Jcrop.min.js?o2190n"></script>
<script src="http://studiga.delta-xray.co.uk/sites/all/modules/add_property/js/crop.js?o2190n"></script> I have this in my page <input onchange="JavaScript: fileSelectHandler1();" type="file" id="browse_file1" name="browse_file1"
Get a "Save As" dialog to save a part of a webpage?
Before I experiment, I need to know if this is even possible . Let's say I have a webpage with a hidden DIV that's styled with Bootstrap. And let's say when a user clicks a hyperlink that the hidden DIV displays. Let's refer to the hidden DIV as "printMe". Now, Inside the hidden div is some content, and a button that says "Save/Print". When the user clicks this button, I'd like to be presented with a "Save As" dialog, but just for the "printMe" DIV. Is this even possible? And if so, could I hide
problem with input when type=submit
hi, this code not working in jquery : <form action="dologin.php" method="post"> <input id="username" name="username" type="email" placeholder="Email Address" /> <input id="password" name="password" type="password" placeholder="Password" /> <input id="button" type="submit" name="submit" value="Submit" /> </form> form not submit data when click on submit ! how to resolved the problem ?
Slidedown, up and toggle problem!
Hi Guys! I have a problem with jquery, I would like to use slidedown and up or toggle my code <div class="vertical-termekek"> <ul class="nav nav-pills nav-stacked col-md-3 col-sm-12 col-xs-12" id="vertical-nav"><p>Termékek</p> <li class="dropdown"> <?php wp_nav_menu(array( 'container_id' => 'cssmenu', 'depth' => 3, 'menu_class' => 'nav nav-pills nav-stacked', 'theme_location' => 'secondary', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new CSS_Menu_Maker_Walker()
Get array's elements and append them to div
I get the string array from a web service. Now I want to display the data in a div. However it is not working(nothing is shown) Thanks for help. <!DOCTYPE html> <html> <head> <title>Mars</title> <meta charset="utf-8" /> </head> <body> <div id='photo'> </div> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.3.min.js"></script> <script> $(function () { var id = 1000; var url = '/api/Photo/' + id; $.getJSON(url)
Dynamically add dropdown menus and exclude selected options
Hello! As I mentioned in the title, I'm trying to build dynamic dropdown menus. Once user chooses from list option, the same option is excluded (disabled) from other dropdowns. So far I have built Add/Remove functionality. But I have no clue where to start with this problem with disabling selected options. Here's jsfiddle link Any idea where should I start? Any help would be helpful. Thank You!
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
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>
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.
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');
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
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
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
Show dropdown on Button Click
I am trying to show a dropdown list on Button click. Example is here http://jsfiddle.net/mdesdev/2V9Ak/ but with my requirement I want the Button "Testing" to hide and the dropdown show in it place so users can select from it. Any help will be appreciated.
Next Page