Mozilla firefox issue with keyboard events
Yesterday, I posted this and was told that I should use event.which instead of event.keyCode for keyboard events, and that was good. But even after switching to using 'which', there is still an issue, and it is only with Mozilla Firefox 38.0.1 -- the backspace key isn't working. If you try the following code on IE, Chrome, and Opera, you will be able to type in letters and backspacing as well, but not with Mozilla Firefox: <!DOCTYPE html> <html> <head> <title></title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
Mozilla Firefox 38.0.1 not compatible with jQuery???
This is weird. The following code snippet works fine with the latest versions of IE, Chrome, and Opera, but will not work with the latest Mozilla Firefox ver. 38.0.1. Can someone please tell me why?? Could this be a jQuery issue?? The code snippet is right below. <!DOCTYPE html> <html> <head> <title></title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(function() { var sAllowableCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
Click not working on dynamic div
Dear jQuery Forum, I'm trying to perform a click function inside a dynamically loaded div. I've looked and implemented many of the tactics I've run into and none of them are working The code that I'm running to load the div: $ ( window ). load ( function (){ function showitusers () { $ ( "#creatorsettingsdiv" ). load ( 'http://XX.XX.XX.XX/quizzes/js/creatorusersdiv.php' ); } $ ( "#creatorsettingsusersbutton" ). click ( function () { var usersvar = showitusers (); }); }); This loads creatorusersdiv.php
appendTo in 2 directions not working
I set up this jsbin so you can see my problem. My appendTo is working going to the right, but I need it to go to the left as well. If I add the first 2 items to the right, clicking on those elements should bring them back to the left. What am I doing wrong here? http://output.jsbin.com/fukegiweta Edit: Another question: Is there an easier/better way to do this?
Span Class String Replace On Click?
I'm hoping someone might be able to shed some light on how I can replace a span class identifier using JQuery. The current code which does not work is as follows: $('#my-navicons a span class').text(function(index,text){ if (this.nextSibling.nodeValue = my-menu-openicon' { this.nextSibling.nodeValue = this.nextSibling.nodeValue.replace('my-menu-openicon', 'my-menu-closeicon'); } else { this.nextSibling.nodeValue = this.nextSibling.nodeValue.replace('my-menu-closeicon', 'my-menu-openicon'); } });
Search one object from array comming from ajax result ?
Hi, I'm trying to figure out which method of jQuery is used to find an object based on a property value of an object in a collection that comes from an Ajax call. Here's what the collection looks like :
Issues in safari iOS 8.3 loading scripts.
Hello and Thank you in advance for your help. Here is the issue that we are having: We are having issues 50% of the time loading jQuery ONLY in Safari on iPhone and iPad with iOS 8+. Also everything works just fine in PRIVATE BROWSING WINDOW in safari. Same issues in iPad and in addition to that ipad used cannot add items to the cart. Also CSS styles are not loading properly 50% of the time. In Chrome... orepa... firefox etc everything WORKS FINE with zero issues. we have tested in iOS 7 and everything
Need help selecting an element from a jquery response
Hey Guys, I am trying to get the value of a hidden input element from a jquery ajax response. The default value for the hidden element is 0. But after the jquery post has been completed the hidden input value attribute gets changed to a different number(by php) For some reason when I select the element from the data var (the response variable) and pass it into the html() function, it shows the value as 0 for the hidden input Below is my code... any help would be really appreciated!
jquery function for getting div inside row Table
I have two jquery functions. They both should produce same result: showing a div. <script type="text/javascript"> jQuery(function ($) { $('a.lnk_showCheck').click(function (e) { e.preventDefault(); $('div', $(this).closest("td").next()).show(); }); }); </script> <script type="text/javascript"> function ShowCheck() { $('div', $(this).closest("td").next()).show(); }; </script> Basically, both functions find div inside a row of DataList and show it when LinkButton is clicked. <asp:DataList ID="MyDataList"
Add option depending on :visible items
Hello!!! I'm asking for your help one more time I put a jsfiddle http://jsfiddle.net/ladobonline/ybu4axhy/10/ I'd like to add <option> in each <select> depending on the visible items. I mean: If I have categories: 1 and 2 and provinces: 1 I would like to offer just those options in <option> tags. Would you please give me a clue? (note I'm using 'data-*' to determinate which element belong to each category or province.... Jake!!! ;) THANK YOUUUU
Jquery keypress, keydown, keyup, input working.
I have a requirement such that in a input text box, on each value entered a validation has to occur and after the 6th character is entered a hyphen has to get appended to the string. The solutions which I tried and the problems I encountered are listed below: keyup - It is working perfectly for detecting each character entered and appending a hyphen except that "it will send only a single key entry for a long key press". Ex: If I keep '9' pressing for a long time, the value in the text box will be
Callback gets fired with an alert function is present and it does not fire without an alert?
When the alert function is present (shown below), the callback function gets fired and everything works. When the alert function is not present, the callback function never gets fired. function getTableData(tableName, startRow, endRow, callback) { CK.getData = $.getJSON("getTableData.php",{tN: tableName, sR: startRow, eR: endRow}, function(dataTable){}); alert("test"); CK.getData.done(function() { // load data inside table using an $.each function... callback(); // works only when the alert function
In jquery-1.11.0 , what is the purpose of jQuery.cache[elem[jQuery.expando]]?
The document mode for my application has been recently upgraded from IE8 to Edge. This is a simple change of content attribute for meta tag in _Head.cshtml. < meta http-equiv ="X-UA-Compatible" content ="IE=edge" /> The application is working as expected for most of the pages, but breaks where many dropdowns are rendered. The dropdown lists the record, however, does not let the user to select a value. In the console, you can find the error as: SCRIPT28: Out of stack space. This issue can be replicated
JQuery Toggle Slide Function
I'm sure this is a simple fix, but I can't figure it out. When clicked, the following code it MEANT TO turn my hamburger to a 'X' and at the same time create a slide down toggle which opens "header-nav". Once clicked again (now on the 'X'), it turns back into a hamburger and the "header-nav" is slide back up and hidden away.... but... what it's actually doing is the opposite. It shows the 'X' when it's closed and the hamburger once it's opened. Hmm. Any ideas? HTML: <div class="skip-links">
RGBA not working on IE7
Hi, Can someone tell me how to make rgba work in IE7 and IE8? I want to make a transparent background-color to animate when hovering over an object. I don't know how to make it work in IE7 and IE8. This is my code; <script> $(function(){ $("#live").hover(function() { $(this).stop().animate({ backgroundColor: "rgba(88,62,70,0.5)"},1000) $(this).find(".hover").stop().animate({opacity:"1"},1200) },function() { $(this).stop().animate({ backgroundColor:
Binding .colorbox with .on()
The colorbox jQuery plug-in works fine in the base document. I have tried several times to place binding code in the displayed document which pulls in the content with colorbox using jQuery AJAX .load, and have failed. I have googled for examples, found some, but they are too complicated with extraneous coding for me to copy and modify. I thought binding colorbox would be something simple. So, I just follow the .on() syntax with $(document).on(“click”,function(){ $('a.gallery').colorbox({rel:'gal'});
How to use these methods?
This method is available in angular js. This method is also mentioned in this web page. ==>https://docs.angularjs.org/api/ng/function/angular.element But that does not explain how to use these methods. inheritedData(key) please give me some examples. These days I am studying angularjs. I could not find any example.
$('#filename2 input').val('skjsjdkjsdkskd') <---- Failed
$('input#filename2').val('skjsjdkjsdkskd'); ---> Worked well. [Why did they fail????] $(#filename2').val('skjsjdkjsdkskd'); --> Failed $('#filename2 input').val('skjsjdkjsdkskd') <---- Failed
The same img tag works in Chrome, not IE. Why???
<body> <img src="img/I have a family.jpg"> The above code produces a good image in Chrome. But it doesn't in IE. Why??????
A href link won't fire, if included within another click event
Good day, Can you please help me. I have a datatable. When a user click on a row for the first time, it will open a detail row under the top row. Within the detail row, I have a href hyperlink, and when this is clicked it supposed to link to another page. But the hyperlink didn't fire at all. To elaborate further, if the first column of a top row is clicked, then a detail-row will be displayed under it. In the detail row, there is defined a hyperlink to another page. My code snippet is below: $('#tblTutors
Inline Form Field Edit
http://jsfiddle.net/rv374kmt/1/ Im Trying to edit each form field individually, on edit click the save is displaying and while it is displaying the hover funcitonality of class gear should be disabled and while hovering the each form field the edit should display for each form field individually
jQuery created a div. How to change proprety of this div?
Hi All, I'm trying to make a multi window system. It's like each link the user click the jQuery create a div automatically and set id. As below: $(".link").click(function() { var value = $(this).attr("href"); var value_without = value.slice(1); if ($(value).length){ // check if the div exist alert("nao"); } else { $("#content").append( '<div id='+value_without+' class=panel><input type=button class=minimiza value="_"><button class=fecha>X</button>'+value_without+'</div>' ); $(value).draggable({
Problem replacing html text
Hello I'm stuck with this. I'd like to give the user the chance to think if he is completely sure of delete his account before to do it. So, I put an <a> tag which calls the following script: $(".editAccount a").on("click", function(e){ e.preventDefault(); var curr = $(".editAccount").html(); var r = $(".editAccount").html("<h3>ARE YOU COMPLETELY SURE OF DELETE YOUR ACCOUNT..</h3><div><a class='yes'>YES</a><a class='no'>NO</a></div>"); }); My idea is if he clicks on "NO" he "goes
jQuery populate list like ng-repeat
I am wondering what is the best way to create repeating elements for a list in jquery, such as posts in a blog etc. I guess I'm asking if theres something more like ng-repeat with just jquery. Right now, I'm just manually creating every element with jquery, giving them an id + the position in the array. This doesn't seem like a very elegant solution to me, and makes reusing components even messier. I read into html templates, but that seems to be manipulated using pure JS without a jquery solution.
CharacterSet Problem
I am using jQuery .load() to load some html files into my "master" page. The users who are creating the html files are using MS Word. I've noticed that MS Word inserts this meta tag: <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> Because I am loading the pages using .load(), there are some characters that do not get encoded correctly and little boxes show in their place. Can I override that meta tag inside the html files created in MS Word? If not that, what would be
jQuery/JSON processing order
I hope I've got enough code here. From what I can tell with my console logs, I am executing my javascript in the order I want. The problem arises that at console log 3, there is no data to process. I hope this is clear, as I am at my wits end trying to figure this out. My html page calls retrieveData, passing in a path for the selected page. From there, I parse the data and most of the time it works, but sometimes No data gets appended to my page. I need someone to show me how to structure my code
get span text in each li
Hi All, I am having some html rendering I would like to get text with comma sparted of span who is having class green for each span in li. The whole html is under dropdown who is having class mipartrel Please find the image Thanks in advance
The Mask Pluging does not work in my code
Hello, I have controls in my code : required : true, messages, control email, and Mask. Only Mask does not work, I don't know why, I am lost. I precise that my function Mask works normally in once page, but I have two pages that are linked by the function AjaxRequest. And it is because that, the Mask doesn't work. Please help me. Thanks
Check whether .toggle() or .hide() has hidden an element
I'm working on some code that shows and hides elements in response to filtering options and I'm trying to determine whether an element's visibility needs to be toggled or not. I know whether the element should be visible or hidden. If it should be visible, I want to first check if it is already visible. If it's not, then add it to an array of elements to call toggle on later. I tried using .is(":visible"). The problem is, this tells me whether the element is actually visible, not whether it was specifically
Jquery finding and concat option value
I am new to jquery, hard time finding solution for this. Could someone help me on this. I have a form as shown below. <form id="a" name="fn" > <section ....> <div ....> <select id="sid" name="sname"....> <option data-attribute-value="1" value="1" > 1</option> <option data-attribute-value="2" value="2" > 2</option> <option data-attribute-value="3" value="3" > 3</option> <option data-attribute-value="4" value="4" > 4</option> </select > </div> </section> </form> I would like to append values of
Error in jquery paging
Hi , I want to make clientside paging in my application. following is working fine in my application var cnt=4; var $pagenumbers = $('<div id="pages"></div>'); for (i = 0; i < cnt; i++) { $(' <a href=\"#\" id=' + (i + 1) + ' class="page">' + (i + 1) + '</a>').appendTo($pagenumbers); } $pagenumbers.insertAfter('#st'); this will display 1 2 3 4. my requirement is add anchor with << and
ERR_CONTENT_DECODING_FAILED when using .ajax
I have a log file at http://www.pokersoftwareanalysis.com/tail/log.log that looks like: 2015-05-20 14:19:52.306655 hello 2015-05-20 14:19:55.406846 hello 2015-05-20 14:19:57.292777 hello The log file was generated on a Godaddy shared linux hosting account using this code: with open( log_path, 'a' ) as f: f.write( '%s hello\n'%datetime.now() ) I have an html file at http://www.pokersoftwareanalysis.com/tail/problem.htm that attempts to load the log file. The content of the
Is there an .add() that adds to the existing jQuery object?
I'm writing some code that responds to a set of filters. The way I'm trying to tackle it is first determine which elements should be hidden and which elements should be shown, and then hide or show those elements. That way the elements are all hidden or shown more instantaneously without having to evaluate criteria in between each one. After I identify an element that should be shown, I need to store it in a group of elements to be shown. I was thinking of doing something like this: var $elementsToShow
How to load a script to another DIV and resize target DIV and an iframe as well?
Hi, I have the following page that contains 2 DIVs. <div id="div1" style="width: 50%"> include my script one here </div> <div id="div2" style="width: 50%"> include my script two here. <input type="button" id="load3" value="load script three to div1"> </div> // script three, which contains an iframe Question: When the button with id of "load3" is clicked how to load the script three to div1, then resize div1 to 100% and make the iframe inside the script three using 90% of window width and height?
jQuery validates all required fields except file upload.
I am definitely doing something wrong and I would greatly appreciate someone pointing me in the right direction. Many thanks in advance. I am trying to validate file upload along with a few other form fields. All the form fields listed in the script below are being validate except the single file upload called BidIDFile. Any ideas what I am doing wrong? <script type=' text/javascript' src=" http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/additional-methods.js"></script> script type=' text/javascript'>//
Can I get Ajax html response and pop a part of the result into a javascript variable?
I want to populate Ajax response and set a part of it into a new variable. $ . ajax ({ type : "POST" , url : " ajax.php" , data : "id=" + id , success : function ( data ){ $ ( "#response" ). html ( data ); var new_var = $new_result; } }); ========== [[ ajax.php]] $new_result = 'hahahha'; echo $all_names; echo $all_address;
Best way to go with multiple inserts
Hi all. Though only a home-taught novice in all, I am OK when it comes to using PHP and jQuery to insert records in a database. However, i am considering trying something that I am not sure is even possible (but assume it is) and hope someone can give me a pointer of which way to go. Basically, I have written a script that generates scenario's to run through Selenium IDE and IBM's RFT. At the moment it just returns the info to screen but I want to save the runs into a MySQL database to be retrieved
Mobile Navigation Menu with JQuery [SOLVED]
Hello! I'm working on a website with mobile-first responsive design (just like everyone and their mother) and I have been struggling with the navigation bar. I tried following this tutorial but I've been having some problems. The navigation menu does indeed hide the normal menu, and display the menu a element, but the menu image does not display, and when clicking on the a element, the menu does not appear; no Jquery seems to be loaded. I've triple checked all my image and script srcs, and they all
Trying to make my own expand collapse script for each div content
So I found out that the plugin I tried to get to work isn't really meant for my end goals. Its mean to translate a series of blocks into an accordion you can expand and collapse each section of. This I do not want. I do not want blocks stacked against each other. Instead I want seperate divs that I can click a link for to hide and show with cookie. I tried making it but failed I think: http://jsfiddle.net/master412160/xrxsw1ht/2/ 1) The font awesome is loaded and I tried adding an icon in the html
Strange behaviorwith iframes, title-cased CSS, and Chrome/Webkit
This may be the oddest issue I've seen in my entire life and it took me ages to narrow down the problem, but long story short - I'm working on a project that is using jQuery to write DOM nodes to an iframe and I found some odd behavior with CSS classes containing capitalized characters. I've narrowed it down to what seems to be an issue with jQuery's "append()" function for "$()"-wrapped HTML, and it affects all versions of jQuery 1.x and 2.x, Chromium/Webkit-based browsers only. See the following
Next Page