How do I get the parent element of a element
Hello, I have a button buried in table td's Each table row has a different class id. How would I get the class of the parent row?
Eclipse Juno complaining about jQuery-1.8.3.min
Any way to clean this up I have project cleaned, Syntax error on token "Invalid Regular Expression Options", no accurate correction available Multiple markers at this line - Type mismatch: cannot convert from any[] to any - Missing semicolon Syntax error, insert "}" to complete ObjectLiteral - Type mismatch: cannot convert from any[] to any -- Type mismatch: cannot convert from any[] to any - - Missing semicolon - Missing semicolon - Missing semicolon - Missing semicolon - Type mismatch:
Vertical Accordion Menu
I'm trying to create a menu for my application, but there's something wrong. Take a look: http://jsfiddle.net/tp3mB/ If anyone can help. Tnks
How do I return a value as a number
Hello, Im trying to return values into a variable. var $num = $("#myid).val(); How do I return the value into the variable as a number. I want to add "1" to it. Thanx again ...
Scroll to Element Jquery not working on Chrome or Safari
I'm having a problem trying to implement a simple jquery feature in my project. The problem is that it's not working on chrome or in safari yet it works in firefox which is very weird. I have tried different approach trying to solve my problem but no luck. Basically i'm using a simple plugin call scrollTo(http://individual11.github.io/Scroll-To/). I even tried creating my own scrollTo feature but the problem is that it doesn't work on chrome or in safari also which is weird. Here is the website I'm
jquery code integrated in backbone code
I have a js file which has backbone related code, and in it I want to place jquery code. And to be more specific,,,in the app(booking) I am building the user will have to make a choice of a staff member from a dropdown menu. And this is the backbone related code that will send the staff name along with other details to the server. save: function() { if ($.trim((this.$('#name').val()))==='') {alert('No name is inserted')} else {
Button click not firing when button added to div
Hello, Im adding sections to div's that contain a button. The button inside the div does not fire after being added. $(".addCont").on("click", (function () { var $dtl = $("#dtltmpl").html(); $("#dtltbl").append($($dtl)); })); <button type="button" class="btn btn-blue btn-xs addCont">Add Container</button>
refreshing html table with jquery
Hello everyone! I am working on a project where I need to have a html table to be first loaded with info from mysql database with items then refresh, each item has a status checkbox next to it where I can check or uncheck. This is intended for multiuser platform so diferent users connected to the same web page could have access to the data. What I want is to updates this table constantly on all sessions so that the changes one makes the other users could notice instantly. I am putting my code next
[jQuery] Comparing Arrays
Is there a function that exists for the purpose of comparing two arrays and returning the values that are different? The arrays I'm comparing are likely to contain all the same values but in a different order. From what I read in the jQuery docs there is no function to compare array orders. I can think of a solution where I make a function to loop through both arrays sequentially and simultaneously, comparing each value pair and spitting out the ones that are different. Does anyone know of a function
jquery unhide on the value of a select drop down
I want to get at the value of a select box on change and hide or unhide another elemen in the same form determined on value selected so far I have something that doesn't even trigger..... if the content of "arrival" is VIP I want to unhide "arrival_time" eg the form contains <p><label for="id_arrival">Arrival:</label> <select name="arrival" id="id_arrival"><option value="" selected="selected">---------</option> <option value="1">STD</option> <option value="2">VIP</option> </select></p> <p><label
Three level menu using jQuery assistance
Hi guys, I need some help with the following menu JS script: http://cdpn.io/LzuJh At the moment the script works but I need some proper cleaning. I am able to get it to expand on click to about the second level and everything goes haywire from then onward. I want it to behave like a proper 3 level menu. 1) you click on menu icon it opens menu 2) you click on second menu it opens menu and gives you access to 3rd menu etc NB: I also want the menu to toggle, the same way it toggles on the top menu.
HTML5 builder jQuery datetime picker
Hi I am using HTML5 builder to build a server side database reporting system. I need to have client side users enter dates using a datetime picker but the picker that comes with HTML5 builder does not work on most browsers. The jQuery picker would be perfect and while I can get it to work in an html document I cannot get it to work on the HTML5 builder php pages. I am very new to JAVA script so do not really know where to start. Does anyone have any ideas how I can go about this? Thanks Jerry
please critique!
Hello all and thank you for any help. I have just finished building the following, which does work, however I am not sure if it is running as good as it can. May I please get some instructional criticism and possibly some ideas on ways to make the performance better? Thank you in advance <html> <head> <link rel="stylesheet" type="text/css" href="style.css"/> <title>Stream Status</title> </head> <body> <table></table> <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
Need help to modified code for time out
I am new to JavaScript and I found a time out routine on the Web that does what I want but one thing. The code pops up a message stating the time is about to expire and gives the user option of continue or cancel. I want to change the code that if no response from the user that the application redirects to another page automatically. <script type="text/javascript"> var sess_pollInterval = 60000; var sess_expirationMinutes = 20; var sess_warningMinutes = 2; var sess_intervalID; var sess_lastActivity;
manipulate class on browser back/forward button when address bar has certain URL
I have setup a ajax website where I use the history API for a better user experience with a javascript fallback for browsers that don't support the API. I have to say that I've used files from a demo site from the maker of the fallback script, because my javascript/jQuery knowledge is 0.2. I have a div where I load the AJAX content in which is hidden on page load. In the other div I have a isotope grid with items and clicking on a item will slide-in the AJAX div and loads at the same time the AJAX
infinate jQuery vs HTML Link
I have a page that has animation that repeats infinately. This is implemented via a jQuery script that calls itself. The page also contains a menu implemented via an unordered list with href links. The menu works ok on a test page without the script. When I add the script the menu no longer works. I am not sure I understand the event model and potential conflicts between jQuery and HTML events. I would appreciate help with my specific issue and perhaps a nudge in the direction of some documentation
jQuery and $ not definded.
Hi all, I can't get jQuery to work on my site, this nevere happened before. Here is the code: <script type="text/javsacript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script type="text/javsacript" src="site/js/fancySelect.js"></script> <script type="text/javascript"> $('document').ready(function(){ $('.dropdown-menu').fancySelect(); }) </script> And the error is: ReferenceError: $ is not defined $('document').ready(function(){
a tag onClick not firing
Javascript: (function(){ $(document).on('keyup', '.search-bar input[name="q"]', function() { var a, b, c, d, e, f, g; a = $(this), b = a.closest('form'), c = b.find('.display'), d = a.val(), e = a.attr("input-min-length") ? a.attr("input-min-length").val.to_int : 1, f = b.attr('action'), g = b.attr('method'); c.empty(), a.removeClass("search-loading"); if (!$.trim(d) || (e > d.length)) return c.hideDropDown(); a.addClass("search-loading") $.ajaxq.clear(f),
Table collum delete when sub collums exist.
Hi, I need a function to delete columns, I have found solutions that work on "index" but these get buggy when there are sub columns. What I need is a function that can delete sub collums and also deletes sub collumns where their parents are deleted. For an example of the kind of table I am using see: http://www.cmp-products.com/a2ffc.php it is the "gland selection" table. Any help would be greatly appreciated. Thanks Tony
checking the file size in IE 11
Need to know if there is any way using jquery to check the file size. The activeX Object used in javascript way of checking works in all browsers except IE 11: function GetFileSize(fileid) { try { var fileSize = 0; //for IE if ($.browser.msie) { //before making an object of ActiveXObject, //please make sure ActiveX is enabled in your IE browser var objFSO = new ActiveXObject("Scripting.FileSystemObject"); var filePath = $("#" + fileid)[0].value;
this is slider code......please tell me whats happening in this script?
$(document).ready(function(){ rotatePics(0); }); function rotatePics(currentPhoto) { var numberOfPhotos = $('#photos img').length; currentPhoto = currentPhoto % numberOfPhotos; $('#photos img').eq(currentPhoto).fadeOut(function() { // re-order the z-index $('#photos img').each(function(i) { $(this).css( 'zIndex', ((numberOfPhotos - i) + currentPhoto) % numberOfPhotos ); }); $(this).show(); setTimeout(function() {rotatePics(++currentPhoto);},
Dynamically replacing images at varying screen dimensions
Hi, I have a slider built into my web page thats dimensions and ratio alter for different screen sizes, I need the images that I place within this slider to also alter for the same purpose. The code that I have does't seem to be working, I'm a bit of a newbie to jQuery and have pieced it together myself but I think that its essentially quite close to being functional… <script> $(document).ready(function() { if($(window).width() < 1600 && $(window).width() > 1440){ $(".replaceimg").attr("src",
Copy TextBox Value and Replace Spaces With Hyphens
Trying to copy the value of a first textbox as it is typed to a second textbox and replace any spaces with hyphens - Almost works except only the first space is replaced with a hyphen, can someone help please, I'm an absolute novice with Jquery!! thanks .... Code: <!doctype html> <html> <head> <meta charset="utf-8"> <title>TEST</title> <SCRIPT language="javascript" src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></SCRIPT> <SCRIPT type="text/javascript">//<![CDATA[ $(window).load(function(){
Firefox Mobile change event not fired after taking photo in input
Hi together I'm trying to make an simple uploader for a mobile webpage: you choose a file and it will immediately uploaded, without another klick. There sould be only: <html> <form enctype="multipart/form-data" action="http://api.qrserver.com/v1/read-qr-code/" method="POST"> <input name="file" type="file" id="filepicker" class="filepickerd" /> <!--<input type="submit" value="QR Code lesen" />--> </form> <div id="iframecontainer"></div> and JQuery <script src="jquery-2.1.0.min.js"></script>
Cant get my jquery to work??!!!
Hi, Im new to jquery and still learning web design.... Im trying to get a show/hide script to run on a toggle tab but cant get the jquery to work.... It's probably something very basic ive missed but cant seem to find it! any help would be awesome.....Thanks! Here is my HTML; <html> <head> <title>The Rock & Roll Project: </title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <link rel="stylesheet" type="text/css" href="rnrARTISTS.css" /> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
Problem calling ajax program that makes cross domain call
Hello, I am using ajax to call a program that makes communication with paypal. The program is the paypal api that can be downloaded from paypal. I have a stand-alone version and an CGI version that runs in apache. The stand-alone works fine and returns the paypal response. The problem is in the CGI version. The program is completing normally and I am getting the proper response from paypal. But Apache is reporting a 500 error message. But Im getting a success completion and the test-payment is accepted by
Need help loading images with .each
Hey Guys, I am trying to load the images with JSON using the $.get function. On the console log I can see the name of of the images when I hover over the img var, but for some reason its not loading. I'm not sure what I am doing wrong here. Any help would be really appreciated!! <div id="container"> <div align="center" class="loader"><img src="images/loading.gif" id="load" width="400" height="400" align="absmiddle"/></div> </div> $.getJSON("data.json", function(data) {
Problem appending table
Hello, Im trying to copy a div and insert it into a tbody. But I cant get it to retrieve the html from the div. <div id ="dtltmpl"> <tr> <td>some text</td> <td>some text</td> <td>some text</td> </tr> </div> $("#copyDtl").click(function () { var $dtl = $("#dtltmpl").html(); alert($dtl); $("#dtltbl > tbody").append($dtl); });
Elements problem
Hi, I am facing problems with my project, when i load a new page some times my data doesn't load to html elements assigned by jquery, Fetching data from database. Please help me.
can a radio button click add a value to a textfield?
I'm not sure if this is possible. If I have a radio button field with Yes/No selections. If either is selected, a fieldset appears with a textfield. If No is clicked, then the user types in a value in the textfield. Is there jquery I can use, so that if the user clicks Yes, a value is entered into the textfield? Thanks in advance. I've seen this done before except with span tags. I haven't seen this inside a textfield. Peter T
jQuery Toggle Help
Hi we are using the following simple jquery toggle: http://jsfiddle.net/fuYK7/ As you can see we are using css to make the div "display: none" on page load. What we would like to do is as follows: 1) Have the div display on page load if java script is unavailable 2) Have the text change when the toggle link is selected from "Open" to "Close" Thanks in advance for the help.
Difference between append and html
Hey guys on a little bit confused about how they both differ from one another in functionality. Fromm what I know HTML() will completely replace , all the original content and append will append it to the last element. But for some reason on my code below, the JSON data doesn't show inside the <div id="result"> </div> with html(output) only with append(output). I am just confused on why wouldn't it work with html(output) and only with the append() function. Isn't the html() supposed to work like
Multiple instances of the same code on simplified
Hi! This is my first post on here and a bit of a rookie question but I've been struggling to find help on the matter for months and all of my posts on Stack Exchange have gone ignored. I'm convinced that what I'm trying to do is fairly simple and that anybody with an intermediate knowledge of jQuery will be able to help me (my own experience is lacking). Basically I've created a script for a modal window which fixes the 'body' position and hijacks the browser scrollbar exactly as I intend it to.
[jQuery] listnav plugin
I have implemented this awesome plugin with great success and would like to know if its possible to refresh the plugin after appending/ removing data from the list. Can I break the connection and then rebind the data?
Select an item in a table. sounds easy enough...
I'm sorry but i've been struggling with how to capture the value of some text in a table. i need to select this value by first finding the string "Project Number" in a simple table and then capturing the value, in this example "1153" as a variable so I can do stuff. If someone could please help with this its much appreciated. I'm trying to use parent, next, contains, children... etc. and not getting it. -thanks Dave fiddle is here: http://jsfiddle.net/vhabhsrosed/EMNGu/ html: <TBODY> <TR> <TD
HTML Form Doesn't Work in an Ajax Page
I am loading one .php page inside another with ajax. The ajax-loaded page contains and html form: <form action="/book/aaa_testprice.php" method="post" target="_blank" id="booking" name="booking"> <input name="ArrivalDate" id="ArrivalDate" class="datebox" size="10" onBlur="date_copy_set()" type="date"> <input name="DepartureDate" id="DepartureDate" class="datebox" size="10" onFocus="date_copy()" type="date"> <input name="hid" type="hidden" value="<?php echo $hid; ?>"> <a href="javascript:void()" onclick="frames.booking.submit()"
Rearrange order of Divs by dragging them / Divs move around others
Hey guys, I want to achieve that Divs in a container rearrange themselves as soon as one of them get dragged by the mouse and dropped on another position in the container. It's comparable to your smartphone homescreen, where you can change the order of your apps by dragging them around. Any ideas how to start? Thanks
how show dynamic text into div
Hi I have tried this to write dynamic value into a div, I have tried both way but it is not showing "hello world" output $(document).ready(function(e) { document.getElementsByClassName("output").innerHTML='hello world'; $('.output').innerHTML='hello world'; });
download table from server database to client PC and create a text file
I have a php program running on iSeries server that list a set of files and I want to select from the list one or more files and on the client PC use a jQuery to read and write the records creating a text file on the client PC prompting where to save the text file. James R. Martin J. Martin Associates
How do I trap an http 500 error
Hello, Im calling a java program that will make an ajax call using ssl communications to paypal. After the program completes normally Im getting a http 500 error. The program is completing normally, and even returning the response from paypal. But when the program terminates the browser is telling me Im getting an http 500 server error. The below variable $ipal is returning a response. Is there a a way in my ajax call to trap the error Im getting? $.ajax({
Next Page