[jQuery] Re: jQuery.SerialScroll

2008-02-12 Thread Mika Tuupola



On Feb 12, 2008, at 4:00 AM, Ariel Flesler wrote:


Those 2 urls broke down... Here I go again:
ScrollTo: http://flesler.blogspot.com/2007/10/jqueryscrollto.html
LocalScroll: http://flesler.blogspot.com/2007/10/jqueryscrollto.html



In plugin pages, could you provide straight link to source (not  
zipped). Now one must view source of the demo page to find url to  
JavaScript source. But anyway, good stuff!


--
Mika Tuupola
http://www.appelsiini.net/



[jQuery] Re: Assigning an animation toggle to a checkbox to fade a table row in/out

2008-02-12 Thread andrea varnier

On 11 Feb, 17:41, quirksmode [EMAIL PROTECTED] wrote:
 That's perfect!! Works really nicely. Just out of interest what does
 the blur() mean and why is it parent().parent(). Would that need to
 change if I introduced more td's?

when you call an event handler without arguments, generally you want
to trigger that event on the items you selected.
if you pass a function, for example
$(this).click(function(){
   blabla
});
the commands are executed when the user clicks upon the element.
if we say just
$(this).click();
we simulate the user clicking on it.
blur() deselects the item.

the .parent().parent() path is because first we select the clicked
element
$(this)
then we go up one level, first parent of the checkbox is the td that
contains it
.parent()
parent of the td is what we need: the tr
.parent()
and so on...
you will have to change it only if you put your checkbox in another
place.

 Is it possible to add a background image to the row? Would that have
 to be done with a style switch, or is there a command that adds it in?

you can use the css() method, and it can be done in the same line of
code

$(this).blur()
.parent()
.parent()
.css('background-image', 'url(path/to/image)')
//.children('td').not(':last')
.animate({opacity:0.2});

 Thanks btw

you're welcome :)


[jQuery] Re: how to set the value of an input after selecting an option in a list

2008-02-12 Thread andrea varnier

On 11 Feb, 20:41, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hello,
 after selecting a value in my select field and clicking on a button, I
 call a function (please see the code below)

not sure what you have to do, but if you want to use the response data
of an ajax request, you must specify 'data' as a function argument.
load() uses POST so
something like this:

 $('#newDoc_name')
   .load('index.php/get/etc..',
  // since you're using GET you don't need those {}
  function(data){
$('#newDoc_select').val(data);
  });

assuming the response is just the name you need :)


[jQuery] Re: Uploader 0.9 beta

2008-02-12 Thread Gilles (Webunity)

Hehe

Well what you are asking is possible!

The third example, uses sessions and forms. So the form is validated,
and the uploaded files are placed in a session object. (i'll show some
code later on tonight).

There is an event called queueCompleted, so in that event you could
say:
Finished uploading, processing thumbnails

and do an Ajax call to the backend which generates the thumbnails.

That should do the trick for you.

-- Gilles


[jQuery] Re: Getting the highlighted text

2008-02-12 Thread andrea varnier

On 12 Feb, 07:46, duggoff [EMAIL PROTECTED] wrote:
 I have a textarea and a button that allows me to select some text and
 apply a span and class to it. What I need to do is select that text
 later and remove the span and class by clicking on a button. I think I
 can handle to part that removes the span and class, but I don't know
 how to get the selected text after I've highlighted it. Can anyone
 help me?

hi, unfortunately I can't help... Mr. David Flanagan suggests this
function

function getSelectedText() {
if (window.getSelection) {
return window.getSelection().toString();
}
else if (document.getSelection) {
return document.getSelection();
}
else if (document.selection) {
// this is specifically for IE
return document.selection.createRange().text;
}
}

but it won't get the text inside the textarea in FF and I don't know
why :|


[jQuery] Re: bug with animate and a duration of 0 milliseconds?

2008-02-12 Thread George


FWIW:   A while back I also found that the callback function is not
called after a zero-second show() or hide().
Dunno if that is still the case.  Just a heads up in case anyone else
experiences that.
George (in haste...)


[jQuery] Re: Can we detect whether images are turned off?

2008-02-12 Thread Richard D. Worth
//
http://www.thewatchmakerproject.com/journal/53/images-offcss-on-image-replacement
var test = new Image();
var tmp = new Date();
var suffix = tmp.getTime();
test.src = 'test.gif?'+suffix;
test.onload = loadStyles();
// The loadStyles function would contain
// document.write (link rel=\stylesheet\ href=\image_replacement.css\
/);

That script:

1. Creates an image object
2. Appends a timestamp to the querystring, to not load from cache[*]
3. Calls a function in the image onload

If images are turned off, the onload function won't get called. I see a
couple problems with #2 in my simple test.
A. In Firefox at least (the only browser I tested), you have to load an
image from a server, not a local image on your machine, if developing
locally (that will get loaded even if images are off)
B. If appending a random number or a timestamp to the querystring, you have
to know the server will still return an image. In my test (the google logo),
it didn't. A safer alternative is the hash (that url part after the # sign).

If you're interested, here's the equivalent in jQuery:

$('img src=http://www.google.com/intl/en_ALL/images/logo.gif' + '#' +
Math.random() + '/').load(function() {
  alert('images are on');
});

I've used a random hash, and a simple alert (which you would replace with a
function to load a stylesheet dynamically).

- Richard

On Feb 12, 2008 12:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:


 Hello again

 Still trying to adhere to 'Web Standards' while using (almost too
 many) whizzy jQuery effects, I see I'll need to provide some
 alternative text styles for users that don't see my lovely background
 images. I imagine Javascript can do the detection? Can you please
 advise - I read this:
 http://www.thewatchmakerproject.com/journal/53/images-offcss-on-image-replacement
 but am confounded by the last paragraph (the script)!

 Thanks :o
 Cherry



[jQuery] Re: Some sort of template for displaying validation errors in a div using validation framework?

2008-02-12 Thread Jörn Zaefferer


rickcr schrieb:

I apologize, I found the answer to question1 below. It was in the
options documentation here:

http://docs.jquery.com/Plugins/Validation/validate#options

(There only seemed to be one link to those options from the docs page
in the validate method, and I kept missing it. As a small
recommendation, I'd mention in this link in the general guidelines
here http://docs.jquery.com/Plugins/Validation  since there is some
great stuff there in the options doc.)
  
Good point. I'll try to look into the issue. Maybe we can modify the 
wiki template to not use those tabs if the options tab is the only one.


Jörn


[jQuery] div index

2008-02-12 Thread Feijó





How can I get the index of one of my class? I'm reading all in
docs.jquery.com and found nothing

 $("#new-criteria").click(function(){
  $last = $('#thefilter .qz-tablefield:eq(1)')
   .clone(true);
  index = 1; // here, how to get
the index of "this"?
  $('#qz-criteria .qz-tablefield:eq('+index+')').after($last);
 });


Thanks

Feij





[jQuery] Release: Validation plugin 1.2.1

2008-02-12 Thread Jörn Zaefferer


The 1.2.1 release for the validation plugin 
(http://bassistance.de/jquery-plugins/jquery-plugin-validation/) is out! 
Among bugfixes related to remote validation and message display a few 
handy improvements landed: The delegate dependency is now bundled with 
the plugin (it was always required anyway), and the small part of the 
ajaxQueue plugin that was required for remote validation is now part of 
the validation plugin, too. So now all you need to include is the 
jquery.validate.js file, nothing else.


Also fixed are the url and email validation methods. They now check for 
top-level domains (eg. the .de in bassistance.de). A version where 
that is still optional is included in the package via additional-methods.js.


I've also improved some demos 
(http://jquery.bassistance.de/validate/demo/) to provide a better reference.


The complete list of changes:

* Bundled delegeate plugin with validate plugin - its always required anyway
* Improved remote validation to include parts from the ajaxQueue plugin 
for proper synchronization (no additional plugin necessary)

* Fixed stopRequest to prevent pendingRequest  0
* Added jQuery.validator.autoCreateRanges property, defaults to false, 
enable to convert min/max to range and minlength/maxlength to 
rangelength; this basically fixes the issue introduced by automatically 
creating ranges in 1.2
* Fixed optional-methods to not highlight anything at all if the field 
is blank, that is, don't trigger success
* Allow false/null for highlight/unhighlight options instead of forcing 
a do-nothing-callback even when nothing needs to be highlighted
* Fixed validate() call with no elements selected, returning undefined 
instead of throwing an error
* Improved demo, replacing metadata with classes/attributes for 
specifying rules

* Fixed error when no custom message is used for remote validation
* Modified email and url validation to require domain label and top label
* Fixed url and email validation to require TLD (actually to require 
domain label); 1.2 version (TLD is optional) is moved to additionals as 
url2 and email2
* Fixed dynamic-totals demo in IE6/7 and improved templating, using 
textarea to store multiline template and string interpolation
* Added login form example with Email password link that makes the 
password field optional
* Enhanced dynamic-totals demo with an example of a single message for 
two fields


Have fun!

Jörn


[jQuery] Re: Problem on IE with jqModal

2008-02-12 Thread Alexandre Plennevaux

check your CSS and compare it to the CSS provided on jqmodal.
it seems you have some margin / padding set to the body element. make
sure it is set to 0.


On Feb 12, 2008 5:32 PM, eyal [EMAIL PROTECTED] wrote:

 Hello!
 I'm using jqModal on my website. When It's running on Firefox it works
 great but when it's on IE it's looks like the screenshot attached to
 this message.

 http://www.nabble.com/file/p15433219/screenshot.jpg

 How can I solve that?
 (I'm using the latest IE version - IE7)

 Thanks!
 Eyal




-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Cannot trigger mouseout for function bound by hover.

2008-02-12 Thread Gerlando

I'm using hover to bind methods to a DOM object. Triggering the
mouseover event works as expected, but when using mouseout/mouseleave
nothing happens. What am I doing wrong?

newRollHandler  = new rollHandler(this);
$(this).hover(newRollHandler.over,newRollHandler.off);
$(this).trigger(mouseover);
$(this).trigger(mouseout);


[jQuery] Re: jQuery Field Plug-in - Ajax Post Data

2008-02-12 Thread MikeP


Dan,

Thanks a lot. It worked perfectly.
I was trying something similar without the eval:
data: {mydata},

...but that errored too. I guess because of the { }. I assumed
it was always needed. Probably because I don't really know what
it's used for.

Thanks,
Mike


[jQuery] jQuery Image Swap Works in FF, not IE

2008-02-12 Thread Derek M.

Hi all,

I have a little jQuery function that toggles a window on click and
changes the background image of a span (to toggle an up/down arrow).
It works fine in FF, but in IE, it is delayed. For example, in IE, you
click once and the arrow stays the same (in the closed position). When
you click to close the toggled window (the 2nd click), the arrow
finally swaps to the down/toggled position, even though it's the 2nd
click and the window has now been closed. The arrow continues in this
off by one patten indefinitely, but only in IE. Any suggestions?
Here is the code:

$(document).ready(function() {
$('span.BodyCopy12jQuery').click(function() {
  var host = window.location.hostname;
  var currImage = $(this).css('backgroundImage');
  var id = $(this).attr('id');
  $('#faqAnswer' + id).toggle();
$(this).css({backgroundImage: currImage == 'url(http://' + host + '/
images/arrow_red_right.gif)' ? 'url(http://' + host + '/images/
arrow_red_down.gif
)' : 'url(http://' + host + '/images/arrow_red_right.gif)'});
  return false;
});

});

Thanks.


[jQuery] Re: Updated API browser

2008-02-12 Thread Yansky

Thanks remy. :)

On Feb 13, 3:25 am, Alexandre Plennevaux [EMAIL PROTECTED]
wrote:
 it's very neat! would be nice to turn it into an AIR applicaiton, that
 runs on my desktop as an app available offline.

 another suggestion: provide a way to add comments a la php doc ?
 Always found it super useful

 On Feb 12, 2008 3:30 PM, Remy Sharp [EMAIL PROTECTED] wrote:





  Hi all,

  Ever since jQuery 1.1.3 the old API browser hasn't been updated due to
  incompatibilities in the documentation (though that's mostly
  assumptions). Although the new docs is comprehensive, I've always
  liked the quick access the old API browser gave.

  As such, I've got about my own way re-building an API browser based on
  the new documentation (and assuming the documentation stays in the
  wiki format, it should be easier to support upgraded documentation).

 http://remysharp.com/jquery-api/

  The API can be accessed either through live searching or directly on
  the URL, e.g:

 http://remysharp.com/jquery-api/bind/

  Love to hear any feedback, etc.

  The original post is 
  here:http://remysharp.com/2008/02/12/jquery-api-browser/

  Cheers,

  Remy.

 --
 Alexandre Plennevaux
 LAb[au]

 http://www.lab-au.com


[jQuery] jqModal Element Blocking

2008-02-12 Thread Adam

Is it possible to only block elements (such as DIVs) using the jqModal
plugin?  This would be similar to what the BlockUI plugin does, but I
need more options than BlockUI offers in modal dialogs.


[jQuery] Re: div index

2008-02-12 Thread motob

Can you post a little more info? Maybe some of your html code that
goes along with what jquery is working with? Are you trying to add a
new criteria text box to a search form when #new-criteria is clicked?
Are you working with table cells or divs?

On Feb 12, 3:14 pm, Feijó [EMAIL PROTECTED] wrote:
 How can I get the index of one of my class? I'm reading all in 
 docs.jquery.com and found nothing
 $(#new-criteria).click(function(){
 $last = $('#thefilter .qz-tablefield:eq(1)')
 .clone(true);
   index= 1;// here, how to get the index of this?
 $('#qz-criteria .qz-tablefield:eq('+index+')').after($last);
 });
 ThanksFeijó


[jQuery] Re: [validate] spinner - loading

2008-02-12 Thread José Pablo Orozco Marín

Thank you Jörn .

// set this class to error-labels to indicate valid fields
 $(#UserRegisterForm).bind(ajaxSend, function(){
  alert(Send!);
}).bind(ajaxComplete, function(){
  alert(Complete!);
});

Now im going to use some div to show or hide.

I love your plugin, is a piece of art.


[jQuery] Re: how to set the value of an input after selecting an option in a list

2008-02-12 Thread bractar


hi thank you for your help but I still have a problem.

I want to put the result of 'index.php/get/s_document_loadFields/' in the
input field  $('#newDoc_name') after selecting a value in the list
$('#newDoc_select')

The following code doesn't work for me
 $('#newDoc_name').load('index.php/get/s_document_loadFields/',
function(date){ 
$('#newDoc_select').val(data); 
}); 
-- 
View this message in context: 
http://www.nabble.com/how-to-set-the-value-of-an-input-after-selecting-an-option-in-a-list-tp15419610s27240p15441221.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: loading content from a remote file and appending it into DOM element

2008-02-12 Thread Alexandre Plennevaux

simple and dirty:

append an empty element to the div#dataDiv, and have the loaded data
inserted into it:

$('div/div').appendTo('#dataDiv').load('process_data.php?id=2');


or in fact you could simply use the $.get

$.get('process_data.php?id=2',function(data){
$(data).appendTo('#dataDiv');
});

On Feb 12, 2008 10:23 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 Hi,

 I would like to load content from process_data.php?id=2 and then
 append that data into the DIV with id=dataDiv, how would I do this?
 I have seen the .load directive, but seems to erase any data
 previously in the DOM element whereas I want to append on to what is
 already there.

 Thanks for any help, - Dave




-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: Updated API browser

2008-02-12 Thread Rey Bango


Remy,

Can you make this downloadable so it can be run locally?

Rey



Hi all,
Ever since jQuery 1.1.3 the old API browser hasn't been updated due to
incompatibilities in the documentation (though that's mostly
assumptions). Although the new docs is comprehensive, I've always
liked the quick access the old API browser gave.
As such, I've got about my own way re-building an API browser based on
the new documentation (and assuming the documentation stays in the
wiki format, it should be easier to support upgraded documentation).
http://remysharp.com/jquery-api/
The API can be accessed either through live searching or directly on
the URL, e.g:
http://remysharp.com/jquery-api/bind/
Love to hear any feedback, etc.
The original post is here:http://remysharp.com/2008/02/12/jquery-api-browser/
Cheers,
Remy.






[jQuery] Re: jQuery Field Plug-in - Ajax Post Data

2008-02-12 Thread Dan G. Switzer, II

Mike,

Thanks a lot. It worked perfectly.
I was trying something similar without the eval:
data: {mydata},

...but that errored too. I guess because of the { }. I assumed
it was always needed. Probably because I don't really know what
it's used for.

The {} notation is creating a structure. Since the mydata variable is
already a structure, you do not want to use that notation.

-Dan



[jQuery] Re: A Very jQuery App

2008-02-12 Thread Alexandre Plennevaux

hey Brice! I didn't know you were behind poMMo ! i've been following
its dev since a few months now but didn't catch up the latest updates.
It's improving a lot!

On Feb 13, 2008 12:38 AM, Brice Burgess [EMAIL PROTECTED] wrote:

 I thought I'd write in to let the community know that there's an open
 source mailing application whose interface is *heavily* based on jQuery.

 Nearly all JavaScript was refactored in the PR16 release of poMMo
 following an upgrade to jQuery 1.2. I hope the resulting source serves
 as a useful example for real world jQuery use.

 In particular, the following plugins are showcased;

 1) Tony Tomov's jqGrid plugin - http://trirand.com/blog/

   demo: http://try.pommo.org/admin/subscribers/subscribers_manage.php

 2) Klaus Hartl's ui.tabs - http://stilbuero.de/jquery/tabs_3/

   demo: http://try.pommo.org/admin/mailings/mailings_start.php
   (features a tabWizzard which submits and validates mandatory forms in
 the current tab before switching to another)

 3) Mike Alsup's forms plugin - http://www.malsup.com/jquery/form/

   Used throughout poMMo. An abstraction library was written to aid in
 the automatic assignment (and reassignment) of AJAX or JSON tagged forms
 [
 http://pommo.svn.sourceforge.net/viewvc/pommo/aardvark-development/themes/default/inc/ui.form.tpl?view=markup
 ]

 4) Paul Bakaus's ui.sortables and ui.slider - http://ui.jquery.com/

   demo: http://try.pommo.org/admin/setup/setup_fields.php
   demo: http://try.pommo.org/admin/setup/setup_configure.php#mailings
 [click throttle settings]

 5) My jqModal, jqValidate, and jqStripe plugins -- used throughout and
 written specifically to handle the dialog, client side/real-time form
 validation, and row striping needs of poMMo.


 Many thanks to jQuery for bringing the possibility of a rich interface
 to the people.

 There is *no way* I could have done it without the support of this
 mailing list nor the lightweight extensible cross-browser reasonable
 supifying uberness of jQuery.

 Thanks,

 ~ Brice





-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] jQuery Accordion Plugin

2008-02-12 Thread Andrej

Hi,
I am having some issues implementing the Accordion plugin with
tertiary menus from:

http://bassistance.de/jquery-plugins/jquery-plugin-accordion/

My issues are, mainly to do with the hidden (closed) ul's inheriting
the height of the previously visible (open) ul's.

This seems like a bug in Accordion, or more likely, just my bad
coding...

You can see a working version here:

http://letterfive.accelhost.com/

My nav structure is:

code

div id=nav
ul id=main_nav
lia href=#Item/a/li
lia href=#Design/a
ul class=sub_nav
lia href=#Identity/a
ul class=tert_nav
lia href=#Brushed/a/li
lia href=#Providence/a/li
lia href=#Photography/a/li
lia href=#Net/a/li
lia href=#Film/a/li
/ul
/li
lia href=#Print/a/li
lia href=#Interactive/a/li
/ul
/li
lia href=#Letterpress/a/li
/ul
/div

/code

Each menu item has a sub nav, which itself has a sub nav (tert nav).

Thanks for any help.

A.


[jQuery] Trouble applying .show() to descendants

2008-02-12 Thread Nick P

I'm trying to use the show function to display elements in a jQuery
object that contains a block of code I cloned.  I'm having trouble
getting the show function to apply to all the descendants of the code
in the object.  It's probably better if I show an example than try to
describe everything:

This is something like what I've copied:

table id=itemForm:resources
  tbody
tr
  td
... more elements, some I've previously hidden using .hide()
  /td
/tr

tr
  td
...
  /td
/tr

...
/table


I clone like this:

var blockCopy = $([EMAIL PROTECTED]:resources] tr:first).clone();


The trouble comes when I try to append this cloned block to the end of
the table.  If I just do:

blockCopy.appendTo([EMAIL PROTECTED]:resources] tbody:first);

It appends the clone correctly, but the hidden fields are still
hidden.


I've tried something like: blockCopy.show();
But that (I'm assuming, since it didn't really do anything) doesn't
apply the show throughout all the block down to the last descendant.

How can I apply show to that cloned block to make the hidden fields
visible again?

Thanks in advance for any ideas and help!  I'm relatively new to
jQuery so any help is greatly appreciated!

- Nick P


[jQuery] Re: .html(val) not working properly in IE6 - suggestions?

2008-02-12 Thread Slantedview

Thanks for the response, though unfortunately it didn't work.

So, after another 2 hours of debugging I found what the problem was. I
had a line in my HTML that apparently IE6 didn't like, and was
preventing IE6 from properly wiping out my div tag:

a id=someId/

That line wasn't even in my div tag, just somewhere else in my page
and IE didn't like it. Mark that one for future reference.

jonathan

On Feb 12, 7:57 am, Karl Swedberg [EMAIL PROTECTED] wrote:
 not sure what is causing the problem, but one alternative approach  
 would be to use empty() and append()

 $(#myDivId).empty();

 $(#myDivId).append(val)

 maybe that will work better?

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Feb 11, 2008, at 7:54 PM, Slantedview wrote:





  I have a Div tag whose contents I'm trying to wipe out and replace
  with stuff retrieved via an ajax call. Everything works fine, except
  in IE6, where when I try to wipe out the contents of my div tag,
  nothing happens:

  $(#myDivId).html();

  The .html(val) call works fine in IE for some pages, but not for
  others. I'm guessing it's more of a problem with IE6 than JQuery, but
  I was hoping someone else had come across this problem and could offer
  some tips?

  Thanks,
  jonathan- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Moving DIVs up/down

2008-02-12 Thread Hamish Campbell

You can use 'insertBefore' to do this very easily.

For example:

$(document).ready(function(){
$('.smallDiv').click(function(){

$(this).insertBefore($(this).prev());

});
});

This will swap a 'smallDiv' element up by one when you click it. If it
is already the first one, $(this).prev() has length 0 so it doesn't do
anything.

Just change it to suit your needs.

Eg:

function shiftUp(obj) {
 $(obj).insertBefore($(obj).prev());
}

On Feb 13, 12:26 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 Let's say I have a large DIV with class largeDiv and inside it, a
 bunch of smaller DIVs, each with its own unique ID and class
 smallDiv.  Given an arbitrary DIV with class smallDiv, if I want
 it to switch places with the DIV immediately above it, how do I
 achieve the switch?  Keep in mind that it may already be the top DIV
 in the list.

 Thanks, - Dave


[jQuery] Selecting Descendents of This

2008-02-12 Thread studiobl

I'm having trouble selecting descendents of this

So, this works to initially hide uls:
$(.treeHeader ul).toggle();

But this doesn't work to toggle them:

$(.treeHeader).click(function(){
$(this + ul).toggle();
});



[jQuery] Re: controlling li-items with unique IDs and trigger corresponding DIVs

2008-02-12 Thread Sean Ronan (Activepixels)

Hi Jannik,

How would your example be adapted to use mouseovers and then hide the div
once the mouse is off either the li or the div.

I posted a question earlier today show/hide flyout menu panel and it seems
your approach gets me half way there.

The application is a flyout menu - using divs to hold scrollable list items.


Regards
Sean
sean ronan
activepixels
office :   01245 399 499
email :  [EMAIL PROTECTED]
web :activepixels.co.uk
Activepixels is a limited company registered in England and Wales.
Registered number: 5081009.
Registered office: Suite SF8, The Heybridge Business Centre, 110 The
Causeway, Maldon, Essex, CM1 3TY.
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jannik
Sent: 12 February 2008 14:25
To: jQuery (English)
Subject: [jQuery] Re: controlling li-items with unique IDs and trigger
corresponding DIVs


Try this:
$(document).ready(function (){
$('div.page').hide();
$('#menu li').click(function (){
$('div.page').hide();
$('#div'+$(this).attr('id')).show();
});
});

ul id=menu
li id=link1Lorem ipsum dolor/li
li id=link2Lorem ipsum dolor/li
li id=link3Lorem ipsum dolor/li
li id=link4Lorem ipsum dolor/li
/ul
div id=divlink1 class=pageDiv 1/div
div id=divlink2 class=pageDiv 2/div
div id=divlink3 class=pageDiv 3/div
div id=divlink4 class=pageDiv 4/div


On Feb 12, 2:37 pm, schnuck [EMAIL PROTECTED] wrote:
 hi guys,

 hope someone can give me a hint for this. if i had an unordered list
 as shown below, where the li-items had unique IDs - is there any way
 that we check which li-items has been clicked so depending on that, we
 could show/animate a corresponding, unique DIV (each li-items would
 have its own corresponding DIV)? these DIVs would be preloaded and
 hidden via CSS somewhere on the page.

 ul
 li id=link1Lorem ipsum dolor/li
 li id=link2Lorem ipsum dolor/li
 li id=link2Lorem ipsum dolor/li
 li id=link3Lorem ipsum dolor/li
 li id=link4Lorem ipsum dolor/li
 /ul

 or do the li-items need to go into HREFs to accomplish this?

 i know this might be very simply to solve, but i just can;t figure it
 out. any help very appreciated.

 many thanks.



[jQuery] Re: Updated API browser

2008-02-12 Thread paulj

Great work Remy!

On 12 Feb, 22:56, Rey Bango [EMAIL PROTECTED] wrote:
 Remy,

 Can you make this downloadable so it can be run locally?

 Rey

  Hi all,
  Ever since jQuery 1.1.3 the old API browser hasn't been updated due to
  incompatibilities in the documentation (though that's mostly
  assumptions). Although the new docs is comprehensive, I've always
  liked the quick access the old API browser gave.
  As such, I've got about my own way re-building an API browser based on
  the new documentation (and assuming the documentation stays in the
  wiki format, it should be easier to support upgraded documentation).
 http://remysharp.com/jquery-api/
  The API can be accessed either through live searching or directly on
  the URL, e.g:
 http://remysharp.com/jquery-api/bind/
  Love to hear any feedback, etc.
  The original post is 
  here:http://remysharp.com/2008/02/12/jquery-api-browser/
  Cheers,
  Remy.


[jQuery] Re: Sortserialize returns nothing!

2008-02-12 Thread bjorsq


I'm using interface 1.2 with jquery 1.2.2, and this is what works for me:

script
  $(document).ready(function(){
$(#myList).Sortable({
accept : sortableitem,
onStop : function(e, ui)
{
serialize(myList);
}
});
  });

function serialize(s)
{
var serial = $.SortSerialize(s);
alert(serial.hash);
alert(serial.o[s]);
};
  /script
  styleul { list-style: none; }
li { background: #727EA3; color: #FFF; width: 100px; margin: 5px; font-size:
10px; font-family: Arial; padding: 3px; }/style
/head
body

ul id=myList
li id=11 class=sortableitemItem 1/li
li id=23 class=sortableitemItem 2/li
li id=33 class=sortableitemItem 3/li
li id=44 class=sortableitemItem 4/li
/ul

Changes:
Sortable requires a class for all sortable items, so I've added the
sortableitem class to them and assigned it to the accept option. Calls to
SortSerialize take the id of the sortable without the preceding #. I don't
really like the hash it returns, so I use the object instead
(serial.o['myList'] in this case).


chrille112 wrote:
 
 I'm stuck! I have followed the examples there is, but I can't make this
 work. My code below just generates an empty alert box:
 
 script
   $(document).ready(function(){
 $(#myList).sortable({
   update : function(e, ui)
   {
   serialize(#myList);
   }
   });
   });
 
 function serialize(s)
 {
   serial = jQuery.SortSerialize(s);
   alert(serial.hash);
 };
   /script
   styleul { list-style: none; }
 li { background: #727EA3; color: #FFF; width: 100px; margin: 5px;
 font-size: 10px; font-family: Arial; padding: 3px; }/style
 /head
 body
 
 ul id=myList
   li id=11Item 1/li
   li id=23Item 2/li
   li id=33Item 3/li
   li id=44Item 4/li
 /ul
 

-- 
View this message in context: 
http://www.nabble.com/Sortserialize-returns-nothing%21-tp15362349s27240p15444333.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Cannot trigger mouseout for function bound by hover.

2008-02-12 Thread Gerlando

Please disregard this post. I had an obvious error in logic elsewhere,
I must have been zoning :)

On Feb 12, 1:46 pm, Gerlando [EMAIL PROTECTED] wrote:
 I'm using hover to bind methods to a DOM object. Triggering the
 mouseover event works as expected, but when using mouseout/mouseleave
 nothing happens. What am I doing wrong?

 newRollHandler  = new rollHandler(this);
 $(this).hover(newRollHandler.over,newRollHandler.off);
 $(this).trigger(mouseover);
 $(this).trigger(mouseout);


[jQuery] Re: A Very jQuery App

2008-02-12 Thread John Resig

Looks great, Brice - keep up the great work!

--John

On Feb 12, 2008 6:38 PM, Brice Burgess [EMAIL PROTECTED] wrote:

 I thought I'd write in to let the community know that there's an open
 source mailing application whose interface is *heavily* based on jQuery.

 Nearly all JavaScript was refactored in the PR16 release of poMMo
 following an upgrade to jQuery 1.2. I hope the resulting source serves
 as a useful example for real world jQuery use.

 In particular, the following plugins are showcased;

 1) Tony Tomov's jqGrid plugin - http://trirand.com/blog/

   demo: http://try.pommo.org/admin/subscribers/subscribers_manage.php

 2) Klaus Hartl's ui.tabs - http://stilbuero.de/jquery/tabs_3/

   demo: http://try.pommo.org/admin/mailings/mailings_start.php
   (features a tabWizzard which submits and validates mandatory forms in
 the current tab before switching to another)

 3) Mike Alsup's forms plugin - http://www.malsup.com/jquery/form/

   Used throughout poMMo. An abstraction library was written to aid in
 the automatic assignment (and reassignment) of AJAX or JSON tagged forms
 [
 http://pommo.svn.sourceforge.net/viewvc/pommo/aardvark-development/themes/default/inc/ui.form.tpl?view=markup
 ]

 4) Paul Bakaus's ui.sortables and ui.slider - http://ui.jquery.com/

   demo: http://try.pommo.org/admin/setup/setup_fields.php
   demo: http://try.pommo.org/admin/setup/setup_configure.php#mailings
 [click throttle settings]

 5) My jqModal, jqValidate, and jqStripe plugins -- used throughout and
 written specifically to handle the dialog, client side/real-time form
 validation, and row striping needs of poMMo.


 Many thanks to jQuery for bringing the possibility of a rich interface
 to the people.

 There is *no way* I could have done it without the support of this
 mailing list nor the lightweight extensible cross-browser reasonable
 supifying uberness of jQuery.

 Thanks,

 ~ Brice




[jQuery] A Very jQuery App

2008-02-12 Thread Brice Burgess


I thought I'd write in to let the community know that there's an open 
source mailing application whose interface is *heavily* based on jQuery.


Nearly all JavaScript was refactored in the PR16 release of poMMo 
following an upgrade to jQuery 1.2. I hope the resulting source serves 
as a useful example for real world jQuery use.


In particular, the following plugins are showcased;

1) Tony Tomov's jqGrid plugin - http://trirand.com/blog/

 demo: http://try.pommo.org/admin/subscribers/subscribers_manage.php

2) Klaus Hartl's ui.tabs - http://stilbuero.de/jquery/tabs_3/

 demo: http://try.pommo.org/admin/mailings/mailings_start.php
 (features a tabWizzard which submits and validates mandatory forms in 
the current tab before switching to another)


3) Mike Alsup's forms plugin - http://www.malsup.com/jquery/form/

 Used throughout poMMo. An abstraction library was written to aid in 
the automatic assignment (and reassignment) of AJAX or JSON tagged forms 
[ 
http://pommo.svn.sourceforge.net/viewvc/pommo/aardvark-development/themes/default/inc/ui.form.tpl?view=markup 
]


4) Paul Bakaus's ui.sortables and ui.slider - http://ui.jquery.com/

 demo: http://try.pommo.org/admin/setup/setup_fields.php
 demo: http://try.pommo.org/admin/setup/setup_configure.php#mailings 
[click throttle settings]


5) My jqModal, jqValidate, and jqStripe plugins -- used throughout and 
written specifically to handle the dialog, client side/real-time form 
validation, and row striping needs of poMMo.



Many thanks to jQuery for bringing the possibility of a rich interface 
to the people.


There is *no way* I could have done it without the support of this 
mailing list nor the lightweight extensible cross-browser reasonable 
supifying uberness of jQuery.


Thanks,

~ Brice



[jQuery] Re: clock pick in ajax loaded form - ie error

2008-02-12 Thread Josh Nathanson


Huh...well even when I look at that page in FF the positioning is off...the 
div pops up off the top of the screen.


What I'd do for starters is strip off the code where you are positioning the 
clockpick div manually, that is this part:



 var posTop = event.pageY+340;
 var posLeft = event.pageX;

 $(#CP_hourcont).css({ position: 'absolute', top: posTop, left:
 posLeft });


It's set up in the plugin to popup automatically right where the mouse is, 
taking into account any scrolling, for easy selecting.  I would at least 
make sure that works right before going on to try and reposition the div 
using css.


Unfortunately my IE6 is hosed at the moment, I applied a windows IE6 
security update today, and now my IE6 won't even startup.  NICE.


-- Josh

- Original Message - 
From: pedalpete [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Tuesday, February 12, 2008 3:00 PM
Subject: [jQuery] Re: clock pick in ajax loaded form - ie error




Hi Josh,

I do have the latest release.
I can't point you to my actual page with the error as it is behind a
login, but i've put up a bunch of similar code and it is showing the
same behavior.

Here's a link.
http://zifimusic.com/testing/clockpick-ie.php

I find it incredibly strange that the alert i put into the
templateShifts function triggers in FF but not in IE. It makes me
kinda think that the issue isn't with clockpick at all, but I don't
see any other problems with my code.

Pete

On Feb 12, 2:06 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
Do you have the latest release?  You will want to get 1.2.1.  I think 
there

was an IE issue in earlier releases.

If you could post a link as well that would be helpful.

-- Josh

- Original Message -
From: pedalpete [EMAIL PROTECTED]
To: jQuery (English) jquery-en@googlegroups.com
Sent: Tuesday, February 12, 2008 1:49 PM
Subject: [jQuery] clock pick in ajax loaded form - ie error

 I've been using the clockpick plugin (it's awesome) and I load the
 form which uses the plugin via an ajax call.
 The plugin works perfectly in FF and Safari, but in ie 67, it only
 shows a grey box at the bottom of the page.

 I've look through other comments here in the jquery groups, but the
 other resolutions don't apply to this instance.

 If I attach clockpick to an input box in the main page, it works no
 problem, so this only affects input boxes on a form retrieved through
 ajax in ie.

 I have included an alert so I know when the function is triggered.
 strangely, the alert triggers in FF but not in IE

 The things i've tried that didn't work are
 a) move the content of templateShifts function into the success:
 function
 b) put the clockpick.js and css into the ajax add.php form (this
 called all sorts of strange jquery errors in ie)
 c) putting just the clockpick css into the ajax add.php

 the code which calls the clockpick is
 [code]
 function getClicks(){$(.add).click(function(event) {
 var id = this.id;
 var posTop = event.pageY-100;
 var posLeft = event.pageX-200;
 var formID = #addForm;
 $.ajax({
 type: POST,
 url: add.php,
 data: id,
 success: function(response){
 $(formID).css({ position: 'absolute', top: posTop, left:
 posLeft });
 $(formID).fadeIn(slow).html(response);
 cancelForm(formID);
 templateShifts();

 }
 });
 });
 };

 function templateShifts(){
 alert('templateShifts')
 $(#startTime).clockpick(function(event){
 var posTop = event.pageY+340;
 var posLeft = event.pageX;

 $(#CP_hourcont).css({ position: 'absolute', top: posTop, left:
 posLeft });

 });
 $(#endTime).clockpick();
 $(.templateShift).click(function(){
 var id=this.id;
 var times_array=id.split(-);
 $(#startTime).val(times_array[0]);
 $(#endTime).val(times_array[1]);
 });

 };

 [/code]

 the code of the ajax(ed) from is
 [code]
 html

 head

 titleadd form/title

 /head

 body

 script type=text/javascript

 var uid = 79;

 var cid = ;

 var sid = 3;

 var date = 2008-02-04;

 var swapuid = ;

 /scriptadd a new 2008-02-04br /

 fieldset

 legend on 2008-02-04/legend Start Time: input
 name=inputStartTime type=text id=startTime

 End Time: input name=inputEndTime type=text id=endTime

 input type=hidden name=sid value=3 /

 input type=hidden name=uid value=79 /

 input type=hidden name=date value=2008-02-04 /

 input type=hidden name=f value=n /

 /fieldset

 Add Note (optional)br /

 textarea name=note rows=4 cols=20 /

 input type=submit value=submit //body

 /html

 [/code] 




[jQuery] Re: Selecting Descendents of This

2008-02-12 Thread Karl Rudd

Remember that, inside an event handler function (like 'click'), this
is a _raw_ DOM node.

To select the descendants you need to wrap it in a jQuery object:

$(.treeHeader).click(function(){
$(this).find(ul).toggle();
});

Or, in this case, you can use the raw this as the context:

$(.treeHeader).click(function(){
$(ul, this).toggle();
});

http://docs.jquery.com/Core/jQuery#expressioncontext

Karl Rudd

On Feb 13, 2008 9:14 AM, studiobl [EMAIL PROTECTED] wrote:

 I'm having trouble selecting descendents of this

 So, this works to initially hide uls:
 $(.treeHeader ul).toggle();

 But this doesn't work to toggle them:

 $(.treeHeader).click(function(){
 $(this + ul).toggle();
 });




[jQuery] VS 2008 HotFix improves jQuery intellisense

2008-02-12 Thread Jeffrey Kretz
http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-ho
t-fix-roll-up-available.aspx

 

For those of you who would be interested, the javascript intellisense tool
in VS 2008 (which was previously not compatible with jQuery AT ALL) has been
hotfixed (along with some other items).  So far as I know the HotFix applies
to both the Pro version and the free version (VS 2008 Web Developer).

 

I tested it and it worked pretty well.  $. pulled up a whole list of static
jQuery methods and $.fn. pulled up a whole list of jQuery functions.

 

It isn't smart enough to do intelliense for chaining (ie. $(document). will
NOT get you $.fn. intelliense), as javascript doesn't have strongly type
function returns, but it's a start.

 

Of course, I was personally tickled pink that an MSDN HotFix would
specifically address jQuery!

 

JK

 



[jQuery] Re: .html(val) not working properly in IE6 - suggestions?

2008-02-12 Thread Michael Geary

It's not really a question of IE6 liking that code or not. It's invalid
HTML, so all bets are off.

The real thing to mark for future reference should be:

http://validator.w3.org/

When things are acting strange, run your code through the validator. Valid
HTML will help you get more consistent results across browsers.

-Mike

 From: Slantedview
 
 Thanks for the response, though unfortunately it didn't work.
 
 So, after another 2 hours of debugging I found what the 
 problem was. I had a line in my HTML that apparently IE6 
 didn't like, and was preventing IE6 from properly wiping out 
 my div tag:
 
 a id=someId/
 
 That line wasn't even in my div tag, just somewhere else in 
 my page and IE didn't like it. Mark that one for future reference.
 
 jonathan



[jQuery] Re: div index

2008-02-12 Thread Feijó


I'm working with divs
When a image is clicked, I clone the first criteria, clear it, and 
append to the main div.

It goes to the bottom, its ok so far, no problem.
But, in some criteria, if in a combobox is selected a specific item, it 
will trigger the above clone code, know it need to insert bellow that 
criteria, not in the bottom!!
I had tested index() after I send my msg to the group, in some moments 
it bring a valid number aparently valid to my eq(), then I can use with 
after()

Tomorrow I will continue that study, maybe I'm in the right path :)

motob escreveu:

Can you post a little more info? Maybe some of your html code that
goes along with what jquery is working with? Are you trying to add a
new criteria text box to a search form when #new-criteria is clicked?
Are you working with table cells or divs?

On Feb 12, 3:14 pm, Feijó [EMAIL PROTECTED] wrote:
  

How can I get the index of one of my class? I'm reading all in docs.jquery.com 
and found nothing
$(#new-criteria).click(function(){
$last = $('#thefilter .qz-tablefield:eq(1)')
.clone(true);
  index= 1;// here, how to get the index of this?
$('#qz-criteria .qz-tablefield:eq('+index+')').after($last);
});
ThanksFeijó



[jQuery] Re: OT: FCK editor now double spaces with enter key?

2008-02-12 Thread Jack Killpatrick


I haven't used that rev, but happen to be looking at an older rev and 
there's a config setting for UseBROnCarriageReturn. Maybe that could get 
you going down the right path.


- Jack

Andy Matthews wrote:

We've been using FCK editor for a while now. It used to create a single
return when hitting the enter button. We recently upgraded to a newer
version (2.5 I think) and now it creates a double space instead.

Does anyone know if this is a setting that can be changed?


andy



  





[jQuery] Moving DIVs up/down

2008-02-12 Thread [EMAIL PROTECTED]

Hi,

Let's say I have a large DIV with class largeDiv and inside it, a
bunch of smaller DIVs, each with its own unique ID and class
smallDiv.  Given an arbitrary DIV with class smallDiv, if I want
it to switch places with the DIV immediately above it, how do I
achieve the switch?  Keep in mind that it may already be the top DIV
in the list.

Thanks, - Dave


[jQuery] Re: Determine if mouse is over a specific element

2008-02-12 Thread Alexandre Plennevaux

Hi debussy007,

see the tutorials section on events bubbling:

http://docs.jquery.com/Tutorials:AJAX_and_Events


example:
$(document).ready(function() {
 $('body').click(function(event) {
   if ($(event.target).is('h3')) {
 $(event.target).toggleClass('highlighted');
   }
 });
});


On Feb 13, 2008 12:12 AM, debussy007 [EMAIL PROTECTED] wrote:


 Hi,

 is it possible to know wether the mouse is over a specific element or not ?

 Thank you for any help !

 :thinking:
 --
 View this message in context: 
 http://www.nabble.com/Determine-if-mouse-is-over-a-specific-element-tp15445464s27240p15445464.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.





-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Determine if mouse is over a specific element

2008-02-12 Thread debussy007


Hi,

is it possible to know wether the mouse is over a specific element or not ?

Thank you for any help ! 

:thinking:
-- 
View this message in context: 
http://www.nabble.com/Determine-if-mouse-is-over-a-specific-element-tp15445464s27240p15445464.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Feed history/remote

2008-02-12 Thread Klaus Hartl

Hi Frizzle, I'm sorry to say that stuff like that is not supported...

--Klaus


On Feb 12, 8:20 pm, frizzle [EMAIL PROTECTED] wrote:
 Hi there,

 I was wondering if it's possible to directly feed History/Remote:
 say the hash is

     #/this_dir/another_dir/

 Then i'd like to load

     index.php?explore=/this_dir/another_dir/

 into

     div id=files/div

 So the hash would be the complete variable to load, also it wouldn't
 have to look for a certain ID or title in the document.
 I'm trying to find a decent way to keep history intact, but not reload
 the entire page..

 Hope it's kinda clear.

 Thanks,
 Frizzle.


[jQuery] Re: Counting DIVs with class x within a larger DIV

2008-02-12 Thread Karl Rudd

For all children (including grandchildren):

$('#data .x').length

For just children:

$('#data  .x').length

Karl Rudd

On Feb 13, 2008 9:07 AM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 Hi,

 Sure this is simple, still trying to get a handle on the basics of
 JQuery.  Given a DIV with id = data, how would I count the number of
 DIVs with class = x, within the larger DIV data?

 Thanks, - Dave



[jQuery] Re: Counting DIVs with class x within a larger DIV

2008-02-12 Thread Erik Beeson
Untested, but should work: $('#data .x').length

--Erik


On 2/12/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 Hi,

 Sure this is simple, still trying to get a handle on the basics of
 JQuery.  Given a DIV with id = data, how would I count the number of
 DIVs with class = x, within the larger DIV data?

 Thanks, - Dave



[jQuery] clock pick in ajax loaded form - ie error

2008-02-12 Thread pedalpete

I've been using the clockpick plugin (it's awesome) and I load the
form which uses the plugin via an ajax call.
The plugin works perfectly in FF and Safari, but in ie 67, it only
shows a grey box at the bottom of the page.

I've look through other comments here in the jquery groups, but the
other resolutions don't apply to this instance.

If I attach clockpick to an input box in the main page, it works no
problem, so this only affects input boxes on a form retrieved through
ajax in ie.

I have included an alert so I know when the function is triggered.
strangely, the alert triggers in FF but not in IE

The things i've tried that didn't work are
a) move the content of templateShifts function into the success:
function
b) put the clockpick.js and css into the ajax add.php form (this
called all sorts of strange jquery errors in ie)
c) putting just the clockpick css into the ajax add.php


the code which calls the clockpick is
[code]
function getClicks(){$(.add).click(function(event) {
var id = this.id;
var posTop = event.pageY-100;
var posLeft = event.pageX-200;
var formID = #addForm;
$.ajax({
type: POST,
url: add.php,
data: id,
success: function(response){
$(formID).css({ position: 'absolute', 
top: posTop, left:
posLeft });
$(formID).fadeIn(slow).html(response);
cancelForm(formID);
templateShifts();


}
});
});
};

function templateShifts(){
 alert('templateShifts')
$(#startTime).clockpick(function(event){
var posTop = event.pageY+340;
var posLeft = event.pageX;

$(#CP_hourcont).css({ position: 'absolute', 
top: posTop, left:
posLeft });

});
$(#endTime).clockpick();
$(.templateShift).click(function(){
var id=this.id;
var times_array=id.split(-);
$(#startTime).val(times_array[0]);
$(#endTime).val(times_array[1]);
});

};

[/code]

the code of the ajax(ed) from is
[code]
html

head

titleadd form/title



/head

body

script type=text/javascript

var uid = 79;

var cid = ;

var sid = 3;

var date = 2008-02-04;

var swapuid = ;

/scriptadd a new   2008-02-04br /

fieldset

legend on 2008-02-04/legend Start 
Time: input
name=inputStartTime type=text id=startTime



End Time: input name=inputEndTime 
type=text id=endTime



input type=hidden name=sid value=3 /

input type=hidden name=uid value=79 /

input type=hidden name=date 
value=2008-02-04 /

input type=hidden name=f value=n /

/fieldset



Add Note (optional)br /

textarea name=note rows=4 cols=20 /

input type=submit value=submit //body

/html

[/code]



[jQuery] Re: loading content from a remote file and appending it into DOM element

2008-02-12 Thread Smith, Allex

Warning... This may be a poor method, but it works:

// store the old content
var $old = $(#dataDiv).html();
// run your load function
$(#dataDiv).load(process_data.php?id=2,function(){
// prepend old content
$(this).prepend($old);
});

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2008 1:24 PM
To: jQuery (English)
Subject: [jQuery] loading content from a remote file and appending it
into DOM element



Hi,

I would like to load content from process_data.php?id=2 and then
append that data into the DIV with id=dataDiv, how would I do this? I
have seen the .load directive, but seems to erase any data previously
in the DOM element whereas I want to append on to what is already there.

Thanks for any help, - Dave


[jQuery] Counting DIVs with class x within a larger DIV

2008-02-12 Thread [EMAIL PROTECTED]

Hi,

Sure this is simple, still trying to get a handle on the basics of
JQuery.  Given a DIV with id = data, how would I count the number of
DIVs with class = x, within the larger DIV data?

Thanks, - Dave


[jQuery] Re: clock pick in ajax loaded form - ie error

2008-02-12 Thread Josh Nathanson


Do you have the latest release?  You will want to get 1.2.1.  I think there 
was an IE issue in earlier releases.


If you could post a link as well that would be helpful.

-- Josh


- Original Message - 
From: pedalpete [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Tuesday, February 12, 2008 1:49 PM
Subject: [jQuery] clock pick in ajax loaded form - ie error




I've been using the clockpick plugin (it's awesome) and I load the
form which uses the plugin via an ajax call.
The plugin works perfectly in FF and Safari, but in ie 67, it only
shows a grey box at the bottom of the page.

I've look through other comments here in the jquery groups, but the
other resolutions don't apply to this instance.

If I attach clockpick to an input box in the main page, it works no
problem, so this only affects input boxes on a form retrieved through
ajax in ie.

I have included an alert so I know when the function is triggered.
strangely, the alert triggers in FF but not in IE

The things i've tried that didn't work are
a) move the content of templateShifts function into the success:
function
b) put the clockpick.js and css into the ajax add.php form (this
called all sorts of strange jquery errors in ie)
c) putting just the clockpick css into the ajax add.php


the code which calls the clockpick is
[code]
function getClicks(){$(.add).click(function(event) {
var id = this.id;
var posTop = event.pageY-100;
var posLeft = event.pageX-200;
var formID = #addForm;
$.ajax({
type: POST,
url: add.php,
data: id,
success: function(response){
$(formID).css({ position: 'absolute', top: posTop, left:
posLeft });
$(formID).fadeIn(slow).html(response);
cancelForm(formID);
templateShifts();


}
});
});
};

function templateShifts(){
alert('templateShifts')
$(#startTime).clockpick(function(event){
var posTop = event.pageY+340;
var posLeft = event.pageX;

$(#CP_hourcont).css({ position: 'absolute', top: posTop, left:
posLeft });

});
$(#endTime).clockpick();
$(.templateShift).click(function(){
var id=this.id;
var times_array=id.split(-);
$(#startTime).val(times_array[0]);
$(#endTime).val(times_array[1]);
});

};

[/code]

the code of the ajax(ed) from is
[code]
html

head

titleadd form/title



/head

body

script type=text/javascript

var uid = 79;

var cid = ;

var sid = 3;

var date = 2008-02-04;

var swapuid = ;

/scriptadd a new 2008-02-04br /

fieldset

legend on 2008-02-04/legend Start Time: input
name=inputStartTime type=text id=startTime





End Time: input name=inputEndTime type=text id=endTime



input type=hidden name=sid value=3 /

input type=hidden name=uid value=79 /

input type=hidden name=date value=2008-02-04 /

input type=hidden name=f value=n /

/fieldset



Add Note (optional)br /

textarea name=note rows=4 cols=20 /

input type=submit value=submit //body

/html

[/code]





[jQuery] Re: Is it possible jQuery do similar actions width $(this) such as selectors like $(DIV A)

2008-02-12 Thread George

Further to the other responses... You can squeeze out a slight
performance boost by using the child selector or children() method.
(Most noticable when find() is faced with searching a deep DOM, or
perhaps when this search is one of many in a loop.)

Eg: $(this).children(DT) or $(this).find(DT) or $(DT,this)
(Not tested in latest version of jQuery 1.2.3, though I presume it
still makes a difference)

George

On Jan 22, 3:51 pm, mtest [EMAIL PROTECTED] wrote:
 Firstly, sorry for my english, but it's very important to me know the
 answer :).

 For example there is such a code:
 dl
 dtMenu/dt
 ddSubMenu1/dd
 ddSubMenu2/dd
 ddSubMenu3/dd
 /dl

 i call function:
 $(dl).bind(mouseover, function(){

 I get the object DL, witch now may to call like this or $
 (this):

 How I can get now DT or DD usingthis   ?

 I know that can do like $(DL DT)  or$(DL DD)?

 But now in$(this)I have yet selected DL

 How can i use this with selectors??

 $(this DT)  - not right

 $(this DT) - not right

 $(this DT) - not right

 How

 Please help me :)


[jQuery] overlaying jqModal over other divs

2008-02-12 Thread pere roca


 dear jquery list,

 here come again wondering if someone can give me a little clue to
what's going wrong when trying to overlay a draggable window (jqModal)
over another div (containing a map application).

 The problem is when you put the jqModal over the map and try to
interact with it; it zooms in and out and you cannot work with the
jqModal window. You can test it in
http://edit3.csic.es/edit_geo/prototype/symbologies.html

 using Firefox 2.0 you can interact fine with the jqModal outside the
map; using IE the window doesn't work properly but it lets you
interact fine over the map, without zooms when you select from the
form!

 Really don't understand what's wrong, I've checked everything.
 It's about CSS?
 It's about the div location on the HTML?
 Maybe should I create a function like: when jqModal div is over this
other div (the one contains the map), don't listen the map controls...

 Maybe any other alternative? another similar tool?
 
 thanks alot,
 Pere
-- 
View this message in context: 
http://www.nabble.com/overlaying-jqModal-over-other-divs-tp15441856s27240p15441856.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] OT: FCK editor now double spaces with enter key?

2008-02-12 Thread Andy Matthews

We've been using FCK editor for a while now. It used to create a single
return when hitting the enter button. We recently upgraded to a newer
version (2.5 I think) and now it creates a double space instead.

Does anyone know if this is a setting that can be changed?


andy




[jQuery] Re: [validate] Adding custom behaviours following validation

2008-02-12 Thread Jörn Zaefferer


kapowaz schrieb:

Excellent! That works nicely. The method names might benefit from
being a bit more obvious (and documented on docs.jquery.com?) though.
Pass and Fail come to mind.

  

Both are documented here: http://docs.jquery.com/Plugins/Validation/validate
pass/fail doesn't quite fit because there is also the success option, 
which explicitly adds highlighting for valid fields, where unhighlight 
just removes the highlighting for invalid fields. Its a bit quirky due 
to different requirements on different applications.


Thanks anyway for the suggestion, I'll keep that in mind for the 2.0 design.

Regards
Jörn


[jQuery] jQuery Image Swap Works in FF, not IE

2008-02-12 Thread Derek M.

Hi all,

I have a little jQuery function that toggles a window on click and
changes the background image of a span (to toggle an up/down arrow).
It works fine in FF, but in IE, it is delayed. For example, in IE, you
click once and the arrow stays the same (in the closed position). When
you click to close the toggled window (the 2nd click), the arrow
finally swaps to the down/toggled position, even though it's the 2nd
click and the window has now been closed. The arrow continues in this
off by one patten indefinitely, but only in IE. Any suggestions?
Here is the code:

$(document).ready(function() {
$('span.BodyCopy12jQuery').click(function() {
  var host = window.location.hostname;
  var currImage = $(this).css('backgroundImage');
  var id = $(this).attr('id');
  $('#faqAnswer' + id).toggle();
$(this).css({backgroundImage: currImage == 'url(http://' + host + '/
images/arrow_red_right.gif)' ? 'url(http://' + host + '/images/
arrow_red_down.gif
)' : 'url(http://' + host + '/images/arrow_red_right.gif)'});
  return false;
});

});

Thanks.


[jQuery] loading content from a remote file and appending it into DOM element

2008-02-12 Thread [EMAIL PROTECTED]

Hi,

I would like to load content from process_data.php?id=2 and then
append that data into the DIV with id=dataDiv, how would I do this?
I have seen the .load directive, but seems to erase any data
previously in the DOM element whereas I want to append on to what is
already there.

Thanks for any help, - Dave


[jQuery] Re: Some sort of template for displaying validation errors in a div using validation framework?

2008-02-12 Thread rickcr

I apologize, I found the answer to question1 below. It was in the
options documentation here:

http://docs.jquery.com/Plugins/Validation/validate#options

(There only seemed to be one link to those options from the docs page
in the validate method, and I kept missing it. As a small
recommendation, I'd mention in this link in the general guidelines
here http://docs.jquery.com/Plugins/Validation  since there is some
great stuff there in the options doc.)


On Feb 12, 10:10 am, rickcr [EMAIL PROTECTED] wrote:
 To possibly be more specific and to add one extra question:

 1) The bottom line is I want to display the messages defined in the
 messages section in an 'errorDiv' but I want to make sure the messages
 in the div shows up in a nice format (in a list.)  The docs mention
 using errorLabelContainer which I've tried, but all it does is dump
 them in the container, one after another, not broken up on each line
 (I can get around this by adding html to my messages section, but I
 don't think that's the correct way to do it.)  I've been looking at
 all the examles, and don't see an example of how this is done. The
 closest example I've seen is in form1 example 
 herehttp://jquery.bassistance.de/validate/demo/errorcontainer-demo.html,
 but even there the format of them is really poor. How do I get each
 message to show up correctly in some nice format, such as using an
 html list (without having to define each error message in the actual
 list, which the other example on that link above shows.

 2) Is there any way to create a dynamic 'check' for requires directly
 in the rules section? For example, possibly a boolean was set earlier
 on isAdmin. I'd now like a way to say:

 someField: {
 required: true if isAdmin,
 minLength: 4

 }

 On Feb 11, 8:16 pm, rickcr [EMAIL PROTECTED] wrote:

  I'm using the very nice jquery validator for my forms, but I have,
  what hopefully is a simple question.

  I like being able to defined all the error messages in the initial
  messages section in the jQuery setup:

  [CODE]
  messages: {
  firstName: Please enter your firstnamebr/,
  userName: {
 required: Please enter a usernamebr/,
 minLength: Your username must consist of at least 4
  charactersbr/
  }}

  [/CODE]

  I'm then setting the error label container:

  [CODE]
  errorLabelContainer: $(.errorContainer),
  [/CODE]

  What I'd like to avoid though is having to use the br/ tags like I'm
  using and provide a way to have some sort of template in my
  errorContainer div or, at the least a set type of style wrapper around
  each error message that I can customize (maybe have it default to
  li{theMessage}/li ? I'd also like a title in my div... Please fix
  the following errors...

  I know I can go and declare all the error messages in the div in a
  list and not use the inline javascript style, but I like the
  flexibility offered me by using the messages section in the
  javascript. This way if I decide to display the errors inline next to
  the offending field, it's an easy switch.


[jQuery] Problem on IE with jqModal

2008-02-12 Thread eyal

Hello!
I'm using jqModal on my website. When It's running on Firefox it works
great but when it's on IE it's looks like the screenshot attached to
this message.

http://www.nabble.com/file/p15433219/screenshot.jpg

How can I solve that?
(I'm using the latest IE version - IE7)

Thanks!
Eyal


[jQuery] Re: Is it possible to send javascript vars TO a jquery function??

2008-02-12 Thread cbmtrx

Just rediscovered the beauty of thickbox: http://jquery.com/demo/thickbox/

This might be all I need, and with some added pizazz courtesy of
jquery!


On Feb 12, 10:04 am, cbmtrx [EMAIL PROTECTED] wrote:
 Thanks Tim, but I'm actually trying to pass variables the *other*
 direction.

 I have many divs on a page, and I need some mechanism of toggling
 these from different links and buttons within the page. There is no
 predictable parent-child relationship to these divs. What I was hoping
 to do was to use a similar approach to the existing javascript
 function, but using jquery's library of functions.

 lihao's example is probably the closest thing to what I'm looking for,
 but it seems overly complex for a function that javascript can
 accomplish by itself in 2 lines.

 After doing some different tests (based on many of the recommendations
 here), I've come to the conclusion that the only way to maintain a
 truly simple structure would be by somehow nesting a function within
 jquery OR nesting jquery inside a javascript function (I don't know if
 either of these is possible).

 Below is NOT real code, but it's what I would think SHOULD be possible
 with jquery (or some variant)...I just don't know the syntax well
 enough yet:

 function toggleDialog(oldscreen, newscreen) {

 $(function() {

 $(.toggle).click(function() {
 $(oldscreen).toggle(); //Click 1=Hide; Click 2=Show...etc
 $(newscreen).toggle(); //Inverse of above...etc
 return false;
 });

 });

 }

 To explain: The javascript function receives the two vars from the DOM
 element (could be a link, a form button, anything!), which are thenused by 
 jquery to identify which elements are to be affected. That

 way, jquery doesn't need to care which element triggered something, it
 will simply just toggle the element to the next state (on or off).

 So my HTML would look like this:

 !--ONE--
 div id=oldscreen1
 a href=javascript:toggleDialog('oldscreen1','newscreen1');
 class=toggleOpen 1/a
 /div

 div id=newscreen1
 form
 New page content 1
 input type=button value=Close class=toggle
 onclick=javascript:toggleDialog('newscreen1','oldscreen1'); /
 /form
 /div

 !--TWO--
 div id=oldscreen2
 a href=javascript:toggleDialog('oldscreen2','newscreen2');
 class=toggleOpen 2/a
 a href=javascript:toggleDialog('oldscreen2','newscreen3');
 class=toggleOpen 3/a
 a href=javascript:toggleDialog('oldscreen2','newscreen4');
 class=toggleOpen 4/a
 /div

 div id=newscreen2
 form
 New page content 2
 input type=button value=Close class=toggle
 onclick=javascript:toggleDialog('newscreen2','oldscreen2'); /
 /form
 /div

 div id=newscreen3
 form
 New page content 3
 input type=button value=Close class=toggle
 onclick=javascript:toggleDialog('newscreen3','oldscreen2'); /
 /form
 /div

 div id=newscreen4
 form
 New page content 4
 input type=button value=Close class=toggle
 onclick=javascript:toggleDialog('newscreen4','oldscreen2'); /
 /form
 /div

 Using javascript this is *a piece of cake* to pull off, so my question
 is, can this be done with jquery just as easily? Or am I really
 looking at having to use something more verbose like lihao's
 suggestion?

 Thanks, everyone, for your help so far :)

 Emlyn

 On Feb 10, 9:04 pm, Timothee Groleau [EMAIL PROTECTED]
 wrote:

  On Fri, 2008-02-08 at 08:11 -0800, cbmtrx wrote:
   I've just barely started getting my feet wet with jquery, so please
   bear with this novice's question...

   With a javascript function you can accept vars like this:

   function doSomething(number, name) {
   //Do something with them
   }

   From an href in the HTML like this:
   a href=javascript:doSomething('1234','john');Click me/a

   [...]

   Any suggestions?

  If you are able to change your function 'doSomething' a little bit, you
  may also use the jQuery method 'bind' to have custom parameters passed
  with the event. For example:

  ==
  function doSomething(evt)
  {
  var num = evt.data.num;
  var name = evt.data.name;

  // do whatever

  }

  $(a.link1).bind(click, {num:1234, name:'john'}, doSomething);
  $(a.link2).bind(click, {num:4567, name:'harry'}, doSomething);
  $(a.link3).bind(click, {num:8912, name:'dick'}, doSomething);
  ==

  if you want it less verbose, you can use an array as your data
  parameter:

  ==
  function doSomething(evt)
  {
  var num = evt.data[0];
  var name = evt.data[1];

  // do whatever

  }

  $(a.link1).bind(click, [1234, 'john'], doSomething);
  $(a.link2).bind(click, [4567, 'harry'], doSomething);
  $(a.link3).bind(click, [8912, 'dick'], doSomething);
  ==

  Tim.


[jQuery] Re: Form Plugin: sender

2008-02-12 Thread Jerome Jaglale

Wonderful! Thank you Mike!

On Feb 12, 5:23 am, Mike Alsup [EMAIL PROTECTED] wrote:
 The form (wrapped in a jQuery object) is passed to your success callback:

 $('.inlineForm').ajaxForm({dataType:'json', success:process});

 function process(data, status, $form) {
 // do stuff

 }

 Mike

 On Feb 11, 2008 7:07 PM, Jerome Jaglale [EMAIL PROTECTED] wrote:



  I have a page with several forms, some of them being ajax-submitted
  with the Form Plugin:

  $('.inlineForm').ajaxForm({dataType:'json', success:process});

  Is there a way I can get a reference to the form which has been
  submitted? (from the success function for example)


[jQuery] [validate] spinner - loading

2008-02-12 Thread Josoroma

Hi!

Thanks for all your help with validate plugin, my last questions ara
about:

#1 The way of showing a spinner or loading gif while the remote
validation is asking for data?

#2 (remote ajax call to know if user exist)The remote ajax call is
executed each time a wrote a character, can i do something to call the
remote validation only when the user is out of the input or when the
user click some kind of button next to the input field to check if
user exist?


Here is the code that im actually using:

script type=text/javascript


$().ready(function() {

// add * to required field labels
$(div.required 
label).append(nbsp;strongfont color=
\#FF\*/font/strongnbsp;);


jQuery.validator.addMethod(specialAlphaNumeric,
function( value, element ) {
var result = 
this.optional(element) || value.length = 2  /
^([A-Z0-9áéíóúüçìñ.,\'_\- ]+)$/i.test(value);
return result;
}, Puede contener espacios, tener al 
menos dos y cualquiera de
los siguientes carácteres: [a-z][0-9][áéíóúüçìñ.,\'_-]);


jQuery.validator.addMethod(alphaNumeric, function( value,
element ) {
var result = 
this.optional(element) || value.length = 2  /^[A-
Z]([A-Z0-9]+)$/i.test(value);
return result;
}, Debe empezar con una letra, tener 
al menos dos y cualquiera
de los siguientes carácteres: [a-z][0-9]);

$(#UserRegisterForm).validate({


});

});

/script


[jQuery] Re: Reading in the contents of a file.

2008-02-12 Thread tstrokes

Well I did find this example:http://alex.dojotoolkit.org/?p=532.
I'm not a big fan of dojo so I was wondering if you could do anything
like
this in jQuery.
--tstrokes

On Feb 11, 9:32 pm, alfredwesterveld [EMAIL PROTECTED]
wrote:
 This can't be done with javascript (client-side) because javascript
 can't read/write to files. You can do this server-side with for
 example PHP.

 On Feb 11, 11:41 pm, tstrokes [EMAIL PROTECTED] wrote:

  Is there a way to get the contents of a file without actually
  uploading the it?

  Example: I just need the contents not the actual file. I need to parse
  the contents of
  a file on the fly and display it to the user. Thanks for any help.
  --tstrokes


[jQuery] Re: Newbie question about Radio Buttons

2008-02-12 Thread PKJ

Hi everyone,

I found one way to do this, and it is only a few lines.  This is my
first use of JQuery so can anyone comment on whether there is a better
way?

script type=text/javascript
$(document).ready(function() {
$(input:radio).click(function() {
thisClass = $(this).attr(class);
$(. + thisClass).filter(:radio).attr('checked', false);
$(this).attr('checked', true);
});
})
/script

form
table
tr
tdinput type=radio name=row1 value=row1col1
class=q123col1/td
tdinput type=radio name=row1 value=row1col2
class=q123col2/td
tdinput type=radio name=row1 value=row1col3
class=q123col3/td
/tr
tr
tdinput type=radio name=row2 value=row2col1
class=q123col1/td
tdinput type=radio name=row2 value=row2col2
class=q123col2/td
tdinput type=radio name=row2 value=row2col3
class=q123col3/td
/tr
tr
tdinput type=radio name=row3 value=row3col1
class=q123col1/td
tdinput type=radio name=row3 value=row3col2
class=q123col2/td
tdinput type=radio name=row3 value=row3col3
class=q123col3/td
/tr
/table
/form

Thanks

PKJ


[jQuery] Re: Can we detect whether images are turned off?

2008-02-12 Thread [EMAIL PROTECTED]

It works perfectly!
Thank you very much for your explanation, Richard. I'm learning loads!
Cherry :)

On Feb 12, 10:13 am, Richard D. Worth [EMAIL PROTECTED] wrote:

 If you're interested, here's the equivalent in jQuery:

 $('img src=http://www.google.com/intl/en_ALL/images/logo.gif'+ '#' +
 Math.random() + '/').load(function() {
   alert('images are on');

 });

 I've used a random hash, and a simple alert (which you would replace with a
 function to load a stylesheet dynamically).

 - Richard


[jQuery] Re: Determine if mouse is over a specific element

2008-02-12 Thread Smith, Allex

$('#element').mouseover(function(){
alert('Hover!');
});

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of debussy007
Sent: Tuesday, February 12, 2008 3:13 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Determine if mouse is over a specific element




Hi,

is it possible to know wether the mouse is over a specific element or
not ?

Thank you for any help ! 

:thinking:
-- 
View this message in context:
http://www.nabble.com/Determine-if-mouse-is-over-a-specific-element-tp15
445464s27240p15445464.html
Sent from the jQuery General Discussion mailing list archive at
Nabble.com.



[jQuery] [treeview] How to force a branch open.

2008-02-12 Thread sozzi

I love the plugin and it does its job perfectly. Especially the
persist: location trigger makes my life so much easier. But I don't
quite know how to open a branch in reverse.
I.e. I use it for navigation and it works all the way down to the
category level using persist:location. But on the single entry pages
the URL is different. I know the catergory (i.e lowest branch) the
page belongs to and I can even set that branch to class=selected.
Unfortunately the tree remains closed.

The question is how can I make sure all the parent branches will open
if a lower branch is set to selected? Is there a trigger to force a
reverse evaluation or somesuch?


[jQuery] Feed history/remote

2008-02-12 Thread frizzle

Hi there,

I was wondering if it's possible to directly feed History/Remote:
say the hash is

#/this_dir/another_dir/

Then i'd like to load

index.php?explore=/this_dir/another_dir/

into

div id=files/div

So the hash would be the complete variable to load, also it wouldn't
have to look for a certain ID or title in the document.
I'm trying to find a decent way to keep history intact, but not reload
the entire page..

Hope it's kinda clear.

Thanks,
Frizzle.


[jQuery] Re: Help With Modifying Treeview

2008-02-12 Thread Jörn Zaefferer


studiobl schrieb:

I'm trying to modify treeview.  I want to eliminate the plus and minus
boxes, and use the section labels as hit areas. A tree of two main
sections would just be Section One and Section Two.  Clicking on
either one of these would expand it, and clicking a second time would
collapse it.

I can see where the div that acts as the hitarea is created in the
script.  I'm having trouble transferring the hitarea functionality to
the anchor that serves as the section label. I don't have to transfer
it to the anchor, just something that would provide the functionality
described.
  
If that is all you need, just writing the stuff from scratch could yield 
a result with may less trouble. Just use jQuery to assign a click 
handler to the label and hide the nested elements. Something like this:


$(.label).click(function() {
 $(this).next().toggle();
});

Jörn


[jQuery] Re: question on determining scrollTop delta after onscroll

2008-02-12 Thread Karl Swedberg


If you're talking about the browser scrollbars, I'm not sure how to  
listen for someone clicking on them.


But if you can figure that part out, you can use the scrollTop  
property of a DOM element before and after the click.


Note, while it works in FF and IE, I'm not sure what it does in Safari  
(haven't tested it). From Mozilla Developer Center:


scrollTop is part of the MSIE's DHTML object model. scrollTop is not  
part of any W3C specification or technical recommendation.


http://developer.mozilla.org/en/docs/DOM:element.scrollTop


// before click
var before = $('#id1')[0].scrollTop;

// after click
var after = $('#id1')[0].scrollTop;
var diff = after - before;

something like that
--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Feb 12, 2008, at 12:47 AM, edward wrote:



I am trying to find a reliable way to determine how many pixels the
scroll bar has moved when the user clicks on the scroll up/down
buttons. It seems to be different on every browser and even different
on the same browser on different operating systems. Ideally what I
would like is a way to either set this value or to determine what it
is. My goal is to map the scroll movements from one div onto another
such that each up/down click on the first div translates into a
specific delta on the second div that I define. Any help would be
greatly appreciated!




[jQuery] Re: Updated API browser

2008-02-12 Thread Alexandre Plennevaux

it's very neat! would be nice to turn it into an AIR applicaiton, that
runs on my desktop as an app available offline.

another suggestion: provide a way to add comments a la php doc ?
Always found it super useful

On Feb 12, 2008 3:30 PM, Remy Sharp [EMAIL PROTECTED] wrote:

 Hi all,

 Ever since jQuery 1.1.3 the old API browser hasn't been updated due to
 incompatibilities in the documentation (though that's mostly
 assumptions). Although the new docs is comprehensive, I've always
 liked the quick access the old API browser gave.

 As such, I've got about my own way re-building an API browser based on
 the new documentation (and assuming the documentation stays in the
 wiki format, it should be easier to support upgraded documentation).

 http://remysharp.com/jquery-api/

 The API can be accessed either through live searching or directly on
 the URL, e.g:

 http://remysharp.com/jquery-api/bind/

 Love to hear any feedback, etc.

 The original post is here: http://remysharp.com/2008/02/12/jquery-api-browser/

 Cheers,

 Remy.




-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: Uploader 0.9 beta

2008-02-12 Thread Alexandre Plennevaux

hi guys,

just wanted to point you to my personal efforts in improving
jquploader. It's far less advanced but i'm taking another approach:
super hyper easy for mum interface, because i've yet to come across
a client that needs multiple file upload at once - manage upload
queue stuff. The requests i get are more of the i'm not a nerd and i
don't plan to be so don't make me think interface stuff

You can see the alpha here. http://www.pixeline.be/experiments/jqUploader/v2/

I would definitely need help _ i'm not using swfupload code at all.

Maybe jquery can benefit from having 2 uploader plugins, that address
different needs instead of 10 that ultimately do the same thing.


HTH

Alexandre

On Feb 12, 2008 4:57 PM, Benjamin Sterling
[EMAIL PROTECTED] wrote:

 
  The third example, uses sessions and forms. So the form is validated,
  and the uploaded files are placed in a session object.


 Hmmm...  Not entirely sure how that would work.  I will do some test
 tonight to see exactly how you are doing things.  Can't picture how I would
 hook into a process that was started under a different page.  (Assuming
 the plugin work similiar to swfupload)


 I like Dan's suggestion also, have a total progress bar would be a really
 nice touch and would be business class IMO.

 Let me know if you need any help with anything.



 On 2/12/08, Dan G. Switzer, II [EMAIL PROTECTED] wrote:
 
  I'd love to see an example that has a combined multi-file progress bar.
  Something that shows two progress bars--one for the current file and
 another
  for the total upload process.
 
  I think this is a common implementation and an example would make it clear
  that it's possible to do.
 
  -Dan
 
  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of Cloudream
  Sent: Monday, February 11, 2008 8:35 AM
  To: jQuery (English)
  Subject: [jQuery] Re: Uploader 0.9 beta
  
  
  Nice work.
  
  Is there any documents? I think i can write an asp (server) demo for
  other developers.
  
  On Feb 11, 3:37 pm, Gilles (Webunity) [EMAIL PROTECTED] wrote:
   Well it is almost finished, my Flash-based file uploader for jQuery.
   The docs are finished, and the widget itself also. Originally intended
   to be a part of UI, but since it has no real connection to UI
   (dependencies and so on) i have decided to release it as a standalone
   plugin.
  
   Most of you have seen the demo allready but here it is
  again.http://uploader.webunity.nl/
  
   Originally based upon swfupload, but based on a really old version of
   swfupload. The version i based the uploader on had:
   - no callbacks for dialog open/dialog hide
   - no multiple file selection masks
   - no filesize limit pre-upload
  
   I've build all these things into my version, and now they released a
   new version which also has that... (hmmm)
   Anyway, since i based my version on theirs it is only fair that they
   also gather ideas from other sources.
  
   Let me know if you run into any bugs and i'll try to add the code to
   SVN later this week.
 
 




 --
 Benjamin Sterling
 http://www.KenzoMedia.com
  http://www.KenzoHosting.com
 http://www.benjaminsterling.com


[jQuery] Re: help,about the selectors

2008-02-12 Thread Karl Swedberg



hi zero,

try this...

 var compenonts= $('Components  Component', response);



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



On Feb 12, 2008, at 10:30 AM, zero args wrote:


my code:
$.ajax({
  url: test.do,
  dataType: xml,
  success:paint
});
var paint = function(response){
  var compenonts= $(response).find(Component); // what expression  
should be here??

  compenonts.each(function(index, compenont_ele){
  var compenont = $(compenont_ele);
  var name= compenont.attr(name);
  alert(name);
   });
}
I expect alert : a、b、c、d
but actually alert : a、b、c、c1、c2、d



test.do wil return :
Components
   Component name=a /
   Component name=b /
   Component name=c 
   children name=c.children 
Component name=c1 
Component name=c2 
 ...
   /children
   /Component
   Component name=d /
/Components





[jQuery] Re: Uploader 0.9 beta

2008-02-12 Thread Benjamin Sterling


 The third example, uses sessions and forms. So the form is validated,
 and the uploaded files are placed in a session object.


Hmmm...  Not entirely sure how that would work.  I will do some test
tonight to see exactly how you are doing things.  Can't picture how I would
hook into a process that was started under a different page.  (Assuming
the plugin work similiar to swfupload)


I like Dan's suggestion also, have a total progress bar would be a really
nice touch and would be business class IMO.

Let me know if you need any help with anything.

On 2/12/08, Dan G. Switzer, II [EMAIL PROTECTED] wrote:


 I'd love to see an example that has a combined multi-file progress bar.
 Something that shows two progress bars--one for the current file and
 another
 for the total upload process.

 I think this is a common implementation and an example would make it clear
 that it's possible to do.

 -Dan

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Cloudream
 Sent: Monday, February 11, 2008 8:35 AM
 To: jQuery (English)
 Subject: [jQuery] Re: Uploader 0.9 beta
 
 
 Nice work.
 
 Is there any documents? I think i can write an asp (server) demo for
 other developers.
 
 On Feb 11, 3:37 pm, Gilles (Webunity) [EMAIL PROTECTED] wrote:
  Well it is almost finished, my Flash-based file uploader for jQuery.
  The docs are finished, and the widget itself also. Originally intended
  to be a part of UI, but since it has no real connection to UI
  (dependencies and so on) i have decided to release it as a standalone
  plugin.
 
  Most of you have seen the demo allready but here it is
 again.http://uploader.webunity.nl/
 
  Originally based upon swfupload, but based on a really old version of
  swfupload. The version i based the uploader on had:
  - no callbacks for dialog open/dialog hide
  - no multiple file selection masks
  - no filesize limit pre-upload
 
  I've build all these things into my version, and now they released a
  new version which also has that... (hmmm)
  Anyway, since i based my version on theirs it is only fair that they
  also gather ideas from other sources.
 
  Let me know if you run into any bugs and i'll try to add the code to
  SVN later this week.




-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com


[jQuery] Re: jQuery.SerialScroll

2008-02-12 Thread Ariel Flesler

Hi Feed, thanks.

The plugin has an option called 'cycle' which is similar but not equal
to jCarousel's option.
The first and third examples have it activated, the scrollshow
doesn't.
It won't just go on endlessly, instead it will return once it goes
over the limit. This approach seems cleaner for this case, as the
items are not just urls, but actual dom elements created by the user
of the plugin. It would require to move the nodes back and forth (and
that would alter the scroll), or clone them which is a bad idea.

Thanks and please let me know of any feature you come up with. You can
add a feature request too.

Cheers

Ariel Flesler

On 12 feb, 12:23, Feed [EMAIL PROTECTED] wrote:
 Awesome Ariel, thanks for yet another great plugin.

 I have a request though: can you add an option to make it
 circular (like jCarousel)?


[jQuery] Re: in IE, cannot copy from draggable modal layer

2008-02-12 Thread asle

I also have the same problem but also in Firefox. I cannot set a
handle. The whole div is draggable and I cannot select text even
though I have a handle property. Tried to upgrader to jquery 1.1.3
but no help.

On Feb 11, 3:09 pm, Schmitt [EMAIL PROTECTED] wrote:
 Hi, we have a draggable form overlay where it is desirable that the user can
 copy stuff from the modal layer. However in IE7 this is not possible. If I
 comment out the $('id').Draggable part the text can then be copied.
 Searching has brought no results, does anyone have a solution or suggestion?
 --
 View this message in 
 context:http://www.nabble.com/in-IE%2C-cannot-copy-from-draggable-modal-layer...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] onclick to page

2008-02-12 Thread Michael

Hi, I'm trying to fade out my page using jQuery, by clicking on one
link. This link links to a php script that changes the stylesheet, but
what I want to achieve is when the user clicks 'change css' the page
fades out, once this is done the pages goes to my php script, the
script changes the stylesheet and then goes back to the previous page
with the new style sheet and fades back in.

You can see my working example here: 
http://www.aber.ac.uk/designstudio/mike/style/
As you can see clicking on the body envokes the js, how can I get the
fade in and fade out to work only on the 'Change CSS' link?


[jQuery] [validate] Re: Some sort of template for displaying validation errors in a div using validation framework?

2008-02-12 Thread rickcr

To possibly be more specific and to add one extra question:

1) The bottom line is I want to display the messages defined in the
messages section in an 'errorDiv' but I want to make sure the messages
in the div shows up in a nice format (in a list.)  The docs mention
using errorLabelContainer which I've tried, but all it does is dump
them in the container, one after another, not broken up on each line
(I can get around this by adding html to my messages section, but I
don't think that's the correct way to do it.)  I've been looking at
all the examles, and don't see an example of how this is done. The
closest example I've seen is in form1 example here
http://jquery.bassistance.de/validate/demo/errorcontainer-demo.html,
but even there the format of them is really poor. How do I get each
message to show up correctly in some nice format, such as using an
html list (without having to define each error message in the actual
list, which the other example on that link above shows.

2) Is there any way to create a dynamic 'check' for requires directly
in the rules section? For example, possibly a boolean was set earlier
on isAdmin. I'd now like a way to say:

someField: {
required: true if isAdmin,
minLength: 4
}



On Feb 11, 8:16 pm, rickcr [EMAIL PROTECTED] wrote:
 I'm using the very nice jquery validator for my forms, but I have,
 what hopefully is a simple question.

 I like being able to defined all the error messages in the initial
 messages section in the jQuery setup:

 [CODE]
 messages: {
 firstName: Please enter your firstnamebr/,
 userName: {
required: Please enter a usernamebr/,
minLength: Your username must consist of at least 4
 charactersbr/
 }}

 [/CODE]

 I'm then setting the error label container:

 [CODE]
 errorLabelContainer: $(.errorContainer),
 [/CODE]

 What I'd like to avoid though is having to use the br/ tags like I'm
 using and provide a way to have some sort of template in my
 errorContainer div or, at the least a set type of style wrapper around
 each error message that I can customize (maybe have it default to
 li{theMessage}/li ? I'd also like a title in my div... Please fix
 the following errors...

 I know I can go and declare all the error messages in the div in a
 list and not use the inline javascript style, but I like the
 flexibility offered me by using the messages section in the
 javascript. This way if I decide to display the errors inline next to
 the offending field, it's an easy switch.


[jQuery] Re: Is it possible to send javascript vars TO a jquery function??

2008-02-12 Thread cbmtrx

Thanks Tim, but I'm actually trying to pass variables the *other*
direction.

I have many divs on a page, and I need some mechanism of toggling
these from different links and buttons within the page. There is no
predictable parent-child relationship to these divs. What I was hoping
to do was to use a similar approach to the existing javascript
function, but using jquery's library of functions.

lihao's example is probably the closest thing to what I'm looking for,
but it seems overly complex for a function that javascript can
accomplish by itself in 2 lines.

After doing some different tests (based on many of the recommendations
here), I've come to the conclusion that the only way to maintain a
truly simple structure would be by somehow nesting a function within
jquery OR nesting jquery inside a javascript function (I don't know if
either of these is possible).

Below is NOT real code, but it's what I would think SHOULD be possible
with jquery (or some variant)...I just don't know the syntax well
enough yet:

function toggleDialog(oldscreen, newscreen) {

$(function() {

$(.toggle).click(function() {
$(oldscreen).toggle(); //Click 1=Hide; Click 2=Show...etc
$(newscreen).toggle(); //Inverse of above...etc
return false;
});

});

}

To explain: The javascript function receives the two vars from the DOM
element (could be a link, a form button, anything!), which are then
used by jquery to identify which elements are to be affected. That
way, jquery doesn't need to care which element triggered something, it
will simply just toggle the element to the next state (on or off).

So my HTML would look like this:

!--ONE--
div id=oldscreen1
a href=javascript:toggleDialog('oldscreen1','newscreen1');
class=toggleOpen 1/a
/div

div id=newscreen1
form
New page content 1
input type=button value=Close class=toggle
onclick=javascript:toggleDialog('newscreen1','oldscreen1'); /
/form
/div


!--TWO--
div id=oldscreen2
a href=javascript:toggleDialog('oldscreen2','newscreen2');
class=toggleOpen 2/a
a href=javascript:toggleDialog('oldscreen2','newscreen3');
class=toggleOpen 3/a
a href=javascript:toggleDialog('oldscreen2','newscreen4');
class=toggleOpen 4/a
/div

div id=newscreen2
form
New page content 2
input type=button value=Close class=toggle
onclick=javascript:toggleDialog('newscreen2','oldscreen2'); /
/form
/div

div id=newscreen3
form
New page content 3
input type=button value=Close class=toggle
onclick=javascript:toggleDialog('newscreen3','oldscreen2'); /
/form
/div

div id=newscreen4
form
New page content 4
input type=button value=Close class=toggle
onclick=javascript:toggleDialog('newscreen4','oldscreen2'); /
/form
/div


Using javascript this is *a piece of cake* to pull off, so my question
is, can this be done with jquery just as easily? Or am I really
looking at having to use something more verbose like lihao's
suggestion?

Thanks, everyone, for your help so far :)

Emlyn



On Feb 10, 9:04 pm, Timothee Groleau [EMAIL PROTECTED]
wrote:
 On Fri, 2008-02-08 at 08:11 -0800, cbmtrx wrote:
  I've just barely started getting my feet wet with jquery, so please
  bear with this novice's question...

  With a javascript function you can accept vars like this:

  function doSomething(number, name) {
  //Do something with them
  }

  From an href in the HTML like this:
  a href=javascript:doSomething('1234','john');Click me/a

  [...]

  Any suggestions?

 If you are able to change your function 'doSomething' a little bit, you
 may also use the jQuery method 'bind' to have custom parameters passed
 with the event. For example:

 ==
 function doSomething(evt)
 {
 var num = evt.data.num;
 var name = evt.data.name;

 // do whatever

 }

 $(a.link1).bind(click, {num:1234, name:'john'}, doSomething);
 $(a.link2).bind(click, {num:4567, name:'harry'}, doSomething);
 $(a.link3).bind(click, {num:8912, name:'dick'}, doSomething);
 ==

 if you want it less verbose, you can use an array as your data
 parameter:

 ==
 function doSomething(evt)
 {
 var num = evt.data[0];
 var name = evt.data[1];

 // do whatever

 }

 $(a.link1).bind(click, [1234, 'john'], doSomething);
 $(a.link2).bind(click, [4567, 'harry'], doSomething);
 $(a.link3).bind(click, [8912, 'dick'], doSomething);
 ==

 Tim.


[jQuery] Re: [validate] Adding custom behaviours following validation

2008-02-12 Thread kapowaz

Excellent! That works nicely. The method names might benefit from
being a bit more obvious (and documented on docs.jquery.com?) though.
Pass and Fail come to mind.


[jQuery] Re: localScroll Problem

2008-02-12 Thread George GSGD

It would certainly help track down the problem if you listed which
plugins you're using. Only thing I can see from what's been posted so
far is that you've got E.easing[...]. What're you using the E object
for? It's telling you it can't find the easing function in E.easing

On Feb 12, 12:49 pm, Sebastián V. Würtz [EMAIL PROTECTED]
wrote:
 Ariel Flesler escribió:

  Hi Sebastian, that seems to be ScrollTo, not LocalScroll.
  The error you get is quite common and is related (obviously) to
  easing.
  Is that your full code ? aren't you specifying an easing equation ?
  have you added the easing plugin ?

  Do you have a demo of it ? so I can check.
  Cheers

  Ariel Flesler

  On 12 feb, 09:58, Sebastián V. Würtz [EMAIL PROTECTED] wrote:

  im trying to use the localScroll pluginh in many ways :)
  but i receive this error when i click

  $(#comentar).click(function(){
  $.scrollTo( '-=900', 300 );
  return false;
  });

  E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
  is not a function
  E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
  is not a function
  E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
  is not a function
  E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
  is not a function

  (latest lib for all)

 im using a lot of jquery scripts in one new proyect, for now i cant
 upload all because have a big database, is a news system, btw im not
 using easing plugin, but i try with it and still the same, im so close
 to finish with it so i have many many questions :)

 thx for now


[jQuery] How to select last leaf of a tree?

2008-02-12 Thread Matias

Hi,

I have an unordered list like this
ul
  liItem 1/li
  ul
   liItem 1.1/li
   ul
   liItem 1.1.1/li
   /ul
  /ul
  liItem 2/li
  ul
   liItem 2.1/li
  /ul
  liItem 3/li
/ul

and I want to select only the leaf nodes (in this example namely Item
1.1.1, Item 2.1 and Item 3)

I was wondering if there was an easy way to use jQuery selectors to
perform such selection? What would be the simplest way to do it?

I'm able to do the selection with a combination of selectors and
javascript in callbacks, but as I'm always willing to develop my
skills, I thought I ask the gurus.

Thank you.


[jQuery] Re: controlling li-items with unique IDs and trigger corresponding DIVs

2008-02-12 Thread Klaus Hartl

On Feb 12, 2:37 pm, schnuck [EMAIL PROTECTED] wrote:
 hi guys,

 hope someone can give me a hint for this. if i had an unordered list
 as shown below, where the li-items had unique IDs - is there any way
 that we check which li-items has been clicked so depending on that, we
 could show/animate a corresponding, unique DIV (each li-items would
 have its own corresponding DIV)? these DIVs would be preloaded and
 hidden via CSS somewhere on the page.

 ul
         li id=link1Lorem ipsum dolor/li
         li id=link2Lorem ipsum dolor/li
         li id=link2Lorem ipsum dolor/li
         li id=link3Lorem ipsum dolor/li
         li id=link4Lorem ipsum dolor/li
 /ul

 or do the li-items need to go into HREFs to accomplish this?

 i know this might be very simply to solve, but i just can;t figure it
 out. any help very appreciated.

 many thanks.

Try (assuming the corresponding divs had the id div1, div2, etc.):

$('li[id^=link]').click(function() {
$('#' + this.id.replace('link', 'div')).show();
});

If you'd like to have some better graceful degradation, I suggest
using anchor elements that point to the corresponding divs:

ul
lia href=#div1Lorem ipsum dolor/a/li
...
/ul

with a script like:

$('li a[id*=#div]').click(function() {
$(this.hash).show();
return false;
});

You can even have some pure CSS fun with such HTML and the :target
selector... even without javascript it'll work somehow in browsers
that support it. Example:

#div1 {
display: none;
}
#div1:target {
display: block;
}

(Note to myself: work that into Tabs).


--Klaus


[jQuery] Re: jQuery.SerialScroll

2008-02-12 Thread Feed

Awesome Ariel, thanks for yet another great plugin.

I have a request though: can you add an option to make it
circular (like jCarousel)?


[jQuery] Re: Release: Validation plugin 1.2.1

2008-02-12 Thread jason

Thanks, Jörn, this sounds fantastic!

- jason



On Feb 12, 3:16 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 The 1.2.1 release for the validation plugin
 (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) is out!
 Among bugfixes related to remote validation and message display a few
 handy improvements landed: The delegate dependency is now bundled with
 the plugin (it was always required anyway), and the small part of the
 ajaxQueue plugin that was required for remote validation is now part of
 the validation plugin, too. So now all you need to include is the
 jquery.validate.js file, nothing else.

 Also fixed are the url and email validation methods. They now check for
 top-level domains (eg. the .de in bassistance.de). A version where
 that is still optional is included in the package via additional-methods.js.

 I've also improved some demos
 (http://jquery.bassistance.de/validate/demo/) to provide a better reference.

 The complete list of changes:

 * Bundled delegeate plugin with validate plugin - its always required anyway
 * Improved remote validation to include parts from the ajaxQueue plugin
 for proper synchronization (no additional plugin necessary)
 * Fixed stopRequest to prevent pendingRequest  0
 * Added jQuery.validator.autoCreateRanges property, defaults to false,
 enable to convert min/max to range and minlength/maxlength to
 rangelength; this basically fixes the issue introduced by automatically
 creating ranges in 1.2
 * Fixed optional-methods to not highlight anything at all if the field
 is blank, that is, don't trigger success
 * Allow false/null for highlight/unhighlight options instead of forcing
 a do-nothing-callback even when nothing needs to be highlighted
 * Fixed validate() call with no elements selected, returning undefined
 instead of throwing an error
 * Improved demo, replacing metadata with classes/attributes for
 specifying rules
 * Fixed error when no custom message is used for remote validation
 * Modified email and url validation to require domain label and top label
 * Fixed url and email validation to require TLD (actually to require
 domain label); 1.2 version (TLD is optional) is moved to additionals as
 url2 and email2
 * Fixed dynamic-totals demo in IE6/7 and improved templating, using
 textarea to store multiline template and string interpolation
 * Added login form example with Email password link that makes the
 password field optional
 * Enhanced dynamic-totals demo with an example of a single message for
 two fields

 Have fun!

 Jörn


[jQuery] Re: [validate] spinner - loading

2008-02-12 Thread Jörn Zaefferer


Josoroma schrieb:

Hi!

Thanks for all your help with validate plugin, my last questions ara
about:

#1 The way of showing a spinner or loading gif while the remote
validation is asking for data?
  
So far you can use jQuery's ajax events to display something: 
http://docs.jquery.com/Ajax_Events

#2 (remote ajax call to know if user exist)The remote ajax call is
executed each time a wrote a character, can i do something to call the
remote validation only when the user is out of the input or when the
user click some kind of button next to the input field to check if
user exist?
  
Currently you can completely disable keyup validation via onkeyup: 
false. Setting the per field isn't possible yet.


Jörn


[jQuery] Help with AJAX behavior

2008-02-12 Thread Erik Lorimor

I'm having some trouble with getting some events to fire correctly upon
AJAX completion.  Basically what I am doing is going through a for
loop that fires off an ajax call for each element in an array.  When the
results come back, if it is successful I want to change an image from
an hourglass (waiting) to an check mark (success!).

What I've come to after trying different things is creating two classes
.waiting  .checked and have the following line:

$('#'+manager).removeClass('waiting').addClass('checked');

The weird thing (at least to me), is that it removes the waiting class
but doesn't add the checked class until all of the ajax requests are
done.  I know all of the ajax calls are basically being run at the same
time, but if it's removing the class when that particular call is done,
shouldn't it add the other class at the same time?  Am I missing some
fundamental piece of ajax behavior or jquery?

Thanks!
Erik


[jQuery] Re: jQuery won't recognise attribute names containing [square brackets]

2008-02-12 Thread Dave Stewart

I knew about :input, but my brain just pre-supposed it meant only
input elements so I had kind of disregarded them somewhat.
So thanks for pointing that out!


[jQuery] Re: plugin to upload files

2008-02-12 Thread Benjamin Sterling
Dave, have a look at
http://blog.360.yahoo.com/blog-qCsFWG45eqF9lZ05AZldsUC.?p=58.  You can't
upload a file the ajax way, but this will be close.

On 2/12/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 Hi, That is good if the flash fails gracefully.  What I'm looking for
 is a way for users to upload files such that they can continue to do
 other activities instead of having to wait for the entire file to be
 uploaded.  An Ajax upload would seem to satisfy this.

 - Dave

 On Feb 11, 12:37 pm, Benjamin Sterling
 [EMAIL PROTECTED] wrote:
  Dave,
  Most of the plugins you are going to find will use flash to get the
 progress
  bar and some other functionality that you just can't get with
 javascript.  I
  am not sure how the jqUploader functions, but I believe that it would
 fail
  nicely if flash is not installed giving you the basic html file input.
 
  With that said, what are you looking to get from the plugin?
 
  On 2/11/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 
 
   Hi,
 
   I'm looking for a jquery plugin that will help me upload files, some
   which may be large ( 20 MB).  I have seen jqUploader, but it seems
   like that requires Flash and I would not want to i mpose that
   requirement on end users.
 
   Thanks for any advice, - Dave
 
  --
  Benjamin
 Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.comhttp://www.benjaminsterling.com




-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com


[jQuery] Help With Modifying Treeview

2008-02-12 Thread studiobl

I'm trying to modify treeview.  I want to eliminate the plus and minus
boxes, and use the section labels as hit areas. A tree of two main
sections would just be Section One and Section Two.  Clicking on
either one of these would expand it, and clicking a second time would
collapse it.

I can see where the div that acts as the hitarea is created in the
script.  I'm having trouble transferring the hitarea functionality to
the anchor that serves as the section label. I don't have to transfer
it to the anchor, just something that would provide the functionality
described.

Any suggestions?



[jQuery] help,about the selectors

2008-02-12 Thread zero args
*my code:*
$.ajax({
  url: test.do,
  dataType: xml,
  success:paint
});
var paint = function(response){
  *var compenonts= $(response).find(Component); // what expression should
be here??
*  compenonts.each(function(index, compenont_ele){
  var compenont = $(compenont_ele);
  var name= compenont.attr(name);
  alert(name);
   });
}
*I expect alert : a、b、c、d*
*but actually alert : a、b、c、c1、c2、d*



test.do wil return :
Components
   Component name=a /
   Component name=b /
   Component name=c 
   children name=c.children 
 Component name=c1 
Component name=c2 
 ...
   /children
   /Component
   Component name=d /
/Components


[jQuery] Re: controlling li-items with unique IDs and trigger corresponding DIVs

2008-02-12 Thread Jannik

Try this:
$(document).ready(function (){
$('div.page').hide();
$('#menu li').click(function (){
$('div.page').hide();
$('#div'+$(this).attr('id')).show();
});
});

ul id=menu
li id=link1Lorem ipsum dolor/li
li id=link2Lorem ipsum dolor/li
li id=link3Lorem ipsum dolor/li
li id=link4Lorem ipsum dolor/li
/ul
div id=divlink1 class=pageDiv 1/div
div id=divlink2 class=pageDiv 2/div
div id=divlink3 class=pageDiv 3/div
div id=divlink4 class=pageDiv 4/div


On Feb 12, 2:37 pm, schnuck [EMAIL PROTECTED] wrote:
 hi guys,

 hope someone can give me a hint for this. if i had an unordered list
 as shown below, where the li-items had unique IDs - is there any way
 that we check which li-items has been clicked so depending on that, we
 could show/animate a corresponding, unique DIV (each li-items would
 have its own corresponding DIV)? these DIVs would be preloaded and
 hidden via CSS somewhere on the page.

 ul
 li id=link1Lorem ipsum dolor/li
 li id=link2Lorem ipsum dolor/li
 li id=link2Lorem ipsum dolor/li
 li id=link3Lorem ipsum dolor/li
 li id=link4Lorem ipsum dolor/li
 /ul

 or do the li-items need to go into HREFs to accomplish this?

 i know this might be very simply to solve, but i just can;t figure it
 out. any help very appreciated.

 many thanks.


[jQuery] Re: jQuery Field Plug-in - Ajax Post Data

2008-02-12 Thread Dan G. Switzer, II

Mike,

I'm using the jQuery Field Plus-in v0.7. I'm doing an ajax post to
another page. I was trying to pass all the name/value pairs at one
time but I'm runnilng into a problem.

My current post data looks like this:
data:
{problemid:frm.problemid.value,problemTitle:frm.problemTitle.value},

Using the plug in, I thought I could do something like this:
var mydata = $(#myForm).formHash();
...
data: {eval(mydata)},
...

However, I get the following error in FireBug:
missing : after property id

My guess is that it's the quotes after the item name as in the
example:
$(#formName).formHash({name: Dan G. Switzer, II, state:
OH});

Is there another way to do this or do I need to list out each item in
my post?

The formHash() function is return an actual JS object--not a string. The
reason you're getting the error is because you're using eval(mydata). Get
rid of the eval() function and that should fix your problem.

You should be able to do:

var mydata = $(#myForm).formHash();
...
data: mydata,

-- or --

data: $(#myForm).formHash(),

-Dan




[jQuery] Re: Uploader 0.9 beta

2008-02-12 Thread Dan G. Switzer, II

I'd love to see an example that has a combined multi-file progress bar.
Something that shows two progress bars--one for the current file and another
for the total upload process.

I think this is a common implementation and an example would make it clear
that it's possible to do.

-Dan

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Cloudream
Sent: Monday, February 11, 2008 8:35 AM
To: jQuery (English)
Subject: [jQuery] Re: Uploader 0.9 beta


Nice work.

Is there any documents? I think i can write an asp (server) demo for
other developers.

On Feb 11, 3:37 pm, Gilles (Webunity) [EMAIL PROTECTED] wrote:
 Well it is almost finished, my Flash-based file uploader for jQuery.
 The docs are finished, and the widget itself also. Originally intended
 to be a part of UI, but since it has no real connection to UI
 (dependencies and so on) i have decided to release it as a standalone
 plugin.

 Most of you have seen the demo allready but here it is
again.http://uploader.webunity.nl/

 Originally based upon swfupload, but based on a really old version of
 swfupload. The version i based the uploader on had:
 - no callbacks for dialog open/dialog hide
 - no multiple file selection masks
 - no filesize limit pre-upload

 I've build all these things into my version, and now they released a
 new version which also has that... (hmmm)
 Anyway, since i based my version on theirs it is only fair that they
 also gather ideas from other sources.

 Let me know if you run into any bugs and i'll try to add the code to
 SVN later this week.



[jQuery] controlling li-items with unique IDs and trigger corresponding DIVs

2008-02-12 Thread schnuck

hi guys,

hope someone can give me a hint for this. if i had an unordered list
as shown below, where the li-items had unique IDs - is there any way
that we check which li-items has been clicked so depending on that, we
could show/animate a corresponding, unique DIV (each li-items would
have its own corresponding DIV)? these DIVs would be preloaded and
hidden via CSS somewhere on the page.

ul
li id=link1Lorem ipsum dolor/li
li id=link2Lorem ipsum dolor/li
li id=link2Lorem ipsum dolor/li
li id=link3Lorem ipsum dolor/li
li id=link4Lorem ipsum dolor/li
/ul

or do the li-items need to go into HREFs to accomplish this?

i know this might be very simply to solve, but i just can;t figure it
out. any help very appreciated.

many thanks.


[jQuery] Re: localScroll Problem

2008-02-12 Thread Ariel Flesler

I'm sure that code by itself would work. There's something else that
needs to be affecting it.
I'd say you should try removing different scripts to see if there's
one messing things up.
Also, if you are not using jQuery 1.2.3 and you can update, that could
fix it.

Cheers

Ariel Flesler

On 12 feb, 10:49, Sebastián V. Würtz [EMAIL PROTECTED] wrote:
 Ariel Flesler escribió:



  Hi Sebastian, that seems to be ScrollTo, not LocalScroll.
  The error you get is quite common and is related (obviously) to
  easing.
  Is that your full code ? aren't you specifying an easing equation ?
  have you added the easing plugin ?

  Do you have a demo of it ? so I can check.
  Cheers

  Ariel Flesler

  On 12 feb, 09:58, Sebastián V. Würtz [EMAIL PROTECTED] wrote:

  im trying to use the localScroll pluginh in many ways :)
  but i receive this error when i click

                  $(#comentar).click(function(){
                      $.scrollTo( '-=900', 300 );
                      return false;
                  });

  E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
  is not a function
  E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
  is not a function
  E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
  is not a function
  E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
  is not a function

  (latest lib for all)

 im using a lot of jquery scripts in one new proyect, for now i cant
 upload all because have a big database, is a news system, btw im not
 using easing plugin, but i try with it and still the same, im so close
 to finish with it so i have many many questions :)

 thx for now- Ocultar texto de la cita -

 - Mostrar texto de la cita -


[jQuery] jQuery Field Plug-in - Ajax Post Data

2008-02-12 Thread MikeP

Hello,

I'm using the jQuery Field Plus-in v0.7. I'm doing an ajax post to
another page. I was trying to pass all the name/value pairs at one
time but I'm runnilng into a problem.

My current post data looks like this:
data:
{problemid:frm.problemid.value,problemTitle:frm.problemTitle.value},

Using the plug in, I thought I could do something like this:
var mydata = $(#myForm).formHash();
...
data: {eval(mydata)},
...

However, I get the following error in FireBug:
missing : after property id

My guess is that it's the quotes after the item name as in the
example:
$(#formName).formHash({name: Dan G. Switzer, II, state:
OH});

Is there another way to do this or do I need to list out each item in
my post?

Thanks,
Mike


[jQuery] Re: Form Plugin: sender

2008-02-12 Thread Mike Alsup
The form (wrapped in a jQuery object) is passed to your success callback:

$('.inlineForm').ajaxForm({dataType:'json', success:process});

function process(data, status, $form) {
// do stuff
}

Mike

On Feb 11, 2008 7:07 PM, Jerome Jaglale [EMAIL PROTECTED] wrote:


 I have a page with several forms, some of them being ajax-submitted
 with the Form Plugin:

 $('.inlineForm').ajaxForm({dataType:'json', success:process});

 Is there a way I can get a reference to the form which has been
 submitted? (from the success function for example)



[jQuery] Re: localScroll Problem

2008-02-12 Thread Sebastián V. Würtz


Ariel Flesler escribió:

Hi Sebastian, that seems to be ScrollTo, not LocalScroll.
The error you get is quite common and is related (obviously) to
easing.
Is that your full code ? aren't you specifying an easing equation ?
have you added the easing plugin ?

Do you have a demo of it ? so I can check.
Cheers

Ariel Flesler


On 12 feb, 09:58, Sebastián V. Würtz [EMAIL PROTECTED] wrote:
  

im trying to use the localScroll pluginh in many ways :)
but i receive this error when i click

$(#comentar).click(function(){
$.scrollTo( '-=900', 300 );
return false;
});

E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
is not a function
E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
is not a function
E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
is not a function
E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
is not a function

(latest lib for all)



  
im using a lot of jquery scripts in one new proyect, for now i cant 
upload all because have a big database, is a news system, btw im not 
using easing plugin, but i try with it and still the same, im so close 
to finish with it so i have many many questions :)


thx for now


[jQuery] Re: localScroll Problem

2008-02-12 Thread Ariel Flesler

Hi Sebastian, that seems to be ScrollTo, not LocalScroll.
The error you get is quite common and is related (obviously) to
easing.
Is that your full code ? aren't you specifying an easing equation ?
have you added the easing plugin ?

Do you have a demo of it ? so I can check.
Cheers

Ariel Flesler


On 12 feb, 09:58, Sebastián V. Würtz [EMAIL PROTECTED] wrote:
 im trying to use the localScroll pluginh in many ways :)
 but i receive this error when i click

                 $(#comentar).click(function(){
                     $.scrollTo( '-=900', 300 );
                     return false;
                 });

 E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
 is not a function
 E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
 is not a function
 E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
 is not a function
 E.easing[this.options.easing || (E.easing.swing ? swing : linear)]
 is not a function

 (latest lib for all)


[jQuery] Re: Hash as URL

2008-02-12 Thread frizzle

Anyone?
Could it maybe be possible to adjust History/Remote to do this?

Thanks,
Frizzle.

On Feb 11, 1:26 pm, frizzle [EMAIL PROTECTED] wrote:
 Thanks for your reply oliver.
 No offence, but i kinda was heading this way, until i realized that it
 wouldn't solve my back/forward buttons problem,
 since the event would only be called by a click on a link...

 (Though your approach looks a lot better then mine...)

 Thanks,
 Frizzle.

 On Feb 11, 9:00 am, oliver [EMAIL PROTECTED] wrote:

  That function is only firing once, when the DOM is ready.  You want it
  to fire every time one of your links is clicked, so add a click
  handler to each of them.  Inside of that handler, don't look at the
  location, instead look at the href of the clicked item and extract
  that hash.

  Assuming a like looks like this:
  a href=#foobar/a

  $(document).ready(function() {
  $('#files a').click(function(event) {
  $(#files).load(index.php?explore= +
  this.href.substring(1));
  });

  });

  The problem is that when #files get loaded with new data, those click
  handlers won't be on the new items; so a better approach would be to
  just add one click handler to the parent and inspect the target:

  $(document).ready(function() {
  $('#files').click(function(event) {
  if (event.target.href) {
  $(this).load(index.php?explore= +
  event.target.href.substring(1));
  }
  });

  });

  o

  On Feb 10, 9:05 am, frizzle [EMAIL PROTECTED] wrote:

   Hi there,

   I have some links on a page inside div id=files/div.
   They link to the same page, but with a different hash.
   The hash should define what url will be loaded into #files.

   I have the script below:

   script type=text/javascript
 $(function() {
   $('#files').load(index.php?
   explore=+location.hash.substring(1));
 });
   /script

   It works when someone goes to the page with a defined hash, or if you
   refresh the page with a certain hash,
   but just by clicking the links and back/forward in the browser it
   won't work. The script doesn't get fired again..

   I hope this is clear.

   Thanks,
   Frizzle.


  1   2   >