[jQuery] Re: handling of click event?

2009-08-22 Thread ak732
Actually this does follow you around everywhere, but it's more like an often changing stray dog than a pet dog. On Aug 22, 1:24 am, Audrey A Lee audrey.lee.is...@gmail.com wrote: I can't expect it to follow me around like a pet dog.

[jQuery] Re: Draggable problem

2009-08-22 Thread ak732
Draggable has an option called 'handle' with which you can specify the element that use used as the drag handle for the draggable. So, something like this... $(#wdw).draggable({handle:$(.title, this)}) ...would make the element w/id wdw draggable, but only by the sub- element w/a classname

[jQuery] Re: event handlers that run after the browser's default action

2009-08-21 Thread ak732
chain. or catch the event later as it bubbles. but i've never heard of attaching a handler to the chain after the browser has done its bit. i was wondering if this was just my ignorance or if it just can't be done that way. On 8/20/09 8:45 PM, ak732 ask...@gmail.com wrote: This is crude

[jQuery] Re: click-event-handler for dynamically created a-elements?

2009-08-20 Thread ak732
You might also want to check go to http://api.jquery.com and check out the live method under Events--Live Events. On Aug 20, 9:43 am, ak732 ask...@gmail.com wrote: There are a lot of ways to do this, here are a couple: $(#div99).append(a id='alnDiv99' href='#'I am in div99/a).click (function

[jQuery] Re: using attr() on html element

2009-08-20 Thread ak732
Try borderStyle instead of border-style and you should be okay. On Aug 19, 10:44 pm, Terry tgs154...@yahoo.com wrote: I'm trying to turn the border for input fields on (or off). In my css I have border-style:none, and I want to turn the border back on if the first input is empty.

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread ak732
Try doing this and see if it works: style type=text/css#msg_div {font-color:red;}/style $.post('save_search.php', formData, function(data) { jsonData = eval('(' + data + ')'); if (jsonData.return_status.search(successful) -1) { $('#msg_div').html(Search was saved); } else {

[jQuery] Re: click-event-handler for dynamically created a-elements?

2009-08-20 Thread ak732
There are a lot of ways to do this, here are a couple: $(#div99).append(a id='alnDiv99' href='#'I am in div99/a).click (function(){alert(hello world);}); $(a/).attr({id:alnDiv99, href:#}).text(I am in div99).click (function(){alert(hello world);}).appendTo(#div99); On Aug 20, 6:42 am, Audrey

[jQuery] Re: Getting form field values

2009-08-20 Thread ak732
You could do it in a loop using each(): $(input[name^='day']).each(function() { if ($(this).is(:checked)) { // do whatever } }); On Aug 19, 5:20 pm, blcArmadillo blackarmadi...@gmail.com wrote: I have a simple set of checkboxes: input name=day1 type=checkbox value=sun / Sun input

[jQuery] Re: Hey ive got a question about a realy basic thing im trying to implement

2009-08-20 Thread ak732
You're not seeing the alert? Did you remember to include the link to the jQuery library on the page first? On Aug 19, 4:17 pm, bmo...@pushthefuture.org bmo...@pushthefuture.org wrote: Hey ive got a question about a realy basic thing im trying to implement on wordpress with Graphpaperpress's

[jQuery] Re: 'Wrapping' some (not just 1 pair) HTML elements in a div?

2009-08-20 Thread ak732
go to: http://api.jquery.com/ and put wrap in the filter box On Aug 20, 10:06 am, ldexterldesign m...@ldexterldesign.co.uk wrote: Yo guys, I need to wrap this chuck of HTML in a div:http://is.gd/2qatX Any thoughts? $(document).ready(function(){         $('div

[jQuery] Re: jQuery internals and exception handling

2009-08-20 Thread ak732
Uh - what I meant was that what I posted *above* (not below) was stupid. The irony is killing me.

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread ak732
Just be aware that doing the ajax call synchronously will block (lock up) the browser until the request/response completes. This is typically okay when running locally, but can be very noticeable when running on slower connections (e.g. shared hosting). There's no reason why you cannot do this

[jQuery] Re: 'Wrapping' some (not just 1 pair) HTML elements in a div?

2009-08-20 Thread ak732
=scrollablePost/ div');         }); :| Thanks, L On Aug 20, 3:36 pm, ak732 ask...@gmail.com wrote: go to:http://api.jquery.com/andput wrap in the filter box On Aug 20, 10:06 am, ldexterldesign m...@ldexterldesign.co.uk wrote: Yo guys, I need to wrap this chuck of HTML in a div:http

[jQuery] Re: jQuery internals and exception handling

2009-08-20 Thread ak732
I now see that jQuery has an error event handler. So a lot of what I posted below is, well, just stupid. However in some quick testing, there appear to be some problems with the error event. It's not working the same way for IE7 and FF3.5x. Some differences: The jQuery docs indicate that the

[jQuery] Re: jQuery internals and exception handling

2009-08-20 Thread ak732
I decided to wrap this up as a plugin and see what happens. The code is here: http://pastebin.com/f579d999d It works, sort of. But there are some strange side-effects. I should point out that I'm using jQuery 1.2.6 because our app (lots of code at this point) is incompatible with 1.3.x in

[jQuery] Re: event handlers that run after the browser's default action

2009-08-20 Thread ak732
This is crude, but might work for you... $(#someId).click()(function() { set_timeout(function() { // stuff to be done 2ms from now }, 2); }); You might have to play with the set_timeout delay a bit, 2ms might be too short. On Aug 20, 3:47 pm, Tom Worster f...@thefsb.org wrote: is

[jQuery] Re: Is this sytax legitimate?

2009-08-19 Thread ak732
The syntax looks okay. Are you using Firebug to verify that #favorites (which appears to be a mysterious li somewhere) is actually being loaded as you expect? Does it actually contain the li tags you show above? Also, you might want to eliminate #favorites altogether by taking a page from

[jQuery] Re: Is this sytax legitimate?

2009-08-19 Thread ak732
Actually, this would be better I think: $(.menu1).append($(div/).load(favoritesHTML).html()); The idea being to consruct a temp placeholder for your loaded html that goes away after. On Aug 19, 4:18 pm, ak732 ask...@gmail.com wrote: The syntax looks okay. Are you using Firebug to verify

[jQuery] jQuery internals and exception handling

2009-08-19 Thread ak732
Couple questions for the jQuery internals-aware folks. This is a bit long, sorry for that. I'm working on beefing up error handling in a web application. I want to ensure that I'm catching all exceptions and handling them via my own UI system. The window.onerror function is part of the

[jQuery] Re: IE click event handling problem

2009-08-05 Thread ak732
@Ricardo: I've cleaned up my code as you recommend. Thanks for the tips. Andy On Aug 4, 6:06 pm, Ricardo ricardob...@gmail.com wrote: You could use a opacity of 0, it's not that ugly of a hack. And you could use this simple logic instead of ifs and is()'s: var cb = this; //checkbox

[jQuery] IE click event handling problem

2009-08-04 Thread ak732
I'm working on a small plugin that extends a checkbox to behave as if it has 3 states. Basically it just adds an anchor above the underlying checkbox, intercepts mouse clicks, and cycles the checkbox between: disabled + unchecked enabled + unchecked enabled + checked It works fine in

[jQuery] Re: IE click event handling problem

2009-08-04 Thread ak732
Thanks elubin. Actually, I had already tried that. I set z-indexes for the parent, the checkbox and the anchor overlaying the checkbox (actually, you can see some remaining, commented out code from when I tried it). Anyway, z-index tweaks didn't appear to fix the problem. I just now tried

[jQuery] Re: IE click event handling problem

2009-08-04 Thread ak732
So, although it's an ugly hack, I'm working around the issue by setting the background of the overlay element to #fefefe and giving the element an opacity of 0.01. Which works. On Aug 4, 2:12 pm, ak732 ask...@gmail.com wrote: Thanks elubin.  Actually, I had already tried that.  I set z-indexes

[jQuery] Re: jQuery Conference for 2009?

2009-06-18 Thread ak732
, 2009, at 11:09 AM, MorningZ wrote: There wasn't much chatter on the jQuery day here on the group last year either (yet it was packed!) So i wouldn't gauge interest in it by this mailing list  :-) On Jun 16, 10:41 am, ak732 ask...@gmail.com wrote: So... is there no interest

[jQuery] Re: jQuery Conference for 2009?

2009-06-16 Thread ak732
So... is there no interest in a jQuery conference up in Boston this year? Incidentally, this entire post doesn't show up when searching through the group posts. I searched on conference, on Boston and on Guinness without pulling up this topic. Weird.

[jQuery] Re: jQuery Conference for 2009?

2009-06-13 Thread ak732
Hopefully it's up in Boston again, either right before/after AJAX Experience. Makes things simple. And it's Boston, you know; lots of Irish bars serving Guinness on tap. jQuery/AJAX/Guinness, could there be a happier place?

[jQuery] jQuery Conference for 2009?

2009-06-12 Thread ak732
Any word on the much-anticipated jQuery conference 2009?

[jQuery] Re: Superfish

2008-08-21 Thread ak732
You're welcome. Perhaps, when you tried it before, you forgot to add the relative positioning. Without that, in IE at least, the z-index won't be respected. On Aug 21, 4:31 am, felix [EMAIL PROTECTED] wrote: Thank you very much... I tried this with another script, but at this point i didn't

[jQuery] Re: Moving an Element

2008-08-21 Thread ak732
Seems like it should work. Also, if I understand the remove docs, you should be able to do this, without the tmp variable: $('#target').append($('#source').remove()); Because, apparently, source will be removed from the DOM, but not from the jQuery object. On Aug 21, 2:09 am, Stefan Sturm

[jQuery] Re: Understanding JSON

2008-08-20 Thread ak732
How would I use jQuery to write the values onto a page?  And how do you go the other way, taking values and serializing them into JSON to be sent to the server? For serializing, on the javascript side, between objects and JSON, you can use this public domain library: http://json.org/json2.js.

[jQuery] Re: calculate width of images in specific div

2008-08-20 Thread ak732
untested, but something like this should work var w = 0; var d = $(#divId); $('img', d).each(function(i) { w += parseInt($(this).attr('width')); }

[jQuery] Re: Understanding JSON

2008-08-20 Thread ak732
What you're describing is more of a general AJAX thing. JSON is just an optional part of the whole AJAX mechanism. It's the data *format*, not the page update architecture. You could use XML or grow your own data format and still be updating only portions of the page, on demand, as opposed to

[jQuery] Re: $.ajax() timeout

2008-08-20 Thread ak732
The timeout is the time to wait for a server response before the code decides to just throw an

[jQuery] finding table row from inside td

2008-08-20 Thread ak732
If I have a table: table tbody trtdspan/span/td/*many more cells here*//tr trtdspan/span/td/*many more cells here*//tr // many more rows here... tbody /table And I'm handed a reference to a span inside one of the table cells, what's the quickest method

[jQuery] moderation

2008-08-20 Thread ak732
powers-that-be: It's a good thing that this group is moderated. But I was wondering how many messages I need to post before I get unmoderated? It's kind of a drag to respond to a thread and find that by the time the response becomes visible, the response has become obsolete. Also, does being

[jQuery] Re: finding table row from inside td

2008-08-20 Thread ak732
Thanks, Karl.

[jQuery] Re: moderation

2008-08-20 Thread ak732
Karl, I do appreciate the work you guys are doing to keep the spammers out. Thanks for unmoderating me. Andy I've bumped you out of the moderated list, so your posts should be   able to appear immediately now, or at least as quickly as Google   messages ever appear. --Karl

[jQuery] Re: Superfish

2008-08-20 Thread ak732
Try adding position:relative and z-index:1 to your top_menu css.

[jQuery] event handler mystery

2008-08-18 Thread ak732
Hi. I'm relatively new to javascript in general, and to jQuery. And this question may be more of a general javascript question, than a jQuery question. Not sure. I have an event handler for a click event that looks like this: // this code works...