Jquery .click will not work
Can anyone spot my error in trying to get .click to work in the example below? Thanks for help, R THIS Code Works .. <input type="button" name="next" class="controls-input-connect hov" id="next" value="Next" onclick="nextRecord();" />; BUT .. This Equivelent Code DOES NOT WORK <input type="button" name="next" class="controls-input-connect hov" id="next" value="Next"/> <script type="text/javascript" > $("#next").click(nextRecord); OR $("#next").click(nextRecord() );
Checking if there is an element by ID from $.get
I am using $.get to get a webpage (not GO to a webpage, just get it ) I want to check if there is an element with the id #ctl00_cphRoblox_rbxGroupFundsPane_GroupFunds on it How to do?
Use .scrolltop() when form is valid?
Hi all! I want to create this jQuery syntax that triggers the .scrolltop() function if a form is valid. If the form is not valid, I don't want anything to happen. So basically when a visitor have the right zipcode for delivery, I want them to be scrolled down to another form. Ok? I don't know the scrolldepth yet, but will figure this out while I have a decent syntax to work with. The ID of the form is #zipcheck-fieldset and the class of the submit-button is .check-zip-code. (I don't know which on
Ajax search system expand - clone by click
Hello, i work on a form, who a user can add details about a customer and choose products wich the customer bought. For this i used an ajax autocomplite script i found on this page : click here The function works nice already. And i get the details and product as email, but i would expand like that: If the user chose a product (by clicking on a product), the table row should be dublicated and the user should add another product. I changed already small things but the main code is on the linked page
can you pass a function to animate()?
hi, can you pass a function to animate()? can you animate this? $('a#test').addClass('selected'); or can you only animate CSS settings (I can't imagine animate() to be so limited...;-) this doesn't work.... $('a#nav').click( function(e) { e.preventDefault(); $('#test').animate(function() { $('#test').addClass('selected'); }, 600); }); neither does this.... $('a#nav').click( function(e) { e.preventDefault(); $('#test').animate(function() { $(this).addClass('selected');
accessing table with a certain class within a certain div id where div id is in a variable
I want to access a table with a certain class and prepend something to the table. But there are many of these tables each in its own div with a unique id. I can get all the tables like this: $("table.table-class").each(function() { $(this).prepend(...); }); But I only want to prepend to one table that is in a div I have in a variable: $chart [<div id="chart_0" style="width: 95%; height: 450px; position: relative;">…</div> How can use that $chart variable to get at just its table.table-class
Jquery AJAX triggers preflight OPTIONS request only when I include headers
I am trying to send a request to the Web API hosted in another domain. In fiddler when I intercept the calls it makes a OPTIONS request only when I add headers. If I remove the headers option from the ajax call, it sends a GET request but there is no response in either case. Can anyone please explain me why the calls are intercepted differently when I add a header option. $.ajax({ url: request.url, method: 'GET', //dataType: 'json', //data:
sending asp:dropdownlist value with json.stringify
Guys ı have a asp:DropDownList inside a form.What I want to do is get the selected value of ddl and send this value to webmethod via $.ajax method with using JSON.stringify. And save this value to my database.How can ı do this? related code are below: <asp:TableCell> <%-- <asp:TextBox runat="server" ID="txt4"></asp:TextBox>--%> <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem Value="Men">Men</asp:ListItem> <asp:ListItem Value="Women">Women</asp:ListItem>
How to check if any cell is empty in a html table ?
Hi All, I have a html table where I am creating rows on Insert button click. row might be have 5-6 columns or so on. Now before save I want to check if any cell is empty if any cell empty, show alert message. Actually should not allow user to save if any cell is empty in html table. Thanks,
how can I stremline and consolidate this code?
hi, I have a standard nav show/hide feature in a mobile site... basic code (questions inside code): $('a#menu').click(function(e) { e.preventDefault(); if (!$('#main_nav').is(':visible')) { $('#main_nav').fadeIn(1400); $(this).addClass('active'); $('#wrapper').animate( { opacity:.4 }, 600); } else if ($('#main_nav').is(':visible')) { /* following three lines the same as for $('#wrapper').click() below how do I do this
preview image from crop
hey guys i'm trying to get a preview image after it being cropped using this function...although its not displaying the cropped picture (preview)...i'm getting rather confused with all these co-ordinates etc and to be honest I'm slightly out of my depth here. here is the function and my jsfiddle is here. https://jsfiddle.net/destramic/52mL83pb/ function preview(image, selected) { var offset = image.position(), image_x = offset.left, image_y = offset.top,
Interactive BG and Adobe Muse
Hi there, I need some help to get this interactive BG: http://www.onextrapixel.com/2014/04/09/create-an-interactive-moving-backgroundobject-that-reacts-to-viewers-cursor/ done in Adobe Muse. Could some please just tell me how this one works in Adobe Muse? Cheers
Why is jQuery not adding numbers properly?
Here is my JavaScript code: Is the logic contained in this code correct? I noticed that when the $RoundOneEarnings is increased by the correct amount only after the first question is answered. Afterwards, it increases it by the wrong amount. var $RoundOneEarnings=0; //global variable for Round One earnings. function showClue(e) { var eventTarget=e.target; if (eventTarget.id=='10') { function inputProcessing (e) { var $end_time=e.timeStamp;
Moving content of one div into another div
Hello all I'm trying to move the the content of one div, into another div. Just not getting it and its now working for me. Here is the code. https://jsfiddle.net/Seanhegs/end1bsqa/ Can anyone shed any light for me?? Thanks Sean
add button
hye every one i want to put a button when i click on that button one row will be added at botton in form can you help me
object unshift
i don't know if i need a js forums but..how do i unshift a object please? Object { 1: File, 3: File, 4: File, 5: File } in this scenario how i make key 5 appear at the beginning of the object? like so: Object { 5: File, 1: File, 3: File, 4: File} thank you
enable a button after I choose an item in a select.
When the page loads, the #classeditbutton below is disabled. What I want to do, is make a choice in the select below, and as a result enable the #classeditbutton. I am confused about .active and .disabled .enabled. Functionally, I want the button to load so that it cannot be clicked until a choice is made in the select. Then when a choice is made, I want that button to be enabled so it works. I have tried a few things that have worked before but I am trying to use query this time. Thanks for the
change dropdown submenu open style at hover to click
hi every one i need change my submenu dropdown open style at hover to click i changed :hover in css file to :click and not work it after changed :hover to :click and click on submenu my page just refreshed how to change this style to click please help me i attached my files http://sazeaftab.ir/sx.zip
Can't hide and show controls within a table
Hi, In my table, I have 3 columns, each row has 4 controls: ddlType, ddlOperator, lstSearch and txtSearch. User can add row on the fly. I am trying to make it so that when user selects "Department" or "Location", lstSearch will show, but txtSearch will be hidden. Otherwise, lstSearch will be hidden, but txtSearch will be shown. Here is the code: http://plnkr.co/edit/Z28EfHPWVirRzWa5l3s6?p=preview But for some reason, it is not doing what I want. Please advice. Thanks in advance.
Having trouble with on() and off() method
I'm an old newby to jQuery and encountered a problem with the on() and off() method. At the end of a game some buttons are switched of: if (good == all){ $(".knop").off("click"); $(".knop").css({"cursor":"default"}); } This works good. However: $(".knopReset").click(function() { $(".knop").on("click"); $(".knop").css({"cursor":"pointer"}); }) doesn't set the buttons to work. The cursor becomes a pointer, but "click" is not activated. What went wrong? Thanks in
How to get value of listboxes separately in a table
Hi, I have a table and each row has a dropdown and a listbox. There is an option to add rows on the fly, so if the "Add" button is clicked another row with dropdown and listbox is added. Now, I would like to know how I can get the value of the dropdowns with selected list items in the associated listbox let say, the listbox is called alllstSearch, I will get all the values of the listboxes (for all rows) with the following syntax alllstSearch.join() But I won't be able to know which row it belongs
setting anchor button in bootstrap from disabled to enabled.
I posted this before, but as my wife says all too often, I don't think what I said was that clear. What I want to do is simple. I have a popup on a page. And an edit button in bootstrap, made out of an anchor, on the right of the select. Clicking the edit button is meant to open a dialog and edit the item that has been selected in the popup. When the page opens, no selection has been made in the select. In that case, I don't want the edit button to be enabled because a selection hasn't been made
Remove specific value in a file input type element after multiple selection
Hi there, is there a way to modify a file input type's value?, i am using a multiple type selection and i want to remove a specific value in it, help is very much appreciated!! ,Thank you and Godbless
Adding / Removing Selected Checkbox and Radios to Array of Object
Can you please take a look at This Demo and let me know how I can store the selected checkbox and it's associated data (radios)in array of objects like this: var yourSelection = { commedy: [ { movieName: "", bestPart: "", overall: "" } .... { movieName: "", bestPart: "", overall: """ } ],
FAQ jQuery function trouble
I am trying to finesse a FAQ section in Wordpress using jQuery, but am stuck on the last part of the function. We have categories, which have questions, and each question has an answer. At start, all elements are closed. Each element opens as it is clicked. Each category will close when it is clicked a 2nd time. Here is the test page so far: http://www.maxwellparknc.org/faqs/ What I can't figure out is how to get the answers that have opened to close when the category is closed. I can't figure out
"uncaught exception: jQuery UI Tabs: Mismatching fragment identifier."
This has been driving me crazy. I can not find a mismatching fragment identifier. If there is one, what is the fastest way to find it? But using google to search out this error, every hit I examined indicates it is due to an incompatibility between specific versions of jQuery and jQuery UI. How does one distinguish between a real fragment mismatch and one due to such an incompatibility? My next question is based on the observation that the versions of jQuery and jQuery UI are rather dated relative
Event handler multiple functions
In jQuery, can an event handler function execute multiple functions simultaneously when 1 or more event fires?
Combine forms
Hello, I'm trying combine 2 forms if requirement is met.. Basically we have contact form and newsletter. We need to clone the email and name values unto the newsletter form if the user opts-in to subscribe to it, and when he/she clicks submit, the contact form will be sent and the newsletter as well.. but if he unchecks the checkbox, only contact form will be sent..kind of vice versa.. below is the html, but I don't know where to begin..thank you.. <form action="contact.php" method="post"> <input
jQuery JIRA Post not working in IE/FF
I am trying to post data to JIRA and it seems to only work in Chrome. Does not work in IE/FF. Please Help. I think this has something to do with the ajax call setup. Not sure what I need to get this to work. $('#new_request > footer > input').bind('click', function(e) { var subjects = $("#request_subject").val(); var descriptions = $("#request_description").val(); var attachments = $(".upload-link").attr('href'); var cust1 = $("#request_custom_fields_27736417").val(); var cust2 = $("#request_custom_fields_27745068").val();
n00b question about map
I have a JSON array that looks like this: [ {"concept_name":"Blah","concept_id":"1234"}, {"concept_name":"blah2","concept_id":4231"}, ... ] and I am trying to write a $.map to parse this as a part of an autocomplete. In this case the JSON array is inside "data" response($.map(data, function (value, key) { return { label: concept_name, value: concept_id }; } And am getting an error "Uncaught ReferenceError: concept_name is not defined " I am a super newbie with JS so I am
to sort or to drag and drop?
to sort or to drag and drop?...i don't know....i need some advice and a bit of help please. here is my fiddle: http://jsfiddle.net/destramic/spvogc4d/ basically what im after is for the images without the blue border to be able to switch places with the blue border image only and for the blue border image to replace one which hasn't got a boarder. do i use sort of drag and drop on this please?...also fiddle isnt working for some strange reason. any advise or help would be appreciated guys. thank
Jquery validation:: multiple forms validation problem with ignore: []
Dear all, I have multiple forms on a page and each form have its separate rules and its Validate() method. I have different tabs in one of the form so some of the controls are hidden when I try to submit my form. So for that I have added ignore: []. in rule and it is working fine. But other 2 forms are the part of 2 separate popups .And these popups open on click of button which is part of first form. and when I open these pop up and add some data in popup which contain form (to insert data in first
Creating time lag before a change of text.
I want the words "Daily Double" to appear when an element is clicked on. After about 4-5 seconds, the Jeopardy clue should appear and replace "Daily Double". I have come up with the following: if (eventTarget.id=='51') { var display_clue=function(){ $(this).text("OFTEN CALLED THE WORST SUPREME COURT DECISION"); }; $(this).attr("id","daily_double").text("DAILY DOUBLE").setTimeout(display_clue,5000); } However, I notice that the text just stops at "DAILY DOUBLE"
Event handler function not being responsive
I wrote the following lines of code, but my event handler function is not working when the element is being clicked on. What am I doing wrong here? My HTML code: <html> <body> <div id="jeopardy-round-one"> <li class="row-1 column-0"><p id="10">$200</p></li> </div> <script src="jquery-2.1.4.min.js"></script> <script src="jeopardy-round-one.js"></script> </body> </html> My jQuery code function showClue(e){ var eventTarget=e.target; if (eventTarget==$( "p#10" )) { $(this).text("This
Having Issue on Mousedown + Mousemove Smooth Functionality
Can you please take a look at This Demo and let me know what I am doing wrong on adding Mousedown and Mousemove event to the animation? As you can see even the button not working after mouse event and I cant pause the animation! function toLeft() { $('.container').animate({ 'background-position': '-=1' }, 1, 'linear', toLeft); } function toRight() { $('.container').animate({ 'background-position': '+=1' }, 1, 'linear', toRight); } $(function () { $(".pause").click(function
Adding Scroll to Div Function With UI Auto Complete
Can you please take a look at This Demo and let me know how I can enable scroll to div of selected item from auto complete? $(document).ready(function () { $('#tags').on('change', function () { $('#tagsname').html('You selected: ' + this.value); $('html,body').animate({ scrollTop: $("#"+ this.value).offset().top }); }).change(); $('#tags').on('autocompleteselect', function (e, ui) { $('#tagsname').html('You selected: ' + ui.item.value);
Problema con val() AJAX en While PHP
Hola chicos. Tengo un problema con AJAX para enviar y mostrar el val() en un bucle PHP, El proyecto trata de una ventana modal. Y el problema es que queda con el resultado (del val()) solo de un div pero no de los otros. Aquí el código: js: function openVentana(){ $(".contenedor_ventana").fadeIn( "slow"); } function closeVentana(){ $(".contenedor_ventana").fadeOut("fast"); } function ampliarImagen(){ var nombreBD=$('.contenedorImagenesComprobantes').find('input.nombreBD').val(); var dataString
Understanding the usage of the .data() method .
I have a question about the $.data() method , actually about JavaScript terminology , HERE , is the documentation for the data() method and there is the following example: var div = $( "div" )[ 0 ]; jQuery.data( div, "test", { first: 16, last: "pizza!" }); now in the above example i can describe, the usage of the .data() method as follows: "the data method is being used to associate arbitary data to the <div> element. " now i was going through the code of animateSlider.js and came across the
Problem with .append() and jquery code
Hi i have problem with the method .append() With an ajax call i load some elements with the .append() method in this way $('#notice').append('<div class="'+data[i][9]+'">');...........ecc.. and this works fine, than i add also two buttons: $('#notice').append('<a class="btn btn-success conf " title="'+data[i][9]+'">Conferma</a>'); $('#notice').append('<a class="del btn btn-danger" id="'+data[i][9]+'">Elimina</a> '); The array data is not important. As you can see this buttons has class ".del" and
How Can I add Loop to Div Background Position Animation in jQuery
Can you please take a look at this demo and let me know what is the best trick to add endless loop to .container element? $('.container').css({backgroundPosition: 'right'}); .container{ background:url(http://www.bhphotovideo.com/explora/sites/default/files/Panorama_NYC_X3000.jpg); width:400px; height:670px; background-position:left; -webkit-transition:background-position 40s linear; -moz-transition:background-position 40s linear; -o-transition:background-position 40s linear; transition:background-position
Next Page