[jQuery] minimize loading time
I am using jquery $.post method and $.each, these two methods is enough to me for simple pages its hard for me to load a 15kb jQuery.js file, is any other way to load minimized jquery file
[jQuery] Best JQuery pop-up plugin.
Hi All, what is the best JQuery pop-up window plugin in your opinion? I am not strong experienced in JQuery and looking for such plugin but don't want test everything. So lloking for short cut. Thanks All! -- View this message in context: http://www.nabble.com/Best-JQuery-pop-up-plugin.-tp19556756s27240p19556756.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] What does 'return false' do?
What does 'return false' do? I make an AJAX request from an HREF, which works. But the resulting page needs Javascript to run on it. I think 'return false' is preventing it. How do I fix that? Here's what I've read so far from the Chaffer / Swedberg book: "If we wish to halt both, we can return false from our event handler, which is a shortcut for calling both. stopPropagation () and .preventDefault () on the event."
[jQuery] an unusual bug. addClass to td inside tr with a class doesn't affect the cell
html: <table> <tr><td></td><td></td></tr> <tr class="odd"><td></td><td></td></tr> </table> css: .odd { background-color: red; } .dead { background-color: yellow; } javascript: $("td").hover( function() { $(this).addClass("dead"); }, function() { $(this).removeClass("dead"); } ); this won't work on .odd rows for me... dunno why... however changing css affects this...
[jQuery] Ajax not sending data correctly when it's a variable, but perfect when it the value is typed in instead.
I have a simple AJAX call: $.ajax({ url: "setBMBJSONString.php", data: stringJSON.toString(), <---------------------------------------------------- success: function(rdata) { //var resp = eval('(' + rdata + ')'); $("body").append(rdata); }, error: function(XMLHttpRequest, textStatus, errorThrown) { var e = XMLHttpRequest; for (var key in e) { $("body").append(key + ": " + e[key] + "<br />"); } } }); That won't work, the data doesn't get to the webservice that way. But if I do this instead: $.ajax({
[jQuery] Simple question about Radio Buttons
Why does this line of code not work for the radio button? if ($(this).attr("type") == "radio") alert($(this).checked); I get 6 alert boxes (I have 6 Radio Buttons) and the alert says undefined every time. But half of them should be true and half should be false. Am I doing something wrong? here are two of the radios: <input name="recvd_loan" type="radio" value="1" /> Yes <input name="recvd_loan" type="radio" value="0" /> No Thanks!
[jQuery] selecting id's with similar names
Hi..am trying to accomplish the following: I have several input elements on my page...there are a few that I want to alter and their id's follow a similar pattern from a naming convention: id="SOMETHING-fieldname" Is there a way to select / filter all of the input elements on the page to only those that start with SOMETHING? M
[jQuery] Autocomplete: In Firefox 2 on Mac, form is submitted when menu item selected using Enter key
I'm using Autocomplete 1.0.2 (5747 2008-06-25 18:30:55Z joern.zaefferer). This happens in Firefox 2.0.0.16 on OS X (I'm running 10.5.5). Does *not* happen in Firefox 2 on XP, Firefox 3 on XP & Mac, Safari 3, IE6, IE7. I tried it on two different Macs with the same result. This can be reproduced even on the demo page: http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/ Any ideas why this is happening and how to fix it?
[jQuery] quite non-elegant code. please advise!
This is my first jquery function, and im trying to handle rollovers and click. The behavior i want is to toggle a class on hover for each li element, and then disable the hover on the one that is clicked and selected. Right now im using three separate handlers; click, mouseover, and mouseout, and then using if statements to check if it has the "highlight" class. bah. bah? thank you.
[jQuery] Simple Q: Javascript fails on JSON data
This is simple, but I'm lost. I click a link, and jquery loads a form using jquery and JSON (works great!) But, the form has collapsible fieldsets (using Drupal's collapse.js) and the javascript doesn't run on them. That's probably because the collapse.js needs to run on the newly loaded form elements but it *won't* because I'm doing 'return false' after my .get(). Workaround: If I intercept the form SUBMIT click and paste the collapse.js, then the javascript starts working on my form. That's not
[jQuery] jQuery Cycle plugin question - changing speeds mid-slideshow
I have an effect where I cycle through images with the default slow fade speed, and when a user mouses over a link, I jump to a specific image via: $('#myPics').cycle(3); The problem is, I want to change the fade options to "fast" just before I jump to that image. How would this be done?
[jQuery] jquery.com incredibly slow for me
Can someone please confirm that jquery.com is sometimes (%2) so slow, pages won't even show up after 2 minutes waiting ? The slowness has been there before tha page has been redesigned. I'm on winxp FF3. I's the same with my colleagues here and @home.
[jQuery] jQuery usage to provide 'clean' JavaScript database strings
I have recently had a problem with a web application that I'm doing modifications to. I tracked it down to a few JavaScript AJAX functions that were pulling options from a MySQL table and then populating <option> values within a <select> form attribute. It turns out that one of the table's fields contained an ampersand; that ampersand broke all of the code. I'm not sure exactly where the break occurred.. Firebug showed me that the AJAX functions were returning a list of options to the JSP servlet
[jQuery] jquery/livequery assign behaviour to element by class
Currently I am using $(document).ready to bind some behaviours to elements in the DOM based on a class name (using jquery's .filter) - This works great on the initial load of the page however these bindings get all screwy when I try injecting or editing new elements to the DOM dynamically via AJAX. After researching the issue I have been trying to use the livequery plug-in but have been unsuccessful so far. In $(document).ready I am assigning behaviour to td elements of the class "hasContent". I
[jQuery] jquery/livequery assign behaviour to element by class
Currently I am using $(document).ready to bind some behaviours to elements in the DOM based on a class name (using jquery's .filter) - This works great on the initial load of the page however these bindings get all screwy when I try injecting or editing new elements to the DOM dynamically via AJAX. After researching the issue I have been trying to use the livequery plug-in but have been unsuccessful so far. In $(document).ready I am assigning behaviour to td elements of the class "hasContent". I
[jQuery] jTemplate and AJAX ?
I have tested the use of jQuery, jTemplates and AJAX together with asp.net shown in this blog : http://encosia.com/2008/08/20/easily-build-powerful-client-side-ajax-paging-using-jquery/ And i got everything to work against my library of methods. However i need to set some event handlers to the data i load through AJAX and i can't get it to work. This is what I have tryed : function addClickHandlers() { $("a.remote", this).click(function(e) { e.preventDefault; $("#RSSTable").load(this.href, addClickHandlers);
[jQuery] JQuery YAV plugin inputclasserror question
For the YAV plugin, can you use the option 'inputclasserror' by itself? $("#form1").yav({ inputclasserror : "fieldError" }); Do you need the 'errorMessage' option work this to work? $("#form1").yav({ errorMessage : "Errors are found" },{ inputclasserror : "fieldError" });
[jQuery] Jcrop v0.9.0 image cropping plugin - comments please
Announcing initial release of Jcrop image cropping plugin for jQuery. This is my first plugin release, so I would appreciate any feedback. http://deepliquid.com/content/Jcrop.html Also posted to plugins.jquery.com There are some rough edges in the API and a few other minor issues. More work to do before 1.0, but what's there is pretty functional. I needed to push it out or I'd keep tinkering forever... Thanks for looking! -Kelly
Dont fire so many times!
Hi fellow coders, I have some script which technically works fine, when I roll over the link it toggles a div to either show or hide, the problem that I can't get my head round is stopping jQuery firing the slideUp and slideDow when the user hovers on and off the mouse in quick succession (says 10 or 15 times) and then sits there waiting for jQuery to stop all the animation sequences. Code below... <html> <head> <title>Stop Animation over firing</title> <script type='text/javascript' src='jquery.js'></script>
[jQuery] Blank page when using ThickBox on Internet Explorer
Hi, In thickbox.cfm, I'm using the following code to create a thickbox login popup: <a href="login.cfm?height=400&width=600" class="thickbox" title="Please Sign In">Login</a>. This is the parent page. In login.cfm, I have a form. After clicking on the link to login a thickbox pops up with the form. After submitting the form, the thickbox closes and the result is displayed in the parent page. This works great on all browsers in localhost and on one of my servers (which uses a transitional doctype).
[jQuery] Xpath Plugin: Child Selector Predicate Support [\d+]
Hey Jquery hackers: I'm doing some work with the Xpath plugin and I notice it doesn't support expressions like: /html/body/center/form/table/tbody/tr/td[2]/input[3] (Used to select the search box on www.google.com!) I would like to extend the plugin to support this kind of expression. Because (to my knowledge) CSS selectors don't specify a way of selecting specific child elements I believe that the best way to run the selector recursively: Given the selector: /html/body/center/form/table/tbody/tr/td[2]/input[3]
[jQuery] datagrid with horizontal scrollbar
Hello! I am looking for a lightweight jquery datagrid which also supports ahorizontal scrollbar. I would like to hear if there's any plugin with that functionality and if this plugin lives up to your satisfaction. Hope to hear A.Consten
[jQuery] navbar width problems
Hi, I asked a bunch of questions in one post and perhaps that wasn't the best idea. I hope its ok to post one again, one of the more pertinent ones. My menu will ways have 7 submenus (each of those will have a varying number of children and grand-children, etc) Each main menu item of the 7 needs to have just a little bit of white space between it and the next item. I'd like to use percentages unless there is a better way to accomodate variable widths. However I can't seem to get them to fit tightly.
[jQuery] custom / slimmed-down jquery possible?
and no i dont mean packing or minifying! :) basically all i need is 1 plugin (simplemodal) and because of that i'm forced to load the entire jquery library, which is crippling load times... we use jquery extensively in our website but we have banners in other sites that open a simplemodal (lightboxish) dialog and as far as the banners are concerned since its many sites and many different viewers we can't really count on caching to help either... so here's my question, is it possible to strip-down
[jQuery] function to call ajax
Hi, I've been work working jQuery for more than 4 month, and really love it. There are still a lot thing I need to learn, here is one: I like to create a function, Get_MyData. test_ajax() alway return "undefine". what's wrong in my code, what's the proper way to do this? Thank you very much for your time. Wes code: // function Get_MyData (para1) { var parameters = "AjaxServer.aspx?para1=" + para1; $.getJSON(parameters, function(data) { // error handle if (!onError(data)) return ""; // var retList
[jQuery] BlockUI 1.33 $.blockUI.defaults.pageMessage is not showing the image
hi, i´ve this: ------------------------------------------------------------------- $().ajaxStop($.unblockUI); function test() { $.ajax({ url: 'process.php?' + new Date().getTime() }); } $(document).ready(function() { $('#Submit').click(function() { $.blockUI.defaults.pageMessage = '<h1><img src="ajax-loader.gif" /> Por favor aguarde...</h1>'; $.extend($.blockUI.defaults.overlayCSS, { backgroundColor: '#e9eaea' }); $.extend($.blockUI.defaults.pageMessageCSS, { color:
[jQuery] IE7innerHTML and text normalization
Hi All, I'm trying to replace all linebreaks with html <br />, but due html normalization with the innerHTML propery in IE7 the following piece of code won't work in IE7 <div id="text"> thingy 1 thingy 2 </div> <script> var str = $('#text').html(); $('#text').html(str.replace(/\n/g, "<br />")); </script> (description of the normalization bug: http://www.quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html) Does anyone has a crossbrowser workaround or another solution to this problem? Thanx
[jQuery] how to toggle text
Hello, I begin with jQuery so.... looks like one toggle function is missing : how can be accomplished the change of a text in a link , (and it's title or a alt text) between to possible states : ie: I use this to hide/display a content div a linl and this : $("#toggle-content").click(function(){ $("#contenu").toggle(); $("#toggle-content").toggleClass("ouvert"); this will add a class to the link #toggle-content to make it "" when closed (default) or ".ouvert" when opened. BUT the link remains the
[jQuery] Need some help with image map coding....
Hi I am trying to make a image map of the U.S.A so when users click a state my php code would grab the value that was clicked which would be a states name so I can go into my database using php and do a lookup and generate a list that was submitted for that state. Does jquery or javascript offer good usermaps coding??? I am trying to find pre-coded image map of the U.S.A. So I don't have to reinvent the wheel I mean it will take a while for me to put each code for each 50 state. any ideas??
[jQuery] puzzling black hole in $(...).hasClass()?
hi all, i’m doing this in ffx2 and firebug1.05; i have a local document loaded, go to the firebug console, and write $log( $Q( 'div' ).hasClass( '' ) ); $log( '###' ) to which firebug responds with true ### thereby showing bot commands did execute. now i repeat the experiment, but with $log( $Q( 'div' ).hasClass( '.x' ) ); $log( '###' ) the argument to `hasClass` is problematic: it uses selector-syntax and starts with a dot. this is a mistake that easily results from copy-n- pasting code. acceptable
Dropdown navigation in firefox
I'm developing a drown down navigation with a pretty standard ul/li structure: markup structure for the navigation... <ul> <li>home</li> <li class="subMenu">some stuff <ul> <li>a bunch more stuff</li> <li>a bunch more stuff</li> <li>a bunch more stuff</li> <ul> </li> <li class="subMenu">some more stuff <ul> <li>more stuff</li> <li>more stuff</li> <li>more stuff</li> <ul> </li> </ul> So, my issue
[jQuery] How to use context and reference it inside a jquery object
I have a question, is there a way to reference the context in a way such as $(this)? for example, let say I have this (using general selectors) $('.forms').each(function(i) { // I want to iterate over all forms // here $(this) is each form $(':input', $(this)).change(function(){ // Here I want to do something with the input element as well as with the form element, but $(this) would be the input element, can I do something to reference to the form element? }); }); I am trying this but of course it
[jQuery] Dialog Box Too Small
<div dir="ltr"><div>Thanks for taking the time to read my question.</div> <div> </div> <div>I have a dialog box on my page that pops up after clicking the link.</div> <div> </div> <div>My problem is that when it comes up, it is too small. My content requires the size of the dialog box to be both wider and taller.</div> <div> </div> <div>I've downloaded jquery-ui-themeroller.css from Themeroller.</div> <div> </div> <div>I've tried to add width and height to .ui-dialog, but it doesn't make a difference
[SOLVED] Form listener, get all inputs...
I'm trying to get a script working which will go through a form, when it submits, and disable any fields which have no value... Here's the code I have thus far; the script is not making it into the jQuery(':input',this).each(function().. line.. Anyone have any ideas? jQuery(document).ready(function(){ jQuery('form').submit(function(){ jQuery(':input',this).each(function() { if(this.value=='') jQuery(this).disable(); }); return false; });
[jQuery] Show a Div based on a Dropdown selection
So I have a dropdown with the 50 states in it. I want to show a div based on the selection. I understand pieces of what to do but not sure how to put it together. <select id="stateList"> <option value="alabama">Alabama</option> <option value="alaska">Alaska</option> etc.. </select> <div id="showState"> <!-- Show State Information here --> <div id=alabama> <h2>This is Alabama</h2> </div> <div id="alaska"> <h2>This is Alaska</h2> <span> Alaska is bigger than Alabama> <table> <tr> <td>population</td>
[jQuery] put image on top of another image
I m new on jquery, I am not can jquery can do or not I want to put a image on top of other image, e.g. we have a product image, we want to put a sign of "sold" or "hot buy" image on top , any idea how could I do it in jquery ?
[jQuery] Jquery 1.2.6 + jGrowl easing error
When I am using the default swing method of easing I get this error. D.easing[this.options.easing || (D.easing.swing ? "swing" : "linear")] is not a function Was easing removed in 1.2.6?
[jQuery] Nothing displays when reloading Flash content with an .ajax() call
I've been working on an issue for a while that's got me beat. I have googled quite a bit, and found this article, http://weblogs.asp.net/adamgreene/archive/2007/09/11/ajax-flash-cs3-and-dynamic-javascript.aspx, that describes my issue, but the solution is not jQuery-oriented. Quoting from the article: "When you update a block of text via AJAX that has embedded script tags, the script doesn't run." This is *exactly* the issue I'm running into. When a menu item is clicked, I am simply loading the HTML
[jQuery] Stop browser to be closed
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000066"> Can I detect and stop user to close the window without logout ? I have a win-cgi system that is configured to a few hours session timeout, so if the user abandon the session, it will die only in several hours I saw that kind of warning or auto-logoff somewhere, just cant remember. How could I implement that with jQuery? Thanks a lot! Alessandro Feijó </body> </html>
[jQuery] Why is getElementById different from $('testid')?
So I have this code to write a content to an iframe which works just fine. I'm trying to rewrite it using Jquery though. var f=document.getElementById('testiframe'); var doc = f.contentWindow ? f.contentWindow.document : f.contentDocument ? f.contentDocument : f.document; doc.open(); doc.write(scriptvar); doc.close(); In testing, I'm finding that these are different: 1) var f=document.getElementById('testiframe'); 2) var f=$('#testiframe'); So #1 gives [object HTMLIFrameElement]
Next Page