[jQuery] attr() throws error
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD> <BODY> <DIV dir=ltr align=left><SPAN class=953455718-04012007>When using the following code:</SPAN></DIV> <DIV><SPAN class=953455718-04012007></SPAN> </DIV> <DIV><SPAN class=953455718-04012007>alert($('#ContactSelect').attr('tabIndex'));</SPAN></DIV> <DIV><SPAN class=953455718-04012007></SPAN> </DIV>
[jQuery] Fake Page Reload
Instead of faking a reload, why don't you just add a "status" text message that would signal the user of what has just occurred... then status fades after a few seconds.
[jQuery] Determining if an explicit width/height is set
> Currently you could use the private method $.curCSS(element, property)
[jQuery] break in $.each
> Done a test (requires Firebug - or Firebug lite (which I presume would
[jQuery] Determining if an explicit width/height is set
I know this was asked before but I don't think it was answered. Is there a way to determine if a width was applied to an element? I can get the _current_ width via .css() or .curCSS and let's say it's 421px. I need to know whether that came from a inline or stylesheet rule "width: 421px" or that just happens to be the width of the parent. The inline part is easy, just look at el.style.width. I am not sure how to tell if any stylesheet rule applies though. _______________________________________________
[jQuery] Basic Javascript Question
I've just begun using javascript and jquery and I'm very impressed with what can be acheived using it. Thank you for an excellent product! :) This may seem like a basic question but I've just started working with javascript and am learning as I go. Why is it that $(document).ready(function() { //stuff goes here }); is called directly within the document/page itself and not linked in as a file instead? I see this on a consistent basis when I'm looking at plugin examples. The written plugins themselves
[jQuery] Error: 'nodeName is null or not an object' (What am I doing wrong?)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="Courier New, Courier, monospace">Hi folks, I'm creating several divs which represent "rows" of a "table". It's not really a table though, it's table-like using divs and spans. It works great. Just the way I want. But... I'm trying to make it so that when you click on one of
[jQuery] Interface: Sortables ghosted item doesn't take the css correctly
I have a sortable list which contains quite a bit of html which includes a child ul, and I noticed when I drag the element not all the css styles are retained in the ghosted item. For example the child ul has the list-type: none, but when its drug the bullets appear. A couple elements with negative margins are disappearing on drag, but re-appearing onStop. One of these items is my drag handle... so it looks kind of weird. Anyone had similar issues? -- View this message in context: http://www.nabble.com/Interface%3A-Sortables-ghosted-item-doesn%27t-take-the-css-correctly-tf2919869.html#a8160367
[jQuery] noob q - using $().html
Hi Just getting into using js to do things. I'm just experimenting right now. Here is my example code: <p id="member_info"> <script type="text/javascript"> function findMember(form){ $("#member_info").html(form.username.value); } </script> <form name="find_member" action="" method=GET> <input type="text" size="30" name="username"> <input type="submit" onClick="findMember(this.form)" size="30" value="Find by Username"> </form> now what happens when I fill in a value and click is that the value I entered
[jQuery] center() plugin
I can't seem to find the center() plugin that is listed at <a href="http://visualjquery.com">visualjquery.com</a>, anyone know where it is? _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Interface elements / Command Key
Hi I have a suggestion to make for the interface elements plugin. I hope it is ok to post it here, since the interface elements website does not have a forum on its own (yet). Selections can be done with CTRL-click, but CTRL-click on the Mac simulates the right mouse button. So whenever I do a CTRL-click in my browser, I'm getting the context menu. Mac users use the "command" key (the "apple" button) to make selections so I thought I might add this to the code (see attached diff). Daniel _______________________________________________
[jQuery] re. Wildcards
<html> <body> Thanks Aaron, Jörn for your responses. Aaron - your solution gave me what I was after - I'd seen that [...] structure in a couple of posts in Nabble but I couldn't figure out how to use it (or even if it was what I needed). Jörn - in my context I'm using a class element (class="deleteA") in the a tag as part of the "route" to triggering the delete function i.e. <tt> $("a.deleteA").bind("click",function(){deleteAppAsset(this.id)}); </tt>I'm unclear, in the wider context,
[jQuery] Events on Document versus preventing Text Selection
Hi guys, I have a really really strange problem. I have the following case, which I think is actually a browser bug that occurs in all major browsers: 1.) I have a mousemove event attached to the document 2.) If I move out of the window holding a key pressed, the event still fires, which is what I want. So now here comes the tricky part: 3.) I make text on the element/body not seletable anymore, i.e. using MozUserSelect or this.unselectable = "on", or return false or what else (all the same). 4.)
[jQuery] Wildcards
<html> <body> Hello folks, Can wildcards be used in the following context... I change the ID of an "a" tag surrounding an icon (that when clicked triggers a delete function) from its original setting of "del" to a string containing info (pb, iA) about the item (to be deleted) by: <tt> $("#del").id("del*"+pb+"*"+iA+"*ck"); </tt>This only "works" for the first iteration. If I subsequently select another item to be deleted, the ID of the "a" tag is no longer just "del" and so obviously the ID of the
[jQuery] traverseDir and addDir jquery plugins
traverseDir and addDir jquery plugins By reading the index page from an apache server, I can find all the files in a directory. These plugins parse the page, recursing though directories. Then add to the dom based on the parameters passed, and what they find. http://cigar.dynalias.org/js/jquery-traverseDir.js http://cigar.dynalias.org/demo/traverseDir/ PS Try not to hit my server too hard. It's running in the background of my mac g5. -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ _______________________________________________
[jQuery] properly unbinding events will give u $5 if you can figure it out
hi guys is me again. I ran into a problem and haven't found out a solution. Anyways, here is the problem. when the page load, a function begin() is called. When u right click on the text, the iniMenu() funciton is called. When the iniMenu() is trigger it unbinds all events: $("span[@id^=eip-]").unbind(); it then binds a click event to "edit", "add bug", and "cancel". when the edit button is triggered, the edit() is called which then initialize tiny_mce editor, then again, do a $("span[@id^=eip-]").unbind();
[jQuery] Bug in jquery? (IFrame, Ajax & Firefox)
Hello, I developed a small Ajax-chat. Now I switched to an IFrame-solution to "outsource" the scripts to a different server. Now I get this nasty bug (only on newest Firefox 2.0.0.1, Opera and IE are fine): [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://hetzner7.citybeat.de/include/jquery-1.0.4.js?a=d :: anonymous :: line 1905" data: no] The error seems to be
[jQuery] Recent updates to the form plugin
The latest version of the form plugin has some new features that you may not be aware of. New Functions: resetForm, clearForm and clearInputs // invokes the form's native 'reset' method $('#myForm').resetForm(); // clears all (appropriate) fields in the form $('#myForm').clearForm(); // clears matched fields $('.myStuff').clearInputs(); New Options for ajaxSubmit and ajaxForm: resetForm, clearForm // resets form after successful server response $('#myForm').ajaxForm({ resetForm: true }); // clears
[jQuery] [Newbie] dynamic text loads...
I have some data in an js associative array: texts = new Array; texts.webmail = "Go directly to Web e-mail. The easy way to read and write e-mail when you are away from home."; texts.dsl ="Complete information on the DSL service."; texts.members = "Member information and downloads." My document has this unordered list: <ul id="links"> <li> <a id="dsl" href="#">DSL High Speed Service</a> </li> <li> <a id="members" href="#">Member Services</a> </li> <li>
[jQuery] File (image) upload
Hello, I like to upload an image from a form with ajax, but I don't know how it is working. I know, I must to make an iframe, and I must to send the file to this iframe and getting back the results, but I don't know how it is working. I try to examine Drupal upload solution but it is to difficult for me now. I only like a _very_ _litle_ example or tutorial how it is working. Thanks -- Ámon Tamás http://linkfelho.amon.hu _______________________________________________ jQuery mailing list discuss@jquery.com
[jQuery] help speeding up code
Hey all, I am working on a project at http://ov.informationexperts.com/test.htm http://ov.informationexperts.com/test.htm and the only issue I am having is the speed of my code. steps to test: 1. create three or more points by click in the grey box area. 2. when finish, dbl click the first point your created to close the box. (at this point there is a second or two delay) 3. At this point you can resize/reshape the box by dbl click and then hold down any of the points. (when you mouse up there will
[jQuery] keydown fires twice in safari
I'm trying to put together some keyboard navigation for a plugin I am working on but the keydown function seems to fire twice when a key is selected in safari. Is this a bug? Here is an example=> http://brilliantretail.com/cases/select3/test.html Simple Exampe The alert fires twice only in the safari browser...... Thanks, david -- View this message in context: http://www.nabble.com/keydown-fires-twice-in-safari-tf2906674.html#a8120558 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________
[jQuery] help speeding up code
--
[jQuery] A question on itteration
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="Courier New, Courier, monospace">Hi folks, I've got a page with a table and various tds that look something like this: <td id = "SomeUniqueID" class = "someClass" originalColor = "someColor" state = "Enabled" status = "off"
[jQuery] multiple events attaching to cloned elements in IE
im having trouble sorting out why my clones are attaching multiple events in IE and not firefox. they are only supposed to attach their contextualized event (thus the each loop) but in IE they all get attached and fire off one after another. the code: $('rowNode', xml.responseXML).each( function(i){ var clone = $($(cloneTemplate).clone().get(0)); $('#target').append(clone ); clone .click(function() { $(this).css({border:'orange '+(i+3)+'px solid'}); });
[jQuery] Problem with offsetParent in IE
Hi, I just played around with the interface-plugin and stumbled over a ugly error in IE and the iutil-functions. E.g. I created two sortable-lists, which are dnd. Everything works fine. Then I change the complete lists with ajax. After this I always get an unknown error in IE at a position in the iutil-file where the property offsetParent is called. I found the following description: http://weblogs.asp.net/rajbk/archive/2006/11/29/ie-6-7-unspecified-error-when-accessing-offsetparent-javascript.aspx
[jQuery] My brain is broken
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Not only because I can't find an appropriate subject line, but also because I can't find the issue with the following code (it's not jQuery related - I beg for mercy): ---------------------------------- <tt>var myThoughts = { color: 'Blue' , name: 'Felix' , food: 'Lasagna' } var myMemory =
[jQuery] My brain is broken
John, I am using firebug 0.4.1 and I am getting the same response as felix. Felix, I think you broke my brain now... Thanks... now I need a nap. Sorry I could not be of help, I've never been good with arrays/objects. -----Original Message----- From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On Behalf Of John Resig Sent: Tuesday, January 02, 2007 9:10 PM To: jQuery Discussion. Subject: Re: [jQuery] My brain is broken I copy-and-pasted your code into firebug and it worked perfectly.
[jQuery] disable div oncontextmenu?
Hi guys, I wanted to know if it's possible to disable contextmenu from a given element: span for instance. IE7 doesn't seem to like it very well? begin: function(){ var selectors = $("span[@id^=eip-]"); $.each(selectors, function(i) { $(selectors[i]).oncontextmenu = function() { return false; } or $(selectors[i]).attr("oncontextmenu", "return false"); return true; }); }, for some reason, it would only disable at the initial page loading.
[jQuery] [Newbie] dynamic text loads...
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On Behalf Of Birgit Pauli-Haack Subject: [jQuery] [Newbie] dynamic text loads... Is there a way to get this solved dynamically? Birgit ----- UNTESTED, but something like this should work... $("a[@id]").hover(function () { $("#boxtext").html(texts[this.id]); }); As long as the id of the link is the same as the key in the texts array the desired text should pop up. I'll explain in detail what's happening just to be safe. Pardon
[jQuery] Attaching an element event before all others
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Hey folks, I've just been struggling with this and thought there is probably an easy answer to it that's unknown to me: <b>So the Question is: </b>I got an anchor element that has an onClick event attached to it (using jQuery) and I need to register a second event that is going to be called before that.
[jQuery] Stopping animation..
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);}
[jQuery] Clearing all form field values
I'm going to be submitting a form via AJAX and I'd like to be able to clear all of the fields afterwards. I could obviously do it by referencing each field manually, but I'm wondering if it's possible to do something like this: $('#myForm').clearFields(); or something to that effect. I just want to reset all fields to their original values. Is this possible using jQuery, without having to do each field individually? <!----------------//------ andy matthews web developer certified advanced coldfusion
[jQuery] Stopping animation..
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Helvetica, Arial, sans-serif">Is there any way to stop an animation or fade? How to stop $('#div').fadeTo(500,0) on click or something? </font> </body> </html> _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] closing window in FF 2.0, IE6, IE7
I know this is not jQuery related but does anyone know how to close those browers? this only works on IE's < a href=”javascript:window.open(”,’_parent’,”);window.close();”>Close this window -- View this message in context: http://www.nabble.com/closing-window-in-FF-2.0%2C-IE6%2C-IE7-tf2910037.html#a8130578 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jquery expression language docs - are they in SVN?
Hi, JQuery code has good API documentation in its source code files, and the code repository contains a build script to extract that documentation (and convert it to XML). I'm fiddling with a version of that script that generates a PDF of the documentation (using a free Java PDF library called iText). However, I think the API documentation isn't enough - when working with JQuery, you really want a handy reference for the selector expressions, something like these two pages in the wiki: http://jquery.com/docs/Base/Expression/CSS/
[jQuery] find mouse cooridate?
hi guys, I'm trying to find the mouse coordinate whenever I right click but it I just can't get passed this point. Here is my code: begin: function(){ var selectors = $("span[@id^=eip-]"); $.each(selectors, function(i) { $(selectors[i]).bind("contextmenu", function() { eip.mouse(window.event); // THIS IS WHERE I'M STUCK }); return true; }); }, mouse: function(evt){ alert( "clientX
[jQuery] blur() method doesn't work in Safari with checkbox
Hi, Under Safari, blur() method doesn't work for checkbox/radio elements. It's necessary to open a new bug or we see the conclusion of bug 379 [1] ? Testpage : http://gimp4you.eu.org/sandbox/js/test/safari_blur_checkbox.html (jQuery 1.0.4) Mehdi. 1. Fix for Safari's lack of support for 'onchange' : http://jquery.com/dev/bugs/bug/379/ -- View this message in context: http://www.nabble.com/blur%28%29-method-doesn%27t-work-in-Safari-with-checkbox-tf2908418.html#a8125378 Sent from the JQuery mailing
[jQuery] clone() returning the cloned objects instead of a reference
<div>The clone() function returns the cloned object instead of a copy. Thus, when I modify what it should be the copy, it modifies the original too. This only occurs when I assign the object to clone to a variable and use this variable to call the clone function. For example: </div> <div> </div> <div> <strong>// works as expected</strong></div> <div> var templateDivCopy = $('#templateDiv').clone().get(0); templateDivCopy.innerHTML = 'This should be only in the copy'; if(templateDiv.get(0).innerHTML
[jQuery] error in packed version of svn 799
Hi I just updated my svn (version 799). I get the following error in Firebug when trying to use the packed version in firefox 2 : <div class="logRow logRow-errorMessage"><span class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch"><div class="errorTitle"> missing ; before statement</div><div class="errorSourceBox errorSource-syntax"><img src="chrome://firebug/content/blank.gif" title="Break on this error" class="errorBreak"><span class="errorSource">hild)","\\+"," jQuery.nth(a,2,'nextSibling')","~",function(a){var
Next Page