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 class
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 wrote:
> I can't expect it to follow me around like a pet dog.
he beginning of the event propagation
> 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.
>
>
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 wrote:
> is there a way to se
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
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 e
rap,
> essentially, a blog post, so:
>
> $(document).ready(function(){
> $('h2').wrap('');
> }); // would be fine
>
> ...but try doing this:
>
> $(document).ready(function(){
> $('... class="postmetadata">
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 a
Uh - what I meant was that what I posted *above* (not below) was
stupid. The irony is killing me.
go to: http://api.jquery.com/ and put "wrap" in the filter box
On Aug 20, 10:06 am, ldexterldesign wrote:
> Yo guys,
>
> I need to wrap this chuck of HTML in a :http://is.gd/2qatX
>
> Any thoughts?
>
> $(document).ready(function(){
> $('').insertBefore('.page-id-9 h2');
> $('').i
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 wrote:
> I have a simple set of checkboxes:
>
> Sun name="day2" type="checkbox" value="mon" /> Mon type="checkbox" va
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"
wrote:
> Hey ive got a question about a realy basic thing im trying to
> implement on wordpress with Graphpaperpress's Modularity theme.
>
>
There are a lot of ways to do this, here are a couple:
$("#div99").append("I am in div99").click
(function(){alert("hello world");});
$("").attr({id:"alnDiv99", href:"#"}).text("I am in div99").click
(function(){alert("hello world");}).appendTo("#div99");
On Aug 20, 6:42 am, Audrey A Lee wrot
Try doing this and see if it works:
#msg_div {font-color:red;}
$.post('save_search.php', formData, function(data) {
jsonData = eval('(' + data + ')');
if (jsonData.return_status.search("successful") > -1) {
$('#msg_div').html("Search was saved");
} else {
$('#msg_div').html("Search
Try "borderStyle" instead of "border-style" and you should be okay.
On Aug 19, 10:44 pm, Terry 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.
>
> $("input[type='te
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 wrote:
> There are a lot of ways to do this, here are a couple:
>
> $("#div99").append("I am in div99&quo
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 solutio
Actually, this would be better I think:
$(".menu1").append($("").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 wrote:
> The syntax looks okay.
>
> Are you using Fire
The syntax looks okay.
Are you using Firebug to verify that #favorites (which appears to be a
mysterious somewhere) is actually being loaded as you expect?
Does it actually contain the tags you show above?
Also, you might want to eliminate #favorites altogether by taking a
page from jQuery's l
@Ricardo:
I've cleaned up my code as you recommend. Thanks for the tips.
Andy
On Aug 4, 6:06 pm, Ricardo 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
> .click(function(){
>
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 wrote:
> Thanks elubin. Actually, I had already tried that. I set z-inde
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 sett
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 F
glishrules.comwww.learningjquery.com
>
> On Jun 16, 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 t
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.
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?
Any word on the much-anticipated jQuery conference 2009?
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"
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
Try adding "position:relative" and "z-index:1" to your top_menu css.
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
Thanks, Karl.
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 u
If I have a table:
/*many more cells here*/
/*many more cells here*/
// many more rows here...
And I'm handed a reference to a inside one of the table cells,
what's the quickest method to obtain the row that contains the span?
Is this as fast as it
The timeout is the time to wait for a server response before the code
decides to just throw an
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 d
untested, but something like this should work
var w = 0;
var d = $(#divId);
$('img', d).each(function(i) {
w += parseInt($(this).attr('width'));
}
> 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.j
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...
jInventoryView.prototype.rowDetailClick
39 matches
Mail list logo