[jQuery] Mouse Down/Alternating Colors on Tables
I really like this click-to-select effect.
[jQuery] Applying event handler to .load-ed content
Hi all, Reading through the archives I have found out why I can't apply the click function to content I have added via .load - however I can't get any of the solutions to work! (And I don't fully understand them which doesn't help either!) In simple terms, does anyone have a way for a newbie to re-apply event handlers to content that's been called via .load? Here's what I have: // Search button has been clicked - let's do some AJAX, baby! $("#searchbutton").click(function(){ $("#animal_table").slideUp("slow");
[jQuery] UPDATED - possibility complicated color codingquestion, now with example...
Okay... I've got a working version online: http://commadelimited.com/travian/maptest.cfm I've got a few more questions. 1) The page will always load with at least one class preset (based on the user's choice). What I want to happen is for the user to be able to toggle back and forth between 2 possible views. I thought I could simply duplicate the code and swap some values and have it work. However, once I've clicked both buttons, I can no longer get the values to change colors. What's actually going
[jQuery] UPDATED - possibility complicated color codingquestion, now with example...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=781200721-07082006><FONT face=Arial color=#0000ff size=2>Hmmm...learning something new. I'll give this a try and see what I get. At this point I foresee only 12 possible colors for the map so hardcoding them into the original $() object wouldn't be that hard. But for other
[jQuery] interface drag & drop bugs
The interface plugin appears not to work when the contents of the container div are larger than the container. I've got an example at this URL: http://www.themullers.org/ scrollsort.html It works fine until you scroll the div. The problem appears to be in idrag.js or maybe iutil.js -- clearly the cursor coordinates need to be adjusted to account for the container div's scrollTop, but I'm not sure exactly where to account for this. Also, the library appears to not work at all in Safari. Are these
[jQuery] Problems with addClass in IE
Hi there, I'm new to JQuery and experimenting with it. I've just wondered about the .addClass and .removeClass feature. It works nicely for me in Firefox, but it does not work in IE. I've checked the mailinglist, but couldn't find anyone else mentioning that. So it seems I've missed something somewhere. Anybody out there to help me out? Short example: $('#testDiv').addClass('testClass'); I guess you've seen this before ;-) Thx in advance Mat -- View this message in context: http://www.nabble.com/Problems-with-addClass-in-IE-tf2061272.html#a5678670
[jQuery] $('').attr('', '') - why no direct method to get/set html attributes
> 1. IIRC these properties don't always = attributes:
[jQuery] attr() not working in IE anymore?
> I can confirm this bug. Something simple like this: > $('#continue').attr('disabled', false); > isn't working in IE. I think that is a different issue entirely, I filed a bug/fix for that a few days ago: http://proj.jquery.com/dev/bugs/bug/118/ _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] IE - .addClass - I'll give you an example
OK, it looks like you have found a problem in IE. It has nothing to do with jQuery, so knowing that will help lead you toward a solution. Try this code with no JavaScript at all: <html> <head> <style type="text/css"> #test{ width:100px; height:100px; display:block; border:1px solid black; } #test.oneClass{ background-color:red; } #test.twoClass{ background-color:green; } </style> </head> <body> <div id="test" class="twoClass">test</div> </body> </html> I changed the classnames a bit, just to make
[jQuery] attr() not working in IE anymore?
> I made a test page which can be found here:
[jQuery] IE - .addClass - I'll give you an example
> Ok, it's me again. Was late last night, that's why I made this post.
[jQuery] Keypress problem
Hi all, first above all, jQuery rocks! I'm currently doing a prototype for a big project. I used script.aculo.us and prototype, but for different reasons, I decided to recode all using jQuery (the first reason was to use a complete lightweight library). Wi the old libraries I had developed a "small" script using the keypress event to do something like a Google Suggest where a liste become smaller depending on the text entry (the difference is that I'm not using a form text field). On FF my new jQuery
[jQuery] $('').id('') method suggestion
<!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.2800.1543" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2> <P><SPAN class=049542203-06082006>from the svn comments:</SPAN></P> <P><SPAN class=049542203-06082006> /**<BR> * Set the id of every matched element.<BR> * <BR> * @example $("input").id("newid");<BR> * @before <input type="text" id="test" value="some
[jQuery] Conflict with Yahoo UI
I was building a sortable list in activeCollab but the <ul> wouldn't work correctly and $.Sortserialize doesn't seem to exist. The minute I remove yui/yahoo/yahoo-min.js or yui/dom/dom-min.js the jQuery Sortable works great. Here is my ul.Sortable -------------------------------- $('ul').Sortable( { accept : 'sortableitem', activeclass : 'sortableactive', hoverclass : 'sortablehover', helperclass : 'sorthelper', onchange: function(s)
[jQuery] attr() not working in IE anymore?
Hi, I just discovered, that Internet Explorer (both 6 and 7) show erros when calling this function. I am using rev. 169 (the most recent, afaik). Konstantin _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Show/Hide with Two Links
How can I reset the show/hide toggle of one link if a specific hide link in the recently shown content section is clicked? Here's what I'm using so far, but of course, if you click the hide cart link, you have to click the show cart link twice to show the cart again since the toggle doesn't reset. Scott $(document).ready(function(){ $("a.show_cart").toggle( function(){ $("div#minicart").slideDown("normal");}, function(){ $("div#minicart").slideUp("normal");});
[jQuery] $('').attr('', '') - why no direct method to get/set html attributes
> on a fair few occasions I've found that some attributes only
[jQuery] Ajax and jQuery paths
I would like to make use of the Ajax-part of jQuery, to avoid long load times. But I can't do what I want. See this example: $(document).ready(function(){ $("div#table").load("/ajaxtable/"); $("a").click(function () { $(this).hide(); }); }); When clicking a link, it is going to hide. It works very well with the links _not_ loaded by Ajax. But the links on the Ajax-siite doesn't react at all! Is there a way to use $(...) on parts loaded by the load()-function? Best regards, Søren
[jQuery] Form deserialize plugin
I've made a plugin for populating a form via data received as JSON from an AJAX call. <pre> * This plugin sets the values of form element variables from a JSON array/hash * This is the reverse process of Mark Constable's serialize function * It is expected to be used as a call back for an ajax call that retrieves the form data * @param data : array or hash containing name,value pairs for elements in the form * * <b>Examples</b> * * 1. Deserialize from an array * $('#form-id').deserialize([{'name':'firstname','value':'John'},{'name':'lastname','value':'Resig'}]);
[jQuery] fadeTo()
<!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.2800.1543" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=980582903-06082006>Hi,</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=980582903-06082006></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=980582903-06082006>This is something noticed and felt could be more practical - as
[jQuery] $.closure
Me again, What is the deal with closures in jQuery? Is there a helper function yet to ensure decent garbage collection? I know there is a plugin, but there has been talk of it being included in the jQuery base for ages - but I haven't spotted anything yet. What is the current method people are using for dealing with closures? I assume there is already a fix for the jquery events stuff - but is there a helper function available for custom closures? Only just got my head around them (I think) and realised
[jQuery] $('').attr('', '') - why no direct method to get/set html attributes
Hi Again, You (John Resig) say that both attributes and properties do essentially the same thing: "having both a .attr() and a .prop() method is redundant, as they'd both end up doing, essentially, the same thing" Now I know that in theory this should be correct - but on a fair few occasions I've found that some attributes only seem to have the appropriate HTML/DOM effect if set using setAttribute and in doing so can only be retrieved using getAttribute - whereas directly assigned properties exibit
[jQuery] How to speed up JQuery?
Hi all, maybe I am doing something very wrong but JQuery seems to awfully slow on large documents. I have one with ~100K size and about 500 divs in it. Within the document, I have a code section that looks like this: ... <div id="hook"> ... <div class="item">...</div> <div class="item">...</div> <div class="item">...</div> (~50 items) ... </div> ... On document.ready I do this: console.time('items'); $('div.item').each(function(){ // nothing in here to test the raw speed of the selector }); console.timeEnd('items');
[jQuery] Modify javascript function on page
<!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.2912" name=GENERATOR></HEAD> <BODY> <DIV dir=ltr align=left><SPAN class=005261214-05082006> > </SPAN>I'd like to use jquery to modify a javascript function that gets </DIV> <DIV dir=ltr align=left><SPAN class=005261214-05082006> > </SPAN>loaded with a page. I do not have access to the code of the</DIV> <DIV dir=ltr align=left><SPAN
[jQuery] $('div p') returns incorect node List order
HTML: <div> <p id="p1"> <div> <p id="p2"> <p id="p3"> </div> </div> JavaScript: $('div p').get() Result: ['#p2', '#p3', '#p1'] ---------------------------------- Problem in jQuery.merge = function(a,b) { ... code ... // Second array at start of node List order for ( var k = 0; k < b.length; k++ ) d[k] = b[k]; ... code ... // First array at end of node List order d.push( a[i] ); ... code ... }; So I want to know why it is
[jQuery] Modify javascript function on page
I'd like to use jquery to modify a javascript function that gets loaded with a page. I do not have access to the code of the page to make the change so I'd like to see if jquery can do the following when the page loads: This javascript function gets called when a value in a selection box is selected: function OpenWindow(form ,ctg) { var v = document.getElementById(ctg).selectedIndex; if (v==0) { alert("This is not a valid document.Please select some document
[jQuery] $('').attr('', '') - why no direct method to get/set html attributes?
<!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.2800.1543" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=208181519-03082006>I am confused and feel like I must have missed something - I've read through the jquery docs on the site and can't find the functionality I'm after.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=208181519-03082006></SPAN></FONT> </DIV>
[jQuery] Catching
.handleEvent() has a quiet error handler. Because of this, coding errors in a custom handler are hidden also and difficult to debug. Is there a jQuery mechanism to set a debug mode so quiet handlers can speak freely? function handleEvent(event) { var returnValue = true; event = event || fixEvent(window.event); var handlers = []; for ( var i in this.events[event.type] ) handlers[handlers.length] = this.events[event.type][i]; for ( var i = 0; i < handlers.length; i++ ) { try { if ( handlers[i].constructor
[jQuery] Looking for the following in javascript, anyone seen it.
http://wikipedia.ilse.nl/artikel/Vogelpest i remeber seeing a javascript hat does the above effect, this one is in flash. Anyone know how these things are called or better yet have an idea where to find it Armand _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] $(NodeList) ?
Would it be a welcomed/trivial feature for $ to accept NodeLists of elements and store them as individual elements? Arash Yalpani is trying to find how to speed up $'s selection and I wanted to suggest that he preselect the elements with DOM methods and hand $ a NodeList. Something like: var $divs = $(document.getElementsByTagName('div')); But this gets stored as 1 NodeList, not n DIV elements: alert($divs.size()) // 1 alert($divs.get(0)) // [object NodeList] -- Steve http://mrclay.org/ _______________________________________________
[jQuery] $(NodeList) ?
> Would it be a welcomed/trivial feature for $ to accept NodeLists
[jQuery] possibility complicated color coding question...
Well then. I'll have a test set up with 3 "fake" classes on each item and we'll see how it runs. Thanks everyone. <!----------------//------ andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. andy@icglink.com 615.370.1530 x737 --------------//---------> -----Original Message----- From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]On Behalf Of Klaus Hartl Sent: Friday, August 04, 2006 8:29 AM To: jQuery Discussion. Subject: Re: [jQuery] possibility
[jQuery] possibility complicated color coding question...
I know that you can have two classes on an item, but is it possible to have 3? If you have three styles on an item then that might work. Using jQuery, would that be the correct way to reference an item that had more than one class? Assuming an item like this: <div class="p25 v4 g0">this is my div</div> Could you reference just one style at a time like so: $('.p25').addClass('MyNewStyleClass'); <!----------------//------ andy matthews web developer certified advanced coldfusion programmer ICGLink,
[jQuery] How to speed up JQuery?
--
[jQuery] My thickbox ajax address book
Share my example,If anyone need please contact me http://www.tweosc.org/article/ajax/jquery-thickbox-address-book-example.html -- _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Test suite
> Does the test suite work with SVN 170? When I try to run it in IE or
[jQuery] Test suite
Does the test suite work with SVN 170? When I try to run it in IE or FF I get this output: prereq.html...ok css1.html.....FAILED before any test output arrived css2.html.....FAILED before any test output arrived css3.html.....FAILED before any test output arrived xpath.html....FAILED before any test output arrived custom.html...FAILED before any test output arrived basic.html....FAILED before any test output arrived No script errors reported though. _______________________________________________
[jQuery] SVN Spam
Seems to be a lot of it today. http://proj.jquery.com/dev/bugs/bug/97/ http://proj.jquery.com/dev/bugs/bug/67/ And a few others... _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Plugin aggregation
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=388490714-03082006><FONT face=Arial color=#0000ff size=2>Could you use <A href="http://www.codeplex.com/">http://www.codeplex.com/</A> or <A href="http://www.swik.net">http://www.swik.net</A> ??</FONT></SPAN></DIV> <DIV><SPAN class=388490714-03082006><FONT face=Arial
[jQuery] Looking for the following in javascript, anyone seen it.
I think he's talking about the rotating arms. <!----------------//------ andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. andy@icglink.com 615.370.1530 x737 --------------//---------> -----Original Message----- From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]On Behalf Of DaveG Sent: Thursday, August 03, 2006 10:36 AM To: jQuery Discussion. Subject: Re: [jQuery] Looking for the following in javascript, anyone seen it. Armand Datema
Next Page