[SOLVED] Accessing data sent from done event in a ajax request?
Hi, imagine you have the next ajax call: $.ajax({ type:'POST', async:false, url:'../../NectarUI/Functions/updatvalii.php', data: {ala:idal,lat:$('#ubilat').html(),lon:$('#ubilon').html(),calle:$('#ubicalle').html(),numero:$('#ubipiso').html(),ciudad:$('#ubiprovi').html(),pais:$('#ubipais').html(),ag:$('#codagente').attr('name'), piso: $("#editPiso").val()} }).done(function(res, st, xhr) {
How to create an onclick function
Hi, I am trying to make a gallery, by using the scroller on the page below. I have managed to insert the thumbnails within the scroller, however I am now stuck. What I want to achieve is, when you click on the relevant thumbnail, the larger version of the image appears above it. I am assuming that an onclick function is required, but I have no idea where it should be placed or what the actual command should be as I am a complete novice with jquery etc. Any help would be greatly appreciated. http://www.aep.x10.mx/test.htm
how to get rid of bower
hi i am new to jquery also bower! can anyone help me here. i can have it removed for $250.00 which i cant afford, i am on disabilty. the other thing is i have very little command line experience even if you needed acces to my computer that would be okay thanks dave
How corectlly merge cell in table with button
How to prevent that, when selected merged cells avoid errors of the merger. I do not speak English very well thanks <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <style type="text/css"> table{width: 80%;} table td{border: 1px solid #97B4D1;text-align: center;cursor:pointer;} </style> <script type="text/javascript"> var StartTD = null; var StartIndex = null; var EndTD = null; var EndIndex = null; $(this).ready(function
if/else doesn't work
hello, I have a jquery script. The meaning is, when you have 4 divs in the browser then the first div hide. You must only see 3 divs and not more. I have written but it doesn't work. Can someone help me? thanks in advance. <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script> $(document).ready(function(){ if($( "div" ).html() == 4; )) { $( "div:first").hide(); } }); </script> </head> <body> <div><p>This
jquery(function) not working but $(function) works
Hi, I am just starting with jquery and following a bob tabor tutorial, when I use the full jquery ready function it fails to fire but the shortened $ version works, I accept that since it works then maybe I should just use it but while getting to know this great tool confusion and doubt are not good for me, when I run the script with full ready function and use f12 dev tool it tells me that this URI cannot be found "http://ajax.aspnetcdn.com/ajax/jquery/jquery.min.map" but in my script I am using
smile_ajax is not defined
Hi, this is my first error in Jquery so dont go too hard on me.. im using Jquery for an animated menu i made. It works well but it breaks some of the functions in my wordpress theme and i cant figure out why. This is my script to initiate Jquery but i dont know why it breaks other things.. if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11); function my_jquery_enqueue() { wp_deregister_script('jquery'); wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] ==
jQuery Calendar
Apologies if this isn't the correct forum. It is the closest match I could find for my topic. I'm creating a page/site where people can propose vacations and invite others to participate. For my purposes, I need to allow the admin the option to select multiple days from a live calendar. Furthermore, I want to take these selected days and lay each out individually in divs on a separate page to display day by day who is participating and ultimately allow invitees to log in and RSVP. Does such a beast
jQuery 1.7 vs 2.2.1 vs 3.0
Hi, What's the difference between jQuery 1,7 and jQuery 2.2.1? If I l buy a book that teach jQuery 1.7 will I miss a lot once I transition to jQuery 2.2.1 or the upcoming jQuery 3.0? Thanks for the answers!
jQuery Timer
I am new to jQuery so I am struggling with my attempt at a timer countdown. This is the goal: I have 10 names being pulled from a database in a .NET MVC application. The first name in the list will have a countdown. When the countdown reaches 0, it needs to remove the name, restart the timer, and slide the second name up into the place where the previous name was. My countdown is working but when it reaches 0 it stops and nothing else happens. Can anyone give me some ideas of how to do this? Thsi
Display the date that was selected with Jquery
I have a date picker as below which is not bringing back the date that was picked by the user, instead it is bringing back the latest month and the year. How can i change the function so that it always brings back the date that was saved in the database or the date that was selected. thanks <script> $(document).ready(function () { $(".datepicker").datepicker({ showOn: 'both', dateFormat: 'dd-mm-yy', showButtonPanel: true, constrainInput: false, buttonImage: "../jquery-ui-1.11.4.custom/images/calendarNew.gif",
jQuery slider hide
Hello all I have got a slider working in an ASPnet MVC application. I need to show and hide the slider when the user clicks into the field. am struggling to get this part working. What I have is <script type="text/javascript"> $(function () { $("#SundaySlider").slider({ range: "max", min: 1, max: 10, value: 2, slide: function (event, ui) { $("#SundayHours").val(ui.value);
Output Error - Navigator GPS - Javascript PHP JQuery
CMS Redaxo 4.6 Source is a module for proximity search, and to issue coming from a database Hello, I get the error message JQuery not go with PHP , maybe can have someone help me. The positioning and the query from the database with display of results within works . If the location can not be determined , to the " Ajax Loader Big Icon " will be hidden from Line 151 and the text will be displayed on line 156 with the corresponding error code. Thanks for help Andy <?php do { if(!function_exists('removeMC'))
Json parsing issue in Javascript
I am parsing the JSON value in javascript. But I got the unexpected Error. Please help to resolve the problem. My fiddle https://jsfiddle.net/unkvrpr4/4/
What web providers support jQuery installation?
I have had my website hosted with iPage for several years. I asked them if they had jQuery available on their servers, and they said no. They also said it wasn't something I could install on my own domain. I would very much like to use jQuery to make this page ( http://poetskaraoke.com/songtable.html ) available on my website, but as it is now it’s painfully slow. Is there a way to speed this up without having jQuery hosted on my site, or can you recommend a host that offers jQuery support?
Newbie with mouseover issue
Hello, Here is a page for you to look at http://www.theremotedoctor.co.uk/karsuzuki.html?scrollto=selection On my site that i am putting together i have some jQuery onclick. If you go to the page as mentioned above you will see that on the right of the page are item selections. These work from onclick & a photo is then loaded of that selected item. If you hover over Keys & Remotes then come down to HONDA there is a fly out menu attached to HONDA but it works from onclick & i would like it to work
Show-Hide only works once
I'm new to jQuery so still learning how everything works. I've got a website with 2 buttons. Click Button1 - Div1 with links gets shown. (and if Div2 is open it dissapears) Click Button2 - Div1 dissapears and Div2 with links gets shown elsewhere on the page. I've managed that with the code below. BUT somehow it only works once. I click on Button1 - Div1 shows. I click on Button2 Div1 dissapears but when I click on Button1 again... no Div1... Anyone know how I can correct this? I want it to work for
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?
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
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'),
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
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
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?
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 ?
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.
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">
Greetings Everyone from Alabama
I am writing a script to hide divs and containers with a click but the problem that i am running in to is that they are all linked to each because of the class used. I have tried to incorporate (this) into the script but nothing seems to work. Click one and they all open or close. What i would like it to do is hide the element on page load and show each one when clicked. $(document).ready(function() { var hcon = $(".hide-content") var hbtn = $(".hide-btn") $(hcon).hide(); $(hbtn).click(function()
cropbox.js
I can't get jcrop to work with my Drupal application. It doesn't drag and the preview image isn't a full size image so I suspect a clash of css somewhere so I have been looking at cropbox.js instead. Is it possible to upload the cropped image to library on the server as an ordinary post instead of ajax and if so how please? jcrop uses x1, y1, x2, y2 positions
Image file size
if (res == "jpg" | res == "png") { var reader = new FileReader(); reader.onload = function (e) { $( "#the_image3" ).replaceWith( "<img name='image3' id='image3' src='' alt=''>" ); $('#image3').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]);
$(...).datepicker is not a function error.
This form of mine works totally fine locally SEE HERE . But when i run it on the server it throws a $(...).datepicker is not a function. Why ?
Getting file upload to upload to the correct directory
I'm doing this file upload jQuery File Upload and I'm trying to change the path of where the file needs to be uploaded. When I upload the file in my firebug I get this error POST http://localhost/cms/public/admin/frames/public/frames_images 404 Not Found I do know that this error means that it can't find that directory. The problem is that I don't want the directory to look like that, what I want it to look like is this. http://localhost/cms/public/frames_images This is the code that allows the files
Find the position of the mouse
Hi Could not solve this: Find the position of the mouse pointer relative to the left and top edges of the document. I wrote something like below (i know it is quite wrong :) ), would appreciate help in correcting it: <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script> $(document).ready(function(){ $('body').mouseover(function(){ var x = $('body').offset(); $('body').append("Top: " + x.top + " Left: "
How to get current location weather forcast onclick pop-up?
Hi All, I need to have a weather icon, once click the icon, it should pop-up with the current location weather details. How to achieve this? thanks in advance
Updating DIV HTML
I am trying to update the HTML of a div using .html. The var that I am overwriting the text with, has these characters: /, ", =, .. When I attempt to set the html of the div with this var content, it does not update. Is there a way to update the div with this content in the var?
install my favorites plugins auto magically for all projects? possible ?
What if i have a set of 10 of my favorite plugins that i would like to install using npm , how do i install these set of 10 favorites plugins for every project ? Do able ? Sorry , i know this is off topic :P Thank you.
get select options key values
Hi ! <select id="select"> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> <option value="4">four</option> </select> <label id="values"></label> how can I get with jquery an array with options key => value 1 => one 2 => two ... then loop my array and get a text somewhere with all key = value ? my code is not woking (i get 3 = 4 ??) jQuery(function ($) { ///////////////////// $(function() { var options = $('#select option'); var values =
Read More/ Less Not Working
Dear Sir http://himashreetours.com/aboutus1.php i m trying Read More Read less for above link 1. Its not working where ever I want 2, But working fine for other text displayed at bottom of this page I tried development tool and found following errors Uncaught SyntaxError: Unexpected token } Navigated to http://himashreetours.com/aboutus1.php aboutus1.php:89Uncaught SyntaxError: Unexpected token } Navigated to http://himashreetours.com/aboutus1.php aboutus1.php:89 Uncaught SyntaxError: Unexpected
Newbie question
Hi I inherited this jQuery code; jQuery("#login-form").submit(function(){ var str = jQuery(this).serialize(); jQuery.ajax({ type: "POST", url: "includes/login-send.php", data: str, success: function(msg) { jQuery("#formstatus").ajaxComplete(function(event, request, settings){ if(msg == 'OK'){ window.location.href = "index.php"; } else{ var openingTag='<div class="formstatuserror">'; var closingTag="</div> "; result = openingTag.concat(msg,closingTag); } jQuery(this).html(result); <=====
Can't get jQuery script to work
Hi there first post here. Im looking at a Jquery script that should work and I have tested it here: http://jsfiddle.net/LysCF/13/ But I can't get it to work in the browser: Chrome and IE What do I need to get it to work? The drop down Menu is opened when page is loaded. Thanks
Next Page