[jQuery] ajax post request in custom method?
Hi, I've made a custom method with addMethod to check a captcha. Basically, the captcha image is made in php and its value is sent to a session variable. So I make an AJAX post request to a php page which checks the input's value against that session variable. verify: function(value, element) { $.post("scripts/verification-check.php", {inputString: value}, function(data){ //data will be equal to true or false if the input's value is equal to the session variable return
[jQuery] [PLUGINS] More from DZone
Found some more on Dzone that I've never seen: Simple Drawing: http://www.openstudio.fr/Library-for-simple-drawing-with.html Splitter by Dave Methvin http://methvin.com/jquery/splitter/default.html
[jQuery] global error handler
Hi all, I'd like my application to be able to check my ajax results for an array with an index of "error" before it gets passed along to whatever function made the call to finish doing whatever it's doing. It looks like this would be easy if global events were called before local events, but as that's not the case, I was wondering what a work- around might be? One idea that occurs to me it to trigger the ajaxError event with my (otherwise successful) results. Is there anyway to raise an ajax error?
[jQuery] Trying to create a horizontal menu...
Basically, I got it to where I hide all visible "ul li ul" but I only want to do that when a user hovers over the root "ul li a", In other words, I only want it active on the first set of "ul li a", not the sub menus. I want "ul li ul li a" to remain visible when I hover over a "ul li ul li a". Any ideas how to go about this? JQUERY $(document).ready(function(){ $("ul li a").hover(function(){ $("#menu li ul:visible").hide() }); $("#menu li a").hover(function(){ $(this).next("ul:hidden").fadeIn("fast")
[jQuery] Autocomplete bigiframe
Has anyone found a way to solve this display problem on IE: http://education.llnl.gov/jquery/bigiframe.png Demoed here: http://education.llnl.gov/jquery/adv_auto3.lasso (type mod)
[jQuery] cluetip plugin prevents click event
I am using cluetip to put tooltips on the links in a search results page. I have the 'activation' setting as 'hover' but unfortunately cluetip cancels the normal click event and I can't actually follow the links. I don't see any examples or settings that will let me actually click on the links. Is this possible? Thanks, -Dan
[jQuery] Data containing ? at the start getting converted to jsonp.... by ajax() call
This is my first post so I really should thank everyone for a fanatastic library. However, I think I have found a bug... Using jQuery 1.2.1, if I have: $.ajax({ type: "POST", url: "test.html", dataType: "json", data: {query: queryString}, }); When queryString starts with a ? it will get converted to jsonp1231234124... This is clearly happening because of the code at line 2226 of the full release version: // Build temporary JSONP function if ( s.dataType == "json" && (s.data && s.data.match(jsre)
[jQuery] Making a jQuery plugin
I can't seem to remember since it has been ahile since I want to do this, how do i make a jQuery plug that i can access like var paginator = $.paginator({/*data*/}); paginator.next_page(); //etc... currently my code is like this: (function($) { initialize= function(options) { $.extend(this.options, options); }; options = { 'url': null, 'replace_id': null, 'load_file': null, 'total_items': 0, 'items_per_page': 10, 'total_pages':
[jQuery] Possible to do specific ajaxStart/Stop effects??
Im puzzled by this part.. when you do something such as $ ('img').ajaxStart(function(){ // code }); this is called every time an ajax request is sent.. what if i just want it related to a specific ajax request only? this does not seem very piratical to have everything change at once
[jQuery] Passing extra data to AJAX handler functions
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> I commonly want to pass an ID or some other information I know to an AJAX success handler. <blockquote type="cite"> $.post('/ajax/asset/insert', { folder_tid : lastUploadedFolderTID, link : linkQueue[id] }, handleAddLinkComplete, 'json');</blockquote> In this example, I want to pass an ID to handleAddLinkComplete function. I know I can do the
[jQuery] xml parsing bug or feature?
when in the root node of xml file i have only one node with text in it, when i parse this xml using jquery, i' am unable to get the included node... for example <Data> <item name="test">text</item> </Data> when i try then $("item", "Data", xml).size() i will receive 0. why that happens? that's quite illogical...
[jQuery] hover and className
I'm trying to change an elements class on mouse-over/out. The code below seems to fire repeatedly when the mouse moves over the target, even when the mouse is stationary, causing a slow (10/sec) flicker effect. What's causing the flicker? I was expecting the over/out functions to fire once on mouse over, and once on mouse out. jQuery("[@class^='xxx-']").hover( function(){ jQuery(this) .attr( 'class', this.className.replace(/xxx-(\w+)-off/gi, 'xxx-$1-on') ); }, function(){ jQuery(this) .attr( 'class',
[jQuery] Image Opacity 60 Percent on Hovering Images inside a link tag
I'd like to do this with minimal code and so a plugin that has a whole lot of other features would not be ideal. Could someone get me started with some jQuery code that would do this? Here's the html: <a href="link.html" class="linkFadeImageOnHover"><img class="imageFadeOnHover" src"filename.jpg"></a>
[jQuery] Simple loop through JSon object.
What's the quickest way to iterate over a very siple JSon object? My object looks like: ["data1","data2","data3"] All I want to do is get each data element out. Cheers
[jQuery] Sortable + Draggable/Sortable
Hi all, I have two unordered lists and both its listitems are draggable and droppable on the other list. Until this point everything is working exactly as it should. But, one of the lists should be sortable, and thats where it goes wrong. The list isn't sortable and i get a lot of different errors. Can anybody help me? Example at: http://dev.danielpunt.nl/IA/lib/jQueryTest/
[jQuery] Quick Question... (got a meeting in 30 minutes)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <META NAME="Generator" CONTENT="MS Exchange Server version 08.00.0681.000"> <TITLE>Quick Question... (got a meeting in 30 minutes)</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Consolas">What jQuery plug-in(s) can provide a full-screen or</FONT></SPAN></P> <P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Consolas">almost
[jQuery] adding a class to the label of a checked radio button
I think that this bit of script is adding a class to the for attribute, but I'm wanting to add the class to the element that has that for attribute. Can anyone help me do the targeting better? Thanks $(document).ready(function() { $('div#searchLabels').addClass('active'); // allows me to style the radio buttons differently when JS is enabled $('div#searchLabels :radio[id]').click( function() { var selectedInput = $(this).text(); $('div#searchLabels label').removeClass("selected");
[jQuery] FadeTo enchancement
Hi I've noticed that the fadeTo effect only seems to fade out to the value to pass in. Is there anyway of fading IN to a certain value? Cheers
[jQuery] Flot plugin on Ajaxian
Be sure to show your support and please don't let any trolls get to you: http://ajaxian.com/archives/plotting-in-jquery Rey
[jQuery] Drag'n'Drop assistance needed
Hi all, First post, taking my first leap into jQuery, bought some books! What I am aiming to achive is a drag and drop interface for a calendar (the fact it is for a calendar is pretty irrelevant actually). So I have a number of items in a list (places) and I would like to be able to drag these places into a certain time slot on a day planner-style calendar. Once the "place" has been dragged onto a specific time slot it cannot be dragged onto the calendar again (so I am currently cloning it and setting
[jQuery] How to open links in a box with the fade effect?
I have downloaded also the plugin JQmodal. This effect I like, its super. I use it for a reaction form to my guestbook. What I also want, is a quickreply function for my news messages on the frontpage. But then, the link has to pass values. Since it needs to load : "quickreply.php?id=[here the id]". How, or with what function can I do this? Im not really into javascript and of Jquery I know almost nothing. I now use: <script> $().ready(function() { $('#ex2').jqm({ajax: 'extern/2.html', trigger: 'a.ex2trigger'});
[jQuery] Safari isn't executing embedded ajaxSuccess event on first load
I have a dynamic div I populate with data from an AJAX call. The data is just HTML and inside this is some script. Part of the script is an ajaxSuccess handler than is fired under FF and IE but in Safari it only fires after the 2nd or successive calls. It used jqModal and here is some code : The caller : form = $('<div class="jqmDialog poppedup"></div>'); $("body").append($('<div class="jqmWrap"></div>').append(form)); form.html(data); form.jqm({ modal:isModal, onShow:
[jQuery] setInterval not working as i expect it to
i'm not sure why this doesn't work ... i'm probably missing some really important 'big picture' understanding of JS and jQuery, but here goes ... This code will trigger my alert every 3 seconds if placed outside $ (document).ready ... but if it's inside it, it fails. OK, this works ... function alertMe() { alert("Testing 123!"); }; function intervalTrigger() { setInterval("alertMe()", 3000); }; intervalTrigger(); $(document).ready(function() { }); this fails ... $(document).ready(function() { function
[jQuery] OT jQuery plugins user account password
Hi, sorry for the OT. I can't remember my password for the plugin repository. The "request new password" does not work. Any clue on how to retrieve the password?
[jQuery] JQModal errors out when closing a dialog
Hi, Can anyone please tell me how to solve this. I was using the latest version of JQModal (I think it was 10) and I upgraded to 11. After that, the page was being pushed down when I did jqmOpen(). So, I reverted back to version 9 which was listed as the most recent "old version". The problem is, now when I try to close a window with jqmClose() or just assigning the class jqmClose to an element, I get an indication that there is an error on this line (in Firebug): // attempt utilization of dimensions
[jQuery] event is fired every other time after using jQuery's sortable plugin
I have the following code in a page. everything related to sorting is working well. Each item has a textarea and this textarea has onkeyup event handler. This event handler will only fire every other time. Does anyone know why this is happening? Thanks. $('table.pane').each(function(){ if (this.id) { $(this).sortable({items:"tr.tsdnd", update:saveLists}); } });
[jQuery] Sortable on dynamic content - how to?
Hello, I have a list with sortable elements "<li>" using the Interface plugins. This works fine. But when I add a new element with ".append" the new element is not draggable. I am quite new to jquery and am using Live Query on other dynamic elements. How would I write this function to make every dynamic element also sortable i.ex. using livequery? I can bind an event to new elements but how do you bind a function to new elements? Is "Sortable" an event or a function? Just trying to learn :-) Here
[jQuery] Superfish: a way to right-align arrow char?
Hello, Is there any way to right-align the > character that indicates a dropdown menu is available? I'm using the vertical menu style and would like all of the > characters on the menu to align along the right hand side of the menu, while keeping the text of each <a> link aligned along the left hand side of the menu. The appearance would be similar to that of the Javascript-based menu here: http://www.cher.ubc.ca/ I would prefer to accomplish this with CSS if at all possible, but I would think CSS
[jQuery] Customer Error Handler Not Working Correctly
HI I have the following code to try to custom handle any output errors: $(window).error(function(msg, url, line){ alert('Error: ' + msg + '\n' + 'File: ' + url + '\n' + 'Line: ' + line); }); However, any errors produced from vanilla javascript seem to produced lots of undefined properties, such as: if I trigger a error with an undefined variable like so: alert(foobar); the alert dialog shows: Error:[object Object] File: undefined Line: undefined Am I doing something wrong or do I need to set
[jQuery] parsing ajax html responses
Hi, I am trying to accomplish something with the cluetip plugin, but it really has more to do with parsing ajax html responses. What I have is a search results page. I am using the href attribute as the url for my ajax request. What I get back is a fully formed html document as a string. The default behavior of the cluetip plugin is to populate the tooltip with that entire response (minus the meta, title, script etc. tags). What I really want is the contents of the meta description tag in the response
[jQuery] Ann: Flot 0.1 released
Hi! I've just released Flot 0.1, a brand-new plot plugin for jQuery which focuses on simple usage, attractive looks and interactive features like zooming. It's like plotr and Plotkit, but hopefully a bit more intelligent when it comes to auto-adjusting axes. The project page is here: http://code.google.com/p/flot/ And examples are here: http://people.iola.dk/olau/flot/examples/ I also posted about the news on my blog: http://ole-laursen.blogspot.com/2007/12/flot-01-released.html I'm in the midst
[jQuery] Fading a background image
HI Guys, I'm trying to fadeIn the background image of an A tag (which is set to display:blovk so effectively a div) when you roll over it. The A tags form the main menu of a site I am designing. I haven't managed to find any way of changing the Background Image opacity using css so can't use the normal animate method. I came up with one idea which was to wrap a coupld of block elements inside each other. Each A tag would have the background image applied and over the top of that there would be another
[jQuery] DOM traversing with 'not'
Greetings, all. I feel really stupid here, but I'm at wit's end. I want to remove the bottom border from the last LI in all DIVs except those of class 'features'. I've tried all manner of syntax, to no avail. Here's what I currently have in place: $("div:not(.features) li:last-child").css("borderBottom","0"); but this does not exclude the div.features list items as I expected. Any help greatly appreciated. Thanks!
[jQuery] jQuery Flash plugin - ignoring version number in IE6?
Hi. I am working on a site now that uses jQuery to insert a Flash movie within another tag (for sIFR effects). This works brilliantly in most browsers. However, if I use IE6, the settings for a minimum version of Flash is ignored. If the browser has Flash 6, jQuery still attempts to insert the EMBED tag, even if specify version 7. I've tried entering '7', '7.0.70' (detailed version number), and just 7 (no quotation marks). Nothing helps. Sample jQuery code is below (adapted mainly from the jQuery.flash
[jQuery] dynamic array of text inputs.. possible with current plugin?
Hi, Consider a group of text <input>'s, all related that will post as an array on submit. In the beginning, there is only one <input> in the group. If, onChange/onBlur, an <input>: a) is the last in the group, and b) has an empty value Then we assume there is more data to be entered and an additional <input> will be added dynamically at the bottom of the list and focused. If, onChange/onBlur, an <input>'s value is empty, wherever it is in the group, it will be removed from the page and focus will
[jQuery] $.ajax() over https
Should I be able to use this function when the page is served up over http, but I want the request to go over https? Or do I need to do something funny with a hidden iframe?
[jQuery] How to check is element exist
if home some like this: $('<div id="editLng_'+lng_id+'"></div>').appendTo('body'); now when i create new element i need to check if that element already exist, if exist focus, else create. I cant find in jquery documentation isExist statement or something like that. Thanks.
[jQuery] which query is most efficient?
is there a difference in performance for these two: $('p span') $('p').find('span') while, I'm on the subject, what's a good way to test performance of queries (and scripts in general) thanks --dave
[jQuery] iFrames and jQuery
I need to grab content from an iFrame, preferably using jQuery. However, I have no clue how to do this. First off, I'm inserting the iFrame into the page: <script> $(function() { $("#divID").after("<iframe src='http://example.com/test/test.html' name='tesaaat' id='tesaaat' height='0' width='0'></iframe>"); }); </script> Now then, test.html looks something like this: <html> <head><title>Test</title></head> <body> <div id="example">Text</div> </body> </html> I need to pull out the text in #example.
[jQuery] Smoothly scroll to the anchor given in the URL
Hi! I have a page with a imagemap with link areas. The hrefs look like this: href="<?php echo $_SERVER['PHP_SELF'] ?>?city=NameOfCity#memberlist" When one of those links are clicked, I would like the page to smoothly scroll down to the anchor #memberlist. However, the page is reloaded and processed by PHP when a link is clicked, so it seems that it is not possible to use, say, a jquery plugin that scrolls to anchors on the same page - at least not without modifications. I think that one solution
Next Page