[jQuery] jQuery and XML revisited (tutorial)

2007-09-24 Thread Giant Jam Sandwich

This is a tutorial I posted this evening. I thought I might throw it
up here in case anyone was interested.

http://blog.reindel.com/2007/09/24/jquery-and-xml-revisited/

Brian Reindel
d'bug @ blog.reindel.com



[jQuery] Re: jQuery for Floating Div

2007-09-24 Thread Karl Swedberg

On Sep 24, 2007, at 8:45 PM, Glen Lipka wrote:

Sorry Karl.  I just grabbed the one that came up first in google. :)
Yeah, that amazon effect is really useful.


Hey, not a problem, Glen. :-)

I tried to do that with Intuit, but couldn't figure it out, so I  
ended up with the slideLinks instead.

These did very well in usability studies.  Unexpected wow.
http://www.commadot.com/jquery/slideMenu.php  (click links at top)


Yeah, I always liked that sliding quick links thing you did for  
Intuit. Very slick.



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com





Pete, even though its not what you asked for, it might be a good  
choice.


Glen

On 9/24/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
Hey Glen,

That's actually a pretty old version of the plugin. A new(er) and  
improved version can be found here:


http://plugins.learningjquery.com/cluetip/demo/

Pete,
Check out that URL above and click on the Examples link at the top  
of the page. Then hover over the link that says "sort of like  
amazon.com?" under the "Custom (temporary)" section. Maybe that's  
something close to what you're looking for?


One of these days when I'm not swamped with freelance work, I'd  
like to write a stripped-down plugin that just does that amazon.com  
thing. A bunch of people have already asked for it.


Cheers,

--Karl

On Sep 24, 2007, at 6:36 PM, Glen Lipka wrote:

That's a nice effect.  I have been trying to do something like  
that too.  Microsoft does a very similar thing.

Some helpful plugins to check out:
1. Hoverintent.  Slows down the interaction to make sure the user  
intended to mouseover.http://cherne.net/brian/resources/ 
jquery.hoverIntent.html
2. ClueTip.  Shows one example of popup hovers like that. http:// 
examples.learningjquery.com/62/demo/


There may be other plugins that help.  I am interested in this if  
you nail it.


Glen


On 9/24/07, Pete < [EMAIL PROTECTED]> wrote:

Hi all,

I'm trying to construct a "popover" menu that resembles the one on
Amazon.com (put your mouse over "see all 43 product categories"). I'm
not too familiar with jQuery/JavaScript, but I thought I would be  
able

to do something like this:

$(document).ready(function(){
$("#link").mouseover(function(){
$("#popup_menu").show();
return false;
});
$("#popup_menu").mouseout(function(){
$(this).hide();
return false;
});
});

The problem is, as soon as you move your mouse off the link to go  
into

the div, it collapses. Could someone please offer some examples/
insight?

If you'd like to see the page, here's a link: http://www.keuka.edu/ 
pete/jquery_float.html


Thanks!









[jQuery] Re: jQuery for Floating Div

2007-09-24 Thread Glen Lipka
Sorry Karl.  I just grabbed the one that came up first in google. :)
Yeah, that amazon effect is really useful.

I tried to do that with Intuit, but couldn't figure it out, so I ended up
with the slideLinks instead.
These did very well in usability studies.  Unexpected wow.
http://www.commadot.com/jquery/slideMenu.php  (click links at top)

Pete, even though its not what you asked for, it might be a good choice.

Glen

On 9/24/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> Hey Glen,
>
> That's actually a pretty old version of the plugin. A new(er) and improved
> version can be found here:
>
> http://plugins.learningjquery.com/cluetip/demo/
>
> Pete,
> Check out that URL above and click on the Examples link at the top of the
> page. Then hover over the link that says "sort of like amazon.com?" under
> the "Custom (temporary)" section. Maybe that's something close to what
> you're looking for?
>
> One of these days when I'm not swamped with freelance work, I'd like to
> write a stripped-down plugin that just does that amazon.com thing. A bunch
> of people have already asked for it.
>
> Cheers,
>
> --Karl
>
> On Sep 24, 2007, at 6:36 PM, Glen Lipka wrote:
>
> That's a nice effect.  I have been trying to do something like that too.
> Microsoft does a very similar thing.
> Some helpful plugins to check out:
> 1. Hoverintent.  Slows down the interaction to make sure the user intended
> to mouseover.http://cherne.net/brian/resources/jquery.hoverIntent.html
> 2. ClueTip.  Shows one example of popup hovers like that. 
> http://examples.learningjquery.com/62/demo/
>
>
> There may be other plugins that help.  I am interested in this if you nail
> it.
>
> Glen
>
>
> On 9/24/07, Pete < [EMAIL PROTECTED]> wrote:
> >
> >
> > Hi all,
> >
> > I'm trying to construct a "popover" menu that resembles the one on
> > Amazon.com (put your mouse over "see all 43 product categories"). I'm
> > not too familiar with jQuery/JavaScript, but I thought I would be able
> > to do something like this:
> >
> > $(document).ready(function(){
> > $("#link").mouseover(function(){
> > $("#popup_menu").show();
> > return false;
> > });
> > $("#popup_menu").mouseout(function(){
> > $(this).hide();
> > return false;
> > });
> > });
> >
> > The problem is, as soon as you move your mouse off the link to go into
> > the div, it collapses. Could someone please offer some examples/
> > insight?
> >
> > If you'd like to see the page, here's a link: 
> > http://www.keuka.edu/pete/jquery_float.html
> >
> >
> > Thanks!
> >
> >
>
>


[jQuery] Re: an "Undo" plugin, or something as such. :-)

2007-09-24 Thread Michael Geary

OK, here is the client-side undo plugin demo that I mentioned earlier:

http://mg.to/znc/colortuner.html

This is the color tuner from the Zvents Network Calendar wizard. Normally you 
would get to the color tuner by going to a venue page
or your MyZvents page on www.zvents.com and then clicking "get this calendar 
for your website". This test page is a static version
of the calendar, using the featured events from www.boston.com.

To try it out, click in the Farbtastic color picker to change the entire theme, 
or click in one of the color patches below that to
choose a specific part of the theme and use the color picker to change that 
only. Or use the Customize... link to show all of the
individual color choices and change any of them. Then try the Undo and Redo 
buttons to move back and forth between your color
settings.

The undo plugin is the first thing in this file:

http://mg.to/znc/colortuner.js

And the same file includes the multi-color picker code that uses this plugin. 
Search the file for "undo" and you'll find all the
relevant code.

I'll tidy up the undo code to make a nice plugin release out of it, but there 
it is in case anyone wants to take a look at it now.
I'd be interested in any feedback on the issues I mentioned in my previous 
message. (I'd mentioned saving the undo/redo queue in a
hidden form field so it survives a soft reload, but now that I look at the 
code, it doesn't do that. Must have been something I was
thinking about doing. The code actually should work with either strings or 
objects or any type as the undo queue entries.)

I also plan to release the multi-color picker as a plugin, but that code not 
really ready for prime time. If anyone is curious about
it, it uses this file to define the color patches and their relationships:

http://mg.to/znc/tweaks.js

-Mike



[jQuery] Re: jQuery 1.2 seems to break the Treeview plugin

2007-09-24 Thread [EMAIL PROTECTED]

Hi,
I'm OLEO.nice to meet you.
I also meet this problem when I use JQuery1.2
finally I modifid jquery.treeview.js
from   $("li[ul]", this)   to  $("li:has(ul)", this) and then it works
well

good luck


On Sep 13, 12:07 am, Alex <[EMAIL PROTECTED]> wrote:
> I've got a page that is a massive treeview, and when loading jQuery
> 1.2 min&gzipped, the Treeview plugin seems to stop working. No errors
> reported in Firebug, and I can't see deprecated functionality in the
> plugin.
>
> Original page with 1.1.4.1:  
> http://deadguy.reliccommunity.com/treeview_1.1.4.1.html
>
> New page with 1.2 min/gzip:  
> http://deadguy.reliccommunity.com/treeview_1.2.html
>
> Any ideas?



[jQuery] Re: Metadata plugin performance issues

2007-09-24 Thread voltron

Oh! I skipped that, thanks!

On Sep 24, 7:51 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> voltron schrieb:> Would there be an official bug fix sometime? I am using it 
> with
> > validation plugin
>
> As mentioned in the previous post: I already fixed that.
>
> -- Jörn



[jQuery] Re: jQuery for Floating Div

2007-09-24 Thread Karl Swedberg

Hey Glen,

That's actually a pretty old version of the plugin. A new(er) and  
improved version can be found here:


http://plugins.learningjquery.com/cluetip/demo/

Pete,
Check out that URL above and click on the Examples link at the top of  
the page. Then hover over the link that says "sort of like  
amazon.com?" under the "Custom (temporary)" section. Maybe that's  
something close to what you're looking for?


One of these days when I'm not swamped with freelance work, I'd like  
to write a stripped-down plugin that just does that amazon.com thing.  
A bunch of people have already asked for it.


Cheers,

--Karl

On Sep 24, 2007, at 6:36 PM, Glen Lipka wrote:

That's a nice effect.  I have been trying to do something like that  
too.  Microsoft does a very similar thing.

Some helpful plugins to check out:
1. Hoverintent.  Slows down the interaction to make sure the user  
intended to mouseover.http://cherne.net/brian/resources/ 
jquery.hoverIntent.html
2. ClueTip.  Shows one example of popup hovers like that. http:// 
examples.learningjquery.com/62/demo/


There may be other plugins that help.  I am interested in this if  
you nail it.


Glen


On 9/24/07, Pete < [EMAIL PROTECTED]> wrote:

Hi all,

I'm trying to construct a "popover" menu that resembles the one on
Amazon.com (put your mouse over "see all 43 product categories"). I'm
not too familiar with jQuery/JavaScript, but I thought I would be able
to do something like this:

$(document).ready(function(){
$("#link").mouseover(function(){
$("#popup_menu").show();
return false;
});
$("#popup_menu").mouseout(function(){
$(this).hide();
return false;
});
});

The problem is, as soon as you move your mouse off the link to go into
the div, it collapses. Could someone please offer some examples/
insight?

If you'd like to see the page, here's a link: http://www.keuka.edu/ 
pete/jquery_float.html


Thanks!






[jQuery] toggle and checkbox

2007-09-24 Thread sheetzam

Using jquery 1.2.1 toggle:

jQuery().ready(function(){
$('#multiple').toggle(
function(){
$('.afield').attr('disabled',true);
},
function(){
$('.afield').removeAttr('disabled');
}
);
});

I'm trying to toggle the disabled attribute of some text input boxes
based on a checkbox input:


 The Toggle
 


However, when the checkbox is clicked, the check does not appear.
Fails in IE and Firefox.

I've tried adding code to check the box, but that fails as well.
jQuery().ready(function(){
$('#multiple').toggle(
function(){
$('#multiple').attr('checked',true);
$('.afield').attr('disabled',true);
},
function(){
$('#same').removeAttr('checked');
$('.afield').removeAttr('disabled');
}
);
});

What's the best way to accomplish disabling text inputs with a
checkbox?  Am I overthinking this?

Any help would sure be appreciated.



[jQuery] Re: .replaceWith() broken in Firefox 2 I think

2007-09-24 Thread Steve Finkelstein

John,

Well figures .. it is my code. .html() certainly does the trick. I
wasn't aware that replaceWith removes stuff from the DOM indefinitely.

A, thanks for saving me from hours of troubleshooting. I really
really appreciate it.

- sf

On 9/24/07, John Resig <[EMAIL PROTECTED]> wrote:
>
> Are you meaning to do .html(..) instead of replaceWith? replaceWith
> completely removes the element (which means that when it's called the
> second time, nothing happens, since the element no longer exists).
>
>  Whereas .html() simply replaces the contents of the element.
>
> --John
>
> On 9/24/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> >
> > This is actually happening in IE7 also. Is it possible that something
> > is hosed with my code? I'm more confident it's that than a broken
> > replaceWith() but I'd really like to know why it only works once, and
> > then I need a page refresh for that "ajax" effect.
> >
> > - sf
> >
> > On 9/24/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > >
> > > So I have a simple script which essentially uses .replaceWith() to
> > > replace the containing elements HTML with a success callback. This
> > > works fine the first time I invoke a function which calls
> > > .replaceWith() in the success call back, but any subsequent calls
> > > leaves the DOM unmodified.
> > >
> > > Here's an example screenshot of what my page looks like upon a random 
> > > page load.
> > >
> > > http://catalyst.httpd.org/tmp/1.png
> > >
> > > Ok so I have 4 notes. Let's delete one:
> > >
> > > http://catalyst.httpd.org/tmp/2.png
> > >
> > > Perfect, it's gone:
> > >
> > > http://catalyst.httpd.org/tmp/3.png
> > >
> > > Here's where the problem occurs... Let's delete another
> > >
> > > http://catalyst.httpd.org/tmp/4.png
> > >
> > > Hmmm, it didn't disappear from the DOM this time:
> > >
> > > http://catalyst.httpd.org/tmp/5.png
> > >
> > > The OB/GYN note is still there as rendered by the browser, however the
> > > server-side script surely wiped it:
> > >
> > > mysql> select id,name from ms_notes where id="CN";
> > > Empty set (0.00 sec)
> > >
> > > Here's what my code looks like to remove the note:
> > >
> > > function removeNote(id,name) {
> > > if(confirm("Are you sure you wish to delete: "+name+"?")) {
> > > // ajax code here to remove note.
> > > $.ajax({
> > >   url: "/dbserver.php",
> > >   type: "POST",
> > >   data: "delete="+id,
> > >   cache: false,
> > >   success: function(html) {
> > > $("#alpha_notes").empty();
> > > $("#alpha_notes").replaceWith(html);
> > >   }
> > > });
> > > }
> > > }
> > >
> > > Very important thing to factor in, is if I do a hard refresh on the
> > > page, here are the results... a missing OB/GYN note, which is the way
> > > it should be:
> > >
> > > http://catalyst.httpd.org/tmp/6.png
> > >
> > > Any idea folks? Would really appreciate any help. Firebug also shows
> > > that in its response to my POST call that the notes are not there in
> > > its table rendering. My server-side code looks like this:
> > >
> > > if($_POST['delete']) {
> > > global $db_alpha, $link;
> > > $alpha_note_set = array();
> > > $db = mysql_select_db($db_alpha, $link);
> > > if(!$db) {
> > > die("Can't connect to alpha, please contact steve.");
> > > }
> > >
> > > $sql = "DELETE from ms_notes
> > > WHERE ID='".$_POST['delete']
> > > ."' LIMIT 1";
> > > $result='';
> > > $result = mysql_query("$sql");
> > > if(!$result) { die("Something is broken... "); }
> > >
> > > $sql = "SELECT NAME,ID from ms_notes";
> > > $alpha_result_set = @mysql_query("$sql");
> > > $row='';
> > > if(mysql_num_rows($alpha_result_set)==0) { $html = "There are zero
> > > notes left to process in Alpha's database"; echo $html; exit; }
> > > while($row = @mysql_fetch_array($alpha_result_set, MYSQL_ASSOC)) {
> > > $alpha_note_set[] = $row; }
> > > $html='';
> > > $html = '';
> > > $html .= '';
> > > // count here basically just keeps track of a
> > > // neatly aligned table
> > > $count=0;
> > > foreach($alpha_note_set as $note) {
> > > $html .= " > > onclick=\"removeNote('".$note[ID]."','".$note[NAME]."')\">delete  $note[NAME]";
> > > $count++;
> > > if(($count % 2 == 0)) {
> > > $html .= "";
> > > }
> > > }
> > > $html .= '';
> > >
> > > // send this sucker back to the view.
> > > echo $html;
> > > }
> > >
> > > Thanks all.
> > >
> > > - sf
> > >
> >
>


[jQuery] ajax history woes iframe or fragment

2007-09-24 Thread [EMAIL PROTECTED]

I am currently working on a site/application that is ajax driven. As
it stands right now it works properly, and degrades properly as well.
One issue I am having is history. I tried klaus's history plugin, and
it works great except one small problem, several of my links that are
loaded by the the ajax call. It is a little confusing, so hopfully a
tree diagram helps :s

#home --always in dom
#forum --always in dom
#Topic1 --only inserted into dom via ajax, same with the following
forum links
#thread1
#post1
#thread2
#Topic2
#downloads --always in dom

So in short, a user clicks #forums, the topics are displayed. A user
clicks #topic1, all the threads are displayed. A user clicks #thread1,
and so on. So when a user is in the #thread1, they click back the url
changes to #Topic1, but the content doesnt change, they click back
again the url changes to #forum, and the inner content does change to
show all the topics. I am assuming that this happens because the
#forum link is in the dom, and has a proper href to follow.

So I was thinking some type of iframe history would do the trick,
after some searching, there isnt a plugin for jquery that does this
specifically for all browsers. But I did find this
http://www.dhtmlnirvana.com/program/permalink/ajax_history.html

Now I believe I have all my ducks in a row. I have a div that is
hidden, and one that is not. I am using the same iframe to pull data
through, so it has the same name and id. For my ajax call I am
retrieving that iframe, with the src pointing to my desired page. The
 tags have the target attribute set to the id of the iframe. The
hidden div which is suppose to be updated with the iframe via a ajax
call is, but since the  has the target set to the iframe id it
should push the data to the displayed div, with the same iframe. But
it is not. I really dont have an idea of why this isnt working. Im
guessing it has something to do with how jquery is inserting the html
into the dom, but im not to sure.

So really my question is, which method is best for the application I
am making, and if anybody has tips on how to get either of the two to
work properly, or if there is better method which I havnt found.

Another thing that is confusing me is that this isnt a bigger issue I
mean with the popularity of ajax driving web applications, and the
fact that a lot of links could possibly be nested similar to my
structure, yet I havnt been able to find a elegant solution. Either
that or I am looking at this the wrong way and making it harder then
it has to be.

If you need more information, let me know so I can get this figured
out as soon as possible, I know there is a few other people with a
similar situation, as I've seen this ased on the irc chan a few times,
maybe not as long or detailed tho ;)

Cheers
Des



[jQuery] Re: Checkbox "checked" event

2007-09-24 Thread Josh Nathanson


If you're talking about capturing the event when a checkbox is checked, then 
"click" is correct.


$("#mycheckboxid").click(function() {
dostuff;
});


- Original Message - 
From: "voltron" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Monday, September 24, 2007 2:04 PM
Subject: [jQuery] Checkbox "checked" event




How do I detect if a checkbox is checked by a user? change or click
would be wrong.

Thanks





[jQuery] Help on Post with Callback

2007-09-24 Thread [EMAIL PROTECTED]

I have the following code that works except for the callback part of
it is not doing exactly what I want. Right now it reloads the test.php
page instead of using the same instance of it inputing the variables.
How do I properly update the currentposition div?


$(document).ready(function(){
$("form#positionform").submit(function(){
 $.post("test.php",{ positiontitle: $("#positiontitle").val(),
staffid: $("#staffid").val() }),
 $("#currentposition").load("test.php");
 return false;
});
});




[jQuery] Re: .replaceWith() broken in Firefox 2 I think

2007-09-24 Thread John Resig

Are you meaning to do .html(..) instead of replaceWith? replaceWith
completely removes the element (which means that when it's called the
second time, nothing happens, since the element no longer exists).

 Whereas .html() simply replaces the contents of the element.

--John

On 9/24/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
>
> This is actually happening in IE7 also. Is it possible that something
> is hosed with my code? I'm more confident it's that than a broken
> replaceWith() but I'd really like to know why it only works once, and
> then I need a page refresh for that "ajax" effect.
>
> - sf
>
> On 9/24/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > So I have a simple script which essentially uses .replaceWith() to
> > replace the containing elements HTML with a success callback. This
> > works fine the first time I invoke a function which calls
> > .replaceWith() in the success call back, but any subsequent calls
> > leaves the DOM unmodified.
> >
> > Here's an example screenshot of what my page looks like upon a random page 
> > load.
> >
> > http://catalyst.httpd.org/tmp/1.png
> >
> > Ok so I have 4 notes. Let's delete one:
> >
> > http://catalyst.httpd.org/tmp/2.png
> >
> > Perfect, it's gone:
> >
> > http://catalyst.httpd.org/tmp/3.png
> >
> > Here's where the problem occurs... Let's delete another
> >
> > http://catalyst.httpd.org/tmp/4.png
> >
> > Hmmm, it didn't disappear from the DOM this time:
> >
> > http://catalyst.httpd.org/tmp/5.png
> >
> > The OB/GYN note is still there as rendered by the browser, however the
> > server-side script surely wiped it:
> >
> > mysql> select id,name from ms_notes where id="CN";
> > Empty set (0.00 sec)
> >
> > Here's what my code looks like to remove the note:
> >
> > function removeNote(id,name) {
> > if(confirm("Are you sure you wish to delete: "+name+"?")) {
> > // ajax code here to remove note.
> > $.ajax({
> >   url: "/dbserver.php",
> >   type: "POST",
> >   data: "delete="+id,
> >   cache: false,
> >   success: function(html) {
> > $("#alpha_notes").empty();
> > $("#alpha_notes").replaceWith(html);
> >   }
> > });
> > }
> > }
> >
> > Very important thing to factor in, is if I do a hard refresh on the
> > page, here are the results... a missing OB/GYN note, which is the way
> > it should be:
> >
> > http://catalyst.httpd.org/tmp/6.png
> >
> > Any idea folks? Would really appreciate any help. Firebug also shows
> > that in its response to my POST call that the notes are not there in
> > its table rendering. My server-side code looks like this:
> >
> > if($_POST['delete']) {
> > global $db_alpha, $link;
> > $alpha_note_set = array();
> > $db = mysql_select_db($db_alpha, $link);
> > if(!$db) {
> > die("Can't connect to alpha, please contact steve.");
> > }
> >
> > $sql = "DELETE from ms_notes
> > WHERE ID='".$_POST['delete']
> > ."' LIMIT 1";
> > $result='';
> > $result = mysql_query("$sql");
> > if(!$result) { die("Something is broken... "); }
> >
> > $sql = "SELECT NAME,ID from ms_notes";
> > $alpha_result_set = @mysql_query("$sql");
> > $row='';
> > if(mysql_num_rows($alpha_result_set)==0) { $html = "There are zero
> > notes left to process in Alpha's database"; echo $html; exit; }
> > while($row = @mysql_fetch_array($alpha_result_set, MYSQL_ASSOC)) {
> > $alpha_note_set[] = $row; }
> > $html='';
> > $html = '';
> > $html .= '';
> > // count here basically just keeps track of a
> > // neatly aligned table
> > $count=0;
> > foreach($alpha_note_set as $note) {
> > $html .= " > onclick=\"removeNote('".$note[ID]."','".$note[NAME]."')\">delete  $note[NAME]";
> > $count++;
> > if(($count % 2 == 0)) {
> > $html .= "";
> > }
> > }
> > $html .= '';
> >
> > // send this sucker back to the view.
> > echo $html;
> > }
> >
> > Thanks all.
> >
> > - sf
> >
>


[jQuery] Re: .click() not working in ie6... 'g' is null or not an object

2007-09-24 Thread Erik Beeson
hover expects 2 functions, so getting an error isn't surprising.

After a cursory look at your code, one thing that jumps out is I suggest you
don't do $('div#wrap').attr('class') == "xlarge". Instead, do:
$('div#wrap').is(".xlarge").

Other than that, maybe verify that your selector is working right in IE6.
Maybe try doing alert($('div#utility p.resize span.increase').length) to
make sure the element that you're looking for is being found.

Hope it helps.

--Erik

On 9/24/07, AnalogPanda <[EMAIL PROTECTED]> wrote:
>
>
>
> I hope this isn't a double post... This is kind of an awkward problem to
> search on
>
> Perhaps the root of my problem is the custom function I've written, but
> I've
> set up an "increase/decrease text size" function on a site and it's not
> working in ie6 (works fine on XP in ff2, ie7, Opera9, and Safari3)
>
> IE6 or FF does not report an error unless I change .click() to .hover()
> in which case, the errors are:
> IE6: 'g' is null or not an object
> FF2/fireBug: g has no properties
> (I'm using jquery 1.2.1 packed)
>
> Here's the code:
> JS:
>
> $(document).ready(function() {
> $('div#utility p.resize span.increase').click(function() {
> if($('div#wrap').attr('class') == "default") {
> $('div#wrap').removeClass("default");
> $('div#wrap').addClass("medium");
> }
> else if($('div#wrap').attr('class') == "medium") {
> $('div#wrap').removeClass("medium");
> $('div#wrap').addClass("large");
> }
> else if($('div#wrap').attr('class') == "large") {
> $('div#wrap').removeClass("large");
> $('div#wrap').addClass("xlarge");
> }
> });
> });
>
> $(document).ready(function() {
> $('div#utility p.resize span.decrease').click(function() {
> if($('div#wrap').attr('class') == "xlarge") {
> $('div#wrap').removeClass("xlarge");
> $('div#wrap').addClass("large");
> }
> else if($('div#wrap').attr('class') == "large") {
> $('div#wrap').removeClass("large");
> $('div#wrap').addClass("medium");
> }
> else if($('div#wrap').attr('class') == "medium") {
> $('div#wrap').removeClass("medium");
> $('div#wrap').addClass("default");
> }
> });
> });
>
>
> HTML:
> 
> 
> 
> 
> You are on the Start
> Page
> High Contrast
> Version
> Increase or decrease the text
> size:  class="increase" title="Increase text size">+  class="decrease" title="Decrease text size">-
> 
>
>
> ...The JS just changes the class on #wrap, and then the css takes care of
> the text resizing
>
> I'm not too hot at JavaScript, and I don't know jQuery front to back, so
> I'm
> sure I'm probably doing something wrong...
>
> any help is appreciated - and let me know if I need to post more code...
> Thanks!
> --
> View this message in context:
> http://www.nabble.com/.click%28%29-not-working-in-ie6...-%27g%27-is-null-or-not-an-object-tf4488718s15494.html#a12801113
> Sent from the JQuery mailing list archive at Nabble.com.
>
>


[jQuery] Re: .replaceWith() broken in Firefox 2 I think

2007-09-24 Thread Steve Finkelstein

This is actually happening in IE7 also. Is it possible that something
is hosed with my code? I'm more confident it's that than a broken
replaceWith() but I'd really like to know why it only works once, and
then I need a page refresh for that "ajax" effect.

- sf

On 9/24/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> So I have a simple script which essentially uses .replaceWith() to
> replace the containing elements HTML with a success callback. This
> works fine the first time I invoke a function which calls
> .replaceWith() in the success call back, but any subsequent calls
> leaves the DOM unmodified.
>
> Here's an example screenshot of what my page looks like upon a random page 
> load.
>
> http://catalyst.httpd.org/tmp/1.png
>
> Ok so I have 4 notes. Let's delete one:
>
> http://catalyst.httpd.org/tmp/2.png
>
> Perfect, it's gone:
>
> http://catalyst.httpd.org/tmp/3.png
>
> Here's where the problem occurs... Let's delete another
>
> http://catalyst.httpd.org/tmp/4.png
>
> Hmmm, it didn't disappear from the DOM this time:
>
> http://catalyst.httpd.org/tmp/5.png
>
> The OB/GYN note is still there as rendered by the browser, however the
> server-side script surely wiped it:
>
> mysql> select id,name from ms_notes where id="CN";
> Empty set (0.00 sec)
>
> Here's what my code looks like to remove the note:
>
> function removeNote(id,name) {
> if(confirm("Are you sure you wish to delete: "+name+"?")) {
> // ajax code here to remove note.
> $.ajax({
>   url: "/dbserver.php",
>   type: "POST",
>   data: "delete="+id,
>   cache: false,
>   success: function(html) {
> $("#alpha_notes").empty();
> $("#alpha_notes").replaceWith(html);
>   }
> });
> }
> }
>
> Very important thing to factor in, is if I do a hard refresh on the
> page, here are the results... a missing OB/GYN note, which is the way
> it should be:
>
> http://catalyst.httpd.org/tmp/6.png
>
> Any idea folks? Would really appreciate any help. Firebug also shows
> that in its response to my POST call that the notes are not there in
> its table rendering. My server-side code looks like this:
>
> if($_POST['delete']) {
> global $db_alpha, $link;
> $alpha_note_set = array();
> $db = mysql_select_db($db_alpha, $link);
> if(!$db) {
> die("Can't connect to alpha, please contact steve.");
> }
>
> $sql = "DELETE from ms_notes
> WHERE ID='".$_POST['delete']
> ."' LIMIT 1";
> $result='';
> $result = mysql_query("$sql");
> if(!$result) { die("Something is broken... "); }
>
> $sql = "SELECT NAME,ID from ms_notes";
> $alpha_result_set = @mysql_query("$sql");
> $row='';
> if(mysql_num_rows($alpha_result_set)==0) { $html = "There are zero
> notes left to process in Alpha's database"; echo $html; exit; }
> while($row = @mysql_fetch_array($alpha_result_set, MYSQL_ASSOC)) {
> $alpha_note_set[] = $row; }
> $html='';
> $html = '';
> $html .= '';
> // count here basically just keeps track of a
> // neatly aligned table
> $count=0;
> foreach($alpha_note_set as $note) {
> $html .= " onclick=\"removeNote('".$note[ID]."','".$note[NAME]."')\">delete  $note[NAME]";
> $count++;
> if(($count % 2 == 0)) {
> $html .= "";
> }
> }
> $html .= '';
>
> // send this sucker back to the view.
> echo $html;
> }
>
> Thanks all.
>
> - sf
>


[jQuery] Re: Checkbox "checked" event

2007-09-24 Thread Glen Lipka
$("input :checked")
$("input").is(":checked");

Untested.  But I think they work.

Glen

On 9/24/07, voltron <[EMAIL PROTECTED]> wrote:
>
>
> How do I detect if a checkbox is checked by a user? change or click
> would be wrong.
>
> Thanks
>
>


[jQuery] Re: jQuery for Floating Div

2007-09-24 Thread Glen Lipka
That's a nice effect.  I have been trying to do something like that too.
Microsoft does a very similar thing.
Some helpful plugins to check out:
1. Hoverintent.  Slows down the interaction to make sure the user intended
to mouseover.http://cherne.net/brian/resources/jquery.hoverIntent.html
2. ClueTip.  Shows one example of popup hovers like that.
http://examples.learningjquery.com/62/demo/

There may be other plugins that help.  I am interested in this if you nail
it.

Glen


On 9/24/07, Pete <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I'm trying to construct a "popover" menu that resembles the one on
> Amazon.com (put your mouse over "see all 43 product categories"). I'm
> not too familiar with jQuery/JavaScript, but I thought I would be able
> to do something like this:
>
> $(document).ready(function(){
> $("#link").mouseover(function(){
> $("#popup_menu").show();
> return false;
> });
> $("#popup_menu").mouseout(function(){
> $(this).hide();
> return false;
> });
> });
>
> The problem is, as soon as you move your mouse off the link to go into
> the div, it collapses. Could someone please offer some examples/
> insight?
>
> If you'd like to see the page, here's a link:
> http://www.keuka.edu/pete/jquery_float.html
>
> Thanks!
>
>


[jQuery] .replaceWith() broken in Firefox 2 I think

2007-09-24 Thread Steve Finkelstein

Hi all,

So I have a simple script which essentially uses .replaceWith() to
replace the containing elements HTML with a success callback. This
works fine the first time I invoke a function which calls
.replaceWith() in the success call back, but any subsequent calls
leaves the DOM unmodified.

Here's an example screenshot of what my page looks like upon a random page load.

http://catalyst.httpd.org/tmp/1.png

Ok so I have 4 notes. Let's delete one:

http://catalyst.httpd.org/tmp/2.png

Perfect, it's gone:

http://catalyst.httpd.org/tmp/3.png

Here's where the problem occurs... Let's delete another

http://catalyst.httpd.org/tmp/4.png

Hmmm, it didn't disappear from the DOM this time:

http://catalyst.httpd.org/tmp/5.png

The OB/GYN note is still there as rendered by the browser, however the
server-side script surely wiped it:

mysql> select id,name from ms_notes where id="CN";
Empty set (0.00 sec)

Here's what my code looks like to remove the note:

function removeNote(id,name) {
if(confirm("Are you sure you wish to delete: "+name+"?")) {
// ajax code here to remove note.
$.ajax({
  url: "/dbserver.php",
  type: "POST",
  data: "delete="+id,
  cache: false,
  success: function(html) {
$("#alpha_notes").empty();
$("#alpha_notes").replaceWith(html);
  }
});
}
}

Very important thing to factor in, is if I do a hard refresh on the
page, here are the results... a missing OB/GYN note, which is the way
it should be:

http://catalyst.httpd.org/tmp/6.png

Any idea folks? Would really appreciate any help. Firebug also shows
that in its response to my POST call that the notes are not there in
its table rendering. My server-side code looks like this:

if($_POST['delete']) {
global $db_alpha, $link;
$alpha_note_set = array();
$db = mysql_select_db($db_alpha, $link);
if(!$db) {
die("Can't connect to alpha, please contact steve.");
}

$sql = "DELETE from ms_notes
WHERE ID='".$_POST['delete']
."' LIMIT 1";
$result='';
$result = mysql_query("$sql");
if(!$result) { die("Something is broken... "); }

$sql = "SELECT NAME,ID from ms_notes";
$alpha_result_set = @mysql_query("$sql");
$row='';
if(mysql_num_rows($alpha_result_set)==0) { $html = "There are zero
notes left to process in Alpha's database"; echo $html; exit; }
while($row = @mysql_fetch_array($alpha_result_set, MYSQL_ASSOC)) {
$alpha_note_set[] = $row; }
$html='';
$html = '';
$html .= '';
// count here basically just keeps track of a
// neatly aligned table
$count=0;
foreach($alpha_note_set as $note) {
$html .= "delete  $note[NAME]";
$count++;
if(($count % 2 == 0)) {
$html .= "";
}
}
$html .= '';

// send this sucker back to the view.
echo $html;
}

Thanks all.

- sf


[jQuery] Re: Validation plugin - alphanumeric password with min length

2007-09-24 Thread voltron

Yes, I added the method, this is what I have now

// JS

$(document).ready(function(){
jQuery.validator.addMethod("password", function( value, element,
param ) {
return this.optional(element) || value.length >= 6 && /
\d/.test(value) && /[a-z]/i.test(value);
}, "Your password must be at least 6 characters long and contain
at least one number and one character.");


var container = $('#error_container');


$("#reg_form").validate({
errorContainer: container,
errorLabelContainer: $("ol", container),
wrapper: 'li',
meta: "validate_reg_form",
event: "keyup"
});  // end validate

)};// end document ready



// HTML


Error:


Please enter a password, alphanumeric bla, blah
The passwords must match! Auf Deutsch



Passwort:


Passwort wiederholen:



On Sep 24, 7:53 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> voltron schrieb:> Hi Jörn, I have just tested your suggestion. Sadly, it does 
> not work,
> > if I add "password:true to my HTML, I get this:
>
> > jQuery.validator.methods[rule.method] has no properties
> >http://localhost/de/js/jquery.validate.pack.js
> > Line 14
>
> > I am following the example on your page, the one with the separate
> > errorContainer . I´m using the metadata plugin in conjunction with the
> > validation plugin.
>
> Have you added the password method? This one:
>
> jQuery.validator.addMethod("password", function( value, element, param ) {
> return this.optional(element) || value.length >= 6 &&
> /\d/.test(value) && /[a-z]/i.test(value);}, "Your password must be at least 6 
> characters long and contain at least one number and one character.");
>
> -- Jörn



[jQuery] Re: Getting started

2007-09-24 Thread Rey Bango


Hi Yaip. You'll need to provide some more details as to what you'd like 
to accomplish.


Rey

yaip wrote:
I am brand new to this. Reading the documentation, I know how I would 
use jQuery. But I don’t know how to use UI or Widget. Can anyone help?




[jQuery] .click() not working in ie6... 'g' is null or not an object

2007-09-24 Thread AnalogPanda


I hope this isn't a double post... This is kind of an awkward problem to
search on

Perhaps the root of my problem is the custom function I've written, but I've
set up an "increase/decrease text size" function on a site and it's not
working in ie6 (works fine on XP in ff2, ie7, Opera9, and Safari3)

IE6 or FF does not report an error unless I change .click() to .hover()
in which case, the errors are:
IE6: 'g' is null or not an object
FF2/fireBug: g has no properties
(I'm using jquery 1.2.1 packed)

Here's the code:
JS:

$(document).ready(function() {
$('div#utility p.resize span.increase').click(function() {
if($('div#wrap').attr('class') == "default") {
$('div#wrap').removeClass("default");
$('div#wrap').addClass("medium");
}
else if($('div#wrap').attr('class') == "medium") {
$('div#wrap').removeClass("medium");
$('div#wrap').addClass("large");
}
else if($('div#wrap').attr('class') == "large") {
$('div#wrap').removeClass("large");
$('div#wrap').addClass("xlarge");
}
});
});

$(document).ready(function() {
$('div#utility p.resize span.decrease').click(function() {
if($('div#wrap').attr('class') == "xlarge") {
$('div#wrap').removeClass("xlarge");
$('div#wrap').addClass("large");
}
else if($('div#wrap').attr('class') == "large") {
$('div#wrap').removeClass("large");
$('div#wrap').addClass("medium");
}
else if($('div#wrap').attr('class') == "medium") {
$('div#wrap').removeClass("medium");
$('div#wrap').addClass("default");
}
});
});


HTML:

[jQuery] Re: jQuery.dequeue is not a function

2007-09-24 Thread Rantony

The same error shows up whenever I call Jquery.stop(); my goal is to
prevent all the queued "slow" animations.

R1.2

On Sep 13, 2:27 pm, "Rafael Santos" <[EMAIL PROTECTED]> wrote:
> I'm getting the same error while testing the release 1.2.
> It happens when I fire $.scrollTo()..
>
>



[jQuery] Checkbox "checked" event

2007-09-24 Thread voltron

How do I detect if a checkbox is checked by a user? change or click
would be wrong.

Thanks



[jQuery] strange slice and eq behavior with star ratings + jQuery 1.2.1

2007-09-24 Thread Jim Spath

There is a line in the (Wil Stuckey's) star ratings plugin that looks
like this:

  stars.eq(averageIndex).addClass('on').children('a').css('width',
percent + "%");

I found that the eq() function was not returning 1 item, but rather
all matching items from averageIndex to the end of the items.

My first thought was that perhaps a bug was introduced when eq() was
removed then readded. so I changed it to use a slice:

  stars.slice(averageIndex, averageIndex +
1).addClass('on').children('a').css('width', percent + "%");

To my dismay, slice() was also refusing to return a single item!

I decided at this point to try implementing this functionality via a
selector:

  $('div.star:eq('+averageIndex
+')').addClass('on').children('a').css('width', percent + "%");

This worked and only returned the single item I cared about.

It seems like something is very wrong for eq() and slice(x, x+1) to
both return more than a single element?  How can this possibly occur?

- Jim



[jQuery] jQuery for Floating Div

2007-09-24 Thread Pete

Hi all,

I'm trying to construct a "popover" menu that resembles the one on
Amazon.com (put your mouse over "see all 43 product categories"). I'm
not too familiar with jQuery/JavaScript, but I thought I would be able
to do something like this:

$(document).ready(function(){
$("#link").mouseover(function(){
$("#popup_menu").show();
return false;
});
$("#popup_menu").mouseout(function(){
$(this).hide();
return false;
});
});

The problem is, as soon as you move your mouse off the link to go into
the div, it collapses. Could someone please offer some examples/
insight?

If you'd like to see the page, here's a link: 
http://www.keuka.edu/pete/jquery_float.html

Thanks!



[jQuery] Re: Open and search a .XML file

2007-09-24 Thread Danjojo

Hi, thank you for helping me begin down this path.

Before I use the $.ajax function, do I need to install a codebase for
it?

I notice it is similar to Klaus Hartl cookie plugin, where I install
his codebase, then use it later like var country =
$.cookie('language');

When I start to use this code it seems almost like the rest of the
working jQuery portions of the web page stop working.
//$.ajax({
//url: "language_sheet_en.xml",
//dataType: "xml";
//success: function(xmlDocument){
//  $(xmlDocument).find(...).dosomeThing(...);
//}
//});

Do I need to install an ajax library or is it allready available in my
jQuery build:  * jQuery 1.1.3.1

Thank you.


On Sep 20, 2:18 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Danjojo schrieb:> Can anyone provide me a link of how to open an xml file 
> using JQuery?
>
> Try this:
>
> $.ajax({
> url: "file.xml",
> dataType: "xml",
> success: function(xmlDocument) {
>   $(xmlDocument).find(...).dosomeThing(...);
>}
>
> });
>
> http://docs.jquery.com/Ajax/jQuery.ajax#options
>
> -- Jörn



[jQuery] Getting started

2007-09-24 Thread yaip
I am brand new to this. Reading the documentation, I know how I would use
jQuery. But I don't know how to use UI or Widget. Can anyone help?



[jQuery] tablesorter and charset

2007-09-24 Thread [EMAIL PROTECTED]

hello,
is it possible to use tablesorter with charset other than US? For
example with latin2, cp1250 etc.

Let's make example:
using cp1250: a, ą, b, c, ć ...
using US: ą, ć, a, b, c ...

regards
tom



[jQuery] Re: ajaxcfc - if ajax call fails - how does it get handled?

2007-09-24 Thread Alexander Bilbie
It's just 'failure' then function etc..

So from your script:


$.AjaxCFC({
 url: "/packages/ajax/primaryInvitee
.cfc",
 method: "addInvitee",
 data: options,
 success: function(r) {
   thisCheck = "check_" + r.LOGINID;
   thisLoad = "load_" + r.LOGINID;
   if(r.RESULT > 0){

$('#'+thisLoad).attr("src","/pics/icon_tick_grey.gif");
   }else{
   $('#'+thisCheck).css("display","");
   $('#'+thisLoad).css("display","none");
   }
   //sDumper(r);
 },
failure: function(r) {
$('#'+thisCheck).css("display","");
$('#'+thisLoad).css("display","none");
}
})




On 24/09/2007, Duncan <[EMAIL PROTECTED]> wrote:
>
>
> I have a page that submits checkboxes as they are checked on the way
> down a form.
>
> The click hides the checkbox for a loading gif, submits the ID via
> ajax, and on its return changes the loading icon to a tick image.
>
> What I want to know is how to handle a failure of the ajax request.
>
> currently I have the following:
>
> $.AjaxCFC({
>   url: "/packages/ajax/primaryInvitee.cfc",
>   method: "addInvitee",
>   data: options,
>   success: function(r) {
> thisCheck = "check_" + r.LOGINID;
> thisLoad = "load_" + r.LOGINID;
> if(r.RESULT > 0){
>
> 
> $('#'+thisLoad).attr("src","/pics/icon_tick_grey.gif");
> }else{
> $('#'+thisCheck).css("display","");
> $('#'+thisLoad).css("display","none");
> }
> //sDumper(r);
>   }
>
> I cant find a failure equivalent to "success:".
>
> What about a timeout? How would I handle this?
>
> Thanks in advance!
>
> --
> Duncan I Loxton
> [EMAIL PROTECTED]
>



-- 
Kind Regards,
Alex Bilbie

Freelance website and graphics design
Quite Good Media Ltd

m: 07923 272797


[jQuery] Retrieving the parent of a cloned element

2007-09-24 Thread voltron

Changed the title again, so, now hopefully someone can help me with my
problem.



[jQuery] Re: Ajax Experience Boston : jQuery Camp 2007 - Location & Times?

2007-09-24 Thread John Resig

Right now we're probably looking at 9am to 5pm at Harvard University.
We're still waiting on a final confirmation from them, so that's not
absolutely final yet. If that doesn't work out, then it'll probably be
down the road at MIT.

After 5 we'll probably do dinner/drinks at a local establishment.

--John

On 9/24/07, Jonathan Sharp <[EMAIL PROTECTED]> wrote:
> Have any details been nailed down in regards to the Sat. Oct 27th jQuery
> Camp following Ajax Experience?
>
> I need to finalize travel arrangements so a location and ending time would
> be most helpful. Looking forward to it!
>
> -js


[jQuery] Re: Partial .load()

2007-09-24 Thread Smith, Allex

I swear I tried this... However of course it works now and probably did
before.

Thank you sir.

Works as expected now and my love for jQuery only grows.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of John Resig
Sent: Monday, September 24, 2007 2:27 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Partial .load()



If you only want the children, just use a child selector:
$("#topic").load("help.html #topic-example > *");

The other selector mentioned "#topic-example *" will get you all
descendants, which will certainly give you strange results.

--John

On 9/24/07, Smith, Allex <[EMAIL PROTECTED]> wrote:
>
>
> I'm going nuts with a fairly simple selector issue. 
> $("#topic").load("help.html #topic-example"); I want to get the 
> contents of #topic-example, but only the children, not the container 
> itself. What is the proper way to do this. It seems so simple, but I'm

> struggling with it.
> Thanks
> AllexS
>


[jQuery] Ajax Experience Boston : jQuery Camp 2007 - Location & Times?

2007-09-24 Thread Jonathan Sharp
Have any details been nailed down in regards to the Sat. Oct 27th jQuery
Camp following Ajax Experience?

I need to finalize travel arrangements so a location and ending time would
be most helpful. Looking forward to it!

-js


[jQuery] Re: an "Undo" plugin, or something as such. :-)

2007-09-24 Thread Michael Geary

> > > From: Steve Finkelstein
> > > I was curious if there is anyone currently working on
> > > an 'Undo' type plugin for the jQuery platform. Essentially,
> > > similar functionality to what gmail offers is desired by
> > > many. If not in the works, I wouldn't mind giving it a
> > > shot myself.

> > From: Jörn Zaefferer
> > Implementing an undo functionality requires quite some
> > work on the serverside, as it is always some persistent
> > state that is undone. Where do you think could a jQuery
> > plugin help to implement that?

I have a purely client-side undo plugin, in case that is of any interest. It's 
not really like GMail - it has no connection with
anything on a server, and it uses Undo and Redo buttons that are enabled and 
disabled in a more traditional UI fashion.

I use it in a color theme picker for our Zvents event calendar widget. The 
color picker lets you adjust colors individually for any
of the theme elements, and also has master color controls that automatically 
select a matching set of colors.

I realized I needed this the first time I hit one of the master controls after 
experimenting with some of the individual controls.
The master control blew away all of the individual colors I'd picked. Undo 
fixes that and makes it easy to experiment with different
colors.

> From: John Beppu
> Even if you just want a purely client-side undo mechanism 
> (that delayed sending to the server until you're ready), 
> you'd need to maintain some kind of event queue.  That kind 
> of thing tends to be very app-specific, and it's hard thing 
> to generalize w/o defining a lot of policy about what 
> constitutes an event. 

Callback functions make it easy to separate out those concerns. The undo plugin 
manages the event queue itself, but it doesn't care
about the content of the queue entries. When the app has a new undoable state, 
it creates a state entry and calls the undo plugin to
save it in the queue. When there is an undo or redo event, the plugin grabs a 
state entry from the queue and passes it back to a
callback function that the app provided, so the app can update its own state.

In the case of my color picker, each queue entry is a CSS string that defines 
all of the colors in the picker. IOW, the queue
entries aren't "change" transactions, but represent the entire page state. That 
makes the code simple for this particular use case -
the app code generates and parses the complete CSS string anyway, so it just 
uses that format for the undo state queue.

Even with the application code handling the actual updates, there's still a 
fair amount of work for the undo manager to do, what
with enabling and disabling the undo/redo buttons, handling some subtle 
keyboard focus issues, and managing the queue itself.

Also, the queue is kept in a hidden form field, so the page state survives a 
soft reload. That wasn't really a requirement, but it
was easy to do and nice to have.

Also I've been meaning to add a few features but haven't gotten around to it 
because I didn't need them for my own use:

1) Make the buttons optional, with callbacks when they are enabled and 
disabled, so you can change the UI.

2) Support change transactions in the event queue as an option instead of 
"complete state" queue entries. Since the plugin doesn't
care what the queue entries mean, this shouldn't be much different from the 
current code - I just haven't thought about it yet.

3) Allow the use of objects as state queue entries as an option instead of 
strings. The undo manager code would work fine either
way, except for the way it stores the entries in a hidden form field. If it 
stored them in an array they could be objects - at the
cost of not surviving a soft reload.

Anyway, I must have a working demo somewhere - I'll track it down and post a 
link.

-Mike



[jQuery] Re: Partial .load()

2007-09-24 Thread John Resig

If you only want the children, just use a child selector:
$("#topic").load("help.html #topic-example > *");

The other selector mentioned "#topic-example *" will get you all
descendants, which will certainly give you strange results.

--John

On 9/24/07, Smith, Allex <[EMAIL PROTECTED]> wrote:
>
>
> I'm going nuts with a fairly simple selector issue.
> $("#topic").load("help.html #topic-example");
> I want to get the contents of #topic-example, but only the children, not the
> container itself.
> What is the proper way to do this. It seems so simple, but I'm struggling
> with it.
> Thanks
> AllexS
>


[jQuery] Re: Rudimentary jQuery question

2007-09-24 Thread Steve Finkelstein

Well,

I think I've accomplished completely confusing myself.  I'll include
both the client-side and server-side scripts I'm using here. It's
pretty self-explanatory what I'm trying to accomplish, but I'm having
a great ordeal of trouble getting there.

Without further a due:

dbsync.php
--
http://www.w3.org/TR/html4/loose.dtd";>


Database sync utility