Re: [jQuery] I could use help with Drag-drop

2007-01-25 Thread barrel

Yes, this can be done. I have used the following code in a list of items (a
html table structure) where items can be dragged to either a folder or a
trashbin. 

Here is some of the code:

[code]

 86 $(.dndFolder).Draggable (
 87 {
 88 autoSize:true,
 89 ghosting:true,
 90 revert:true,
 91 fx: 200
 92 });
 93 $(.dndFolder).Droppable (
 94 {
 95 accept:draggable,
 96 hoverclass:dropzonehover,
 97 activeclass:dropzonehover,
 98 onDrop:function(drag)
 99 {
100 if (this.id != drag.id)
101 {
102 //moveItem (tasks, this.id.split
(_)[1], drag.id.split (_)[1],\''.session_id(
).'\');
103 moveItem (tasks, this,
drag,\''.session_id().'\');
104 }
105 }
106 });
107 $(.draggable).Draggable (
108 {
109 autoSize:true,
110 ghosting:true,
111 revert:true,
112 fx: 200,
113 onStart:function()
114 {
115 currentDrag = $(this).parent().parent();
116 currentDrag.removeClass().addClass
(selected);
117 }
118 });
119 $(#trash).Droppable (
120 {
121 accept:draggable,
122 hoverclass:dropzonehover,
123 activeclass:dropzonehover,
124 onDrop:function(drag)
125 {
126 var what = drag.id.split (_);
127 var theType =
(what[0]==folder?folder:item);
128 //animateDeleteItem ((drag.id).substring
(5));
129 //deleteItem (tasks,
(drag.id).substring (5));
130 deleteItem (tasks, theType, what[1]);
131 }
132 });

150 $(document).bind(mouseup, function ()
151 {
152 if (currentDrag)
153 {
154 zebraItems ();
155 currentDrag = null;
156 }
157 });
[/code]

The interface DnD functions are used

moveItem is the javascript function that handles the db update

This could probably be done a better way, but since I use pretty large
tables I disabled this DnD functionality since performance was pretty bad
when using it on over about 50 items 


Circlefusion wrote:
 
 Hey all,
 
 I'm researching JQuery for a project at work. It is a recipe website that
 has a recipe box feature where they want to be able to drag recipes
 between folders for organization. Here is a screen shot of the basic
 functionality that I'm trying to accomplish.
 
  http://www.circlefusion.com/projects/ge/recipe_box_drag.png 
 
 A couple of rules for the drag-drop:
 
 If the recipe is not dragged to an appropriate target (a folder) then it
 stays in it's original position when the mouse is released.
 
 After the drop is completed, an AJAX call would update the database and
 reload the recipe list in whichever folder the user is located.
 
 I couldn't find a clear example of this type of drag-drop scenario on any
 of the JQuery demos. I saw similar things on the Interface website in the
 demos section. http://interface.eyecon.ro/
 
 Can someone give me some direction? Suggestions? Tips? 
 
 Or just let me know if this can be done using JQuery. I was considering
 using YUI, but so far I find JQuery easier to use. I'm assuming that
 Interface is what I'm looking for (for drag-drop functionality)
 
 Thanks
 
 Cf
 

-- 
View this message in context: 
http://www.nabble.com/I-could-use-help-with-Drag-drop-tf3064614.html#a8597817
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Retrieve a from iframe

2007-01-25 Thread David Gironella
How can I get all A from all IFRAMES in web?

 

Thk.

 

Giro.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] attr scrollHeight

2007-01-25 Thread Andreas Wahlin
$(element).attr('scrollHeight')
does not work (returns undefined)
but
$(element)[0].scrollHeight
does, is this right?

andreas

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] preceding sibling

2007-01-25 Thread Stéphane Nahmani
Hello again,

I have written a simple menu in the most basic way i could: just an unordered
list, with only the active tab getting a class=active.

I am adding the correct styles to the first and last tabs with the :first and
:last selector. Works just fine.

The last thing i need is to be able to identify the tab that comes before the
active tab, if any. I have tried the axis selector for the preceding sibling
shown in the doc : $(//div ~ form)

However, that syntax is a bit foreign to me, and it unsurprisingly did not work
when i adpated it like this :

$(//ul#menu li ~ .actif).addClass(preactif);

(To be more precise, i want to select the ul#menu li that comes right before
the ul#menu li.actif).
I have tried various combinations, but to no avail.

Help most welcome as always. Thanks!

--
  Stéphane Nahmani / sholby
  [EMAIL PROTECTED]
  http://www.sholby.net/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Select Box

2007-01-25 Thread Peter Bengtsson
Consider this plugin
http://www.texotela.co.uk/code/jquery/select/
You can do stuff like
$(#myselect).selectOptions(Value);


David Gironella wrote:
 I have a multiple selection select. I can use jquery to check which 
 options are selected?
 
  
 
 Some example?
 
  
 
 Thk.
 
 Giro.
 
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] preceding sibling

2007-01-25 Thread Blair McKenzie

Try
$(#menu li.actif ~ li)

Translation:
Find an element with id menu (id by itself is faster than id with tag), then
find a descendent LI with class actif, and return the preceding element if
it is a LI.

Blair

On 1/25/07, Stéphane Nahmani [EMAIL PROTECTED] wrote:


Hello again,

I have written a simple menu in the most basic way i could: just an
unordered
list, with only the active tab getting a class=active.

I am adding the correct styles to the first and last tabs with the :first
and
:last selector. Works just fine.

The last thing i need is to be able to identify the tab that comes before
the
active tab, if any. I have tried the axis selector for the preceding
sibling
shown in the doc : $(//div ~ form)

However, that syntax is a bit foreign to me, and it unsurprisingly did not
work
when i adpated it like this :

$(//ul#menu li ~ .actif).addClass(preactif);

(To be more precise, i want to select the ul#menu li that comes right
before
the ul#menu li.actif).
I have tried various combinations, but to no avail.

Help most welcome as always. Thanks!

--
Stéphane Nahmani / sholby
  [EMAIL PROTECTED]
  http://www.sholby.net/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: CSS Conditional Comments

2007-01-25 Thread Olaf Bosch
Aaron Heimlich schrieb:

 I don't recall whether IE Mac can read conditional comments, but it
 shouldn't matter much considering it's pretty much dead and gone by now.

The IE Mac ignore CC's

-- 
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] attr scrollHeight

2007-01-25 Thread Klaus Hartl
Andreas Wahlin wrote:
 $(element).attr('scrollHeight')
 does not work (returns undefined)
 but
 $(element)[0].scrollHeight
 does, is this right?

Maybe that's because scrollHeight is a property of an element and not an 
attribute (that is reflected in the HTML tag's attribute list).

Try:

element.foo = 'bar';
alert( $(element).attr('foo') );

I'm pretty sure that the alert is empty.

By the way: $(element)[0].scrollHeight is the same as 
element.scrollHeight of course with a little less overhead.

-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] ie6 submit button error

2007-01-25 Thread Marie du Toit
Hi,

I found the following error,

This command is not supported,

when trying this line of code in IE6,

$(':submit').attr({ src: images/button_submit.png, type: image });

This works fine in Firefox. I have the latest update of jQuery and I'm 
currently using the compressed version.

Thanks in advance,
Marie

   

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to find out if form was submitted via Ajax?

2007-01-25 Thread Dmitrii 'Mamut' Dimandt
Thank you! This worked beautifully

Dr. Tarique Sani wrote:
 On 1/24/07, Dmitrii 'Mamut' Dimandt [EMAIL PROTECTED] wrote:
   
 When I use the Form plugin, how can I find out on the server that the
 form was submitted via Ajax?
 

 if using PHP then testing env('HTTP_X_REQUESTED_WITH') ==
 XMLHttpRequest should work

 HTH

 Tarique

   

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ie6 submit button error

2007-01-25 Thread Karl Rudd
My guess is that IE doesn't like you changing the type of the INPUT
element from submit to image. I'd advise doing something along
this line (untested code):

$(':submit')
  .attr('disable','true')
  .hide()
  .before( $('input src=images/button_submit.png type=image') );

Karl Rudd

On 1/25/07, Marie du Toit [EMAIL PROTECTED] wrote:
 Hi,

 I found the following error,

 This command is not supported,

 when trying this line of code in IE6,

 $(':submit').attr({ src: images/button_submit.png, type: image });

 This works fine in Firefox. I have the latest update of jQuery and I'm
 currently using the compressed version.

 Thanks in advance,
 Marie

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Problem with form plugin and xml

2007-01-25 Thread Dmitrii 'Mamut' Dimandt
I'm trying to ajaxify my forms. I'm using the forms plugin:

$(#FindHotel).ajaxForm(
{
success: showFormSubmitResult,
dataType: 'xml'
}
);


function showFormSubmitResult(responseText, statusText)
{
alert(responseText);
}

I'm getting 'null' :(

The XML that's returned is valid XML that looks sort of like this. I
wonder what could be the problem :(

data 
sort text=Sort by:  
item isLast=0 link=/find/hotel/?sort=nameamp;dir=asc 
textHotel name/text 
image/image 
/item 
/sort 
list 
original_set text=You were looking for:  
item 
!--xhr-- 
hotel
name=test_hotel
roomdata=405E43495D1748544D4843
name=Тestoviy Otel
noofstars=5* 
currency=€ 
minprice=10
maxprice=61.2 
   
Description
/hotel 
rooms 
room
name=SNGL
id=1
hid=8
currency=€ 
minprice=10
maxprice=22.4 / 
/rooms 
/item 
/original_set 
/list 
/data

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Some Firefox search plugins I made

2007-01-25 Thread Kenneth

Greetings all,

Being new to jQuery (just implemented it yesterday), I have done quite a bit
of searching for information on various jQuery topics, and to help me to
that end I created some Firefox search plugins (for that little box in the
upper-right corner)I hope you guys don't mind! I searched online for
some before I made them but couldn't find any, so.. yeah :)

I made 3:

Google site:jquery.com (main, discuss, blog)
Google site:docs.jquery.com (docs, plugins, tutorials)
jQuery.com built-in Wiki search (rarely finds anything)

Anyways, you can get them here: http://kenman.net/jQuery/ff_src/

Let me know if you have any ideas for improvements, etc.

-kenneth
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ie6 submit button error

2007-01-25 Thread Karl Rudd
Bah. I missed a closing bracket.


$(':submit')
 .attr('disable','true')
 .hide()
 .before( $('input src=images/button_submit.png type=image') );

Karl Rudd

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] preceding sibling

2007-01-25 Thread Sam Collett
On 25/01/07, Blair McKenzie [EMAIL PROTECTED] wrote:
 Try
 $(#menu li.actif ~ li)

 Translation:
 Find an element with id menu (id by itself is faster than id with tag), then
 find a descendent LI with class actif, and return the preceding element if
 it is a LI.

 Blair

$(#menu li.actif).prev(li) should work as well.



 On 1/25/07, Stéphane Nahmani [EMAIL PROTECTED] wrote:
  Hello again,
 
  I have written a simple menu in the most basic way i could: just an
 unordered
  list, with only the active tab getting a class=active.
 
  I am adding the correct styles to the first and last tabs with the :first
 and
  :last selector. Works just fine.
 
  The last thing i need is to be able to identify the tab that comes before
 the
  active tab, if any. I have tried the axis selector for the preceding
 sibling
  shown in the doc : $(//div ~ form)
 
  However, that syntax is a bit foreign to me, and it unsurprisingly did not
 work
  when i adpated it like this :
 
  $(//ul#menu li ~ .actif).addClass(preactif);
 
  (To be more precise, i want to select the ul#menu li that comes right
 before
  the ul#menu li.actif).
  I have tried various combinations, but to no avail.
 
  Help most welcome as always. Thanks!
 
  --
  Stéphane Nahmani / sholby
[EMAIL PROTECTED]
http://www.sholby.net/
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Thickbox incompatible with jQuery 1.1

2007-01-25 Thread agent2026

I agree.  My modified thickbox.js is just 6k packed.  Why break it up into
separate downloads?

There are features I would like to see built in (which I've been able to add
with the help of the community), circular browsing for example, but it's
very important to me that ThickBox stays small in file size.  Quite
confident you all feel the same, but thought I'd make it a point to consider
anyway.

Adam



[-Stash-] wrote:
 
 I like this idea but for one point.  If you do want everything, then you
 have 8 bazillion requests back and forth to the server.  Not a problem for
 those of us on broadband, but on Dialup it becomes a a really show stopper
 with all the added latency.
 
 Some method of bundling up (and compressing if possible, but that's
 secondary) all the necessary JS files into a single download would be
 best.
 
 Luke
 
 
 Sam Collett wrote:
 
 On 24/01/07, Klaus Hartl [EMAIL PROTECTED] wrote:
 [-Stash-] wrote:
  Unfortunately, it looks like Cody's giving up on ThickBox.  He's put
 out a
  request for someone to take it over:
 
 http://codylindley.com/thickboxforum/comments.php?DiscussionID=166page=1#Item_15
 
  Given the improvements Klaus Hartl's already made to ThickBox 2.1, it
 would
  be nice if he took it over ;)

 I'd love to do that!

 -- Klaus
 
 We all know you are capable of doing it.
 
 One suggestion though - make it modular. So if you only want to use it
 for images, you don't download all the things you don't need.
 
 e.g.
 - Images, inline content - include thickbox.js
 - Gallery - thickbox.js, thickbox-gallery.js
 - Ajax: thickbox.js, thickbox-ajax.js
 - Rich media content (flash, quicktime, pdf's etc) - thickbox.js,
 thickbox-media.js
 
 and so on.
 
 You could use blockUI for the overlay and bgiframe for rich media.
 
 

-- 
View this message in context: 
http://www.nabble.com/Thickbox-incompatible-with-jQuery-1.1-tf3063738.html#a8598914
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: CSS Conditional Comments

2007-01-25 Thread Klaus Hartl
Ⓙⓐⓚⓔ wrote:
 sure looks right!  IE is disgusting, as so are conditional comments! I
 prefer to kludge IE all at once in an if ($.browser.msie) block , and
 even load in a different style sheet for those crazy browsers!  I read
 a way that IE naturally ignores some css (without conditional
 comments) that  a new compliant IE might obey! Perhaps an IE guru can
 shed more info here.

That is true to some extend. IE 6 does not support advanced CSS 2 
selectors. That means you can easily exclude rules from IE 6 by using these:

bodydiv {
 /* declarations not seen by IE 6 */
}

Note that you mustn't put white space into that selector like body  
div as some IE 5 versions will interpret everything after the 
combinator , e.g. it would apply the declarations to all divs in this 
example.

This is what I call a bad hack, because it is not future proof. Such 
hacks have been used a lot, but obviously caused a lot of problems when 
IE 7 came out which supports these CSS 2 selectors and suddenly applied 
the styles meant to be excluded from it. *Don't do it!*

Conditional Comments may seem ugly but are the by far safest way to 
serve IE specific styles. The propability that Opera will implement CC 
and then let if IE evaluate to true goes against negative infinity.

I usually use one single IE style sheet included via CC and than hack a 
little bit in that one if I need to address IE 7 or 6 solely.

For IE 7 I can than use advanced CSS 2 selectors like the one above. For 
IE 6 you can use the underscore hack (_height: 300px) or the Star 
Selector Hack, which is not understood by IE 7 running in Standards Mode.

For example to achieve automatic clearing I use:

.somethingWithFloatsInside {
 display: inline-block; /* @ IE 7 */
 _height: 1%; /* @ IE 6 */
}


-- Klaus




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery French chapter / groupe francophone jQuery

2007-01-25 Thread Fil

Salut

je viens de créer la liste de discussion [EMAIL PROTECTED] pour tous ceux
qui souhaitent parler de jQuery, en français. A bientôt !

Pour s'inscrire il suffit d'envoyer un email à l'adresse
[EMAIL PROTECTED]

ou se rendre à http://listes.rezo.net/mailman/listinfo/jquery-fr

à bientôt


(in English: I've just created the [EMAIL PROTECTED] mailing-list)

-- Fil


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] preceding sibling

2007-01-25 Thread Stéphane Nahmani
On 25 janv. 07, at 10:24, Blair McKenzie wrote:

Try
$(#menu li.actif ~ li)

Translation:
Find an element with id menu (id by itself is faster than id with tag), then
find a descendent LI with class actif, and return the preceding element if it
is a LI.

Yes, it works and your explanation of it is pristine. Thanks a lot.

To be more accurate, i found out that it actually returned several (see below)
of the preceding siblings, so i fixed it by adding :last.

Maybe something is amiss: i have 5 li in my list. If i select the previous
sibling(s) with your selector when the active li is the 2nd or 3rd, all the
previous ones are returned.

However, if the active one is #4 or #5, only the 2 first li are found (in
other words li #3 and #4 are not included in the array).

(This was tested on Safari)

PS : Just seeing Sam's reply: yes, it works too! Great!
PPS: apologies if the message isn't correctly placed in the thread, i can't
reply at my workplace.

--
  Stéphane Nahmani / sholby
  [EMAIL PROTECTED]
  http://www.sholby.net/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: CSS Conditional Comments

2007-01-25 Thread Klaus Hartl
Olaf Bosch wrote:
 Aaron Heimlich schrieb:
 
 I don't recall whether IE Mac can read conditional comments, but it
 shouldn't matter much considering it's pretty much dead and gone by now.
 
 The IE Mac ignore CC's
 

Yes, IE Mac is (was) a completely different browser (apart from the 
name). If you need to include an IE Mac specific style sheet use the 
IE5/Mac Band Pass Filter:

http://www.stopdesign.com/examples/ie5mac-bpf/

But honestly, IE 5 for Mac is considered a dead browser.


-- Klaus


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Select Box

2007-01-25 Thread David Gironella
Yes. I see, but my question is how can check ALL options.

With classical dom, i can do this:

me=document.getElementById('subselect');

for(var i = 0;i  me.length;i++) {
if(me.options[i].selected == true){
}
}

But, with jquery?

Giro.

-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre
de Peter Bengtsson
Enviado el: jueves, 25 de enero de 2007 10:21
Para: jQuery Discussion.
Asunto: Re: [jQuery] Select Box

Consider this plugin
http://www.texotela.co.uk/code/jquery/select/
You can do stuff like
$(#myselect).selectOptions(Value);


David Gironella wrote:
 I have a multiple selection select. I can use jquery to check which 
 options are selected?
 
  
 
 Some example?
 
  
 
 Thk.
 
 Giro.
 
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

-- 
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que esta limpio.
For all your IT requirements visit: http://www.transtec.co.uk


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: CSS Conditional Comments

2007-01-25 Thread Klaus Hartl
Ⓙⓐⓚⓔ wrote:
 Micheal, so that only works with inline styles?
 
 On 1/24/07, Michael Geary [EMAIL PROTECTED] wrote:
 !-- ... - is an HTML comment, not a CSS comment. So, conditional comments
 go in your HTML code, not in CSS code.

 div.SiteHeader{
 border: 1px solid #336566; /*AA*/
 width: 850px;
 background-color: #E3F0D6; /*D5F0D5,CDD9E5*/
 height: 60px;
 text-align: left;
 margin: auto;
 !--[if IE 6]
 line-height: 60px;
 ![endif]--
 }

1. What we see here is completely wrong. You cannot put HTML comments 
into a style sheet.

It would be correct like that:




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Thickbox incompatible with jQuery 1.1

2007-01-25 Thread Sam Collett
On 25/01/07, agent2026 [EMAIL PROTECTED] wrote:

 I agree.  My modified thickbox.js is just 6k packed.  Why break it up into
 separate downloads?

 There are features I would like to see built in (which I've been able to add
 with the help of the community), circular browsing for example, but it's
 very important to me that ThickBox stays small in file size.  Quite
 confident you all feel the same, but thought I'd make it a point to consider
 anyway.

 Adam


If (or should I say when) Thickbox does a lot more (like transition
animations between images in a gallery etc), then the code size would
increase.

To solve the issue of requests for multiple files, you could always
have a download page that you can use to configure your download (like
the one at http://interface.eyecon.ro/download). You check the
features you want and then it merges those files server side (or gets
a prebuilt copy) and sends you the compressed version in one file.



 [-Stash-] wrote:
 
  I like this idea but for one point.  If you do want everything, then you
  have 8 bazillion requests back and forth to the server.  Not a problem for
  those of us on broadband, but on Dialup it becomes a a really show stopper
  with all the added latency.
 
  Some method of bundling up (and compressing if possible, but that's
  secondary) all the necessary JS files into a single download would be
  best.
 
  Luke
 
 
  Sam Collett wrote:
 
  On 24/01/07, Klaus Hartl [EMAIL PROTECTED] wrote:
  [-Stash-] wrote:
   Unfortunately, it looks like Cody's giving up on ThickBox.  He's put
  out a
   request for someone to take it over:
  
  http://codylindley.com/thickboxforum/comments.php?DiscussionID=166page=1#Item_15
  
   Given the improvements Klaus Hartl's already made to ThickBox 2.1, it
  would
   be nice if he took it over ;)
 
  I'd love to do that!
 
  -- Klaus
 
  We all know you are capable of doing it.
 
  One suggestion though - make it modular. So if you only want to use it
  for images, you don't download all the things you don't need.
 
  e.g.
  - Images, inline content - include thickbox.js
  - Gallery - thickbox.js, thickbox-gallery.js
  - Ajax: thickbox.js, thickbox-ajax.js
  - Rich media content (flash, quicktime, pdf's etc) - thickbox.js,
  thickbox-media.js
 
  and so on.
 
  You could use blockUI for the overlay and bgiframe for rich media.
 
 

 --
 View this message in context: 
 http://www.nabble.com/Thickbox-incompatible-with-jQuery-1.1-tf3063738.html#a8598914
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] unobtrus

2007-01-25 Thread Klaus Hartl
John Beppu wrote:
 Imagine... a PHP page that makes SQL queries right before it populates
 a big HTML table that makes heavy use of nested tables for layout but
 also has some inlined CSS via the style attribute, and to top it all
 off the HTML is littered with onclick handlers and script tags at
 various places in the page.

Aah, John, I can't sleep tonight...


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Select Box

2007-01-25 Thread Sam Collett
On 25/01/07, David Gironella [EMAIL PROTECTED] wrote:
 Yes. I see, but my question is how can check ALL options.

 With classical dom, i can do this:

 me=document.getElementById('subselect');

 for(var i = 0;i  me.length;i++) {
 if(me.options[i].selected == true){
 }
 }

 But, with jquery?

 Giro.


It can take a regular expression, so to select all items:

$(#myselect).selectOptions(/./i);

 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre
 de Peter Bengtsson
 Enviado el: jueves, 25 de enero de 2007 10:21
 Para: jQuery Discussion.
 Asunto: Re: [jQuery] Select Box

 Consider this plugin
 http://www.texotela.co.uk/code/jquery/select/
 You can do stuff like
 $(#myselect).selectOptions(Value);


 David Gironella wrote:
  I have a multiple selection select. I can use jquery to check which
  options are selected?
 
 
 
  Some example?
 
 
 
  Thk.
 
  Giro.
 
 
  
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/

 --
 Peter Bengtsson,
 work www.fry-it.com
 home www.peterbe.com
 hobby www.issuetrackerproduct.com

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

 --
 Este mensaje ha sido analizado por MailScanner
 en busca de virus y otros contenidos peligrosos,
 y se considera que esta limpio.
 For all your IT requirements visit: http://www.transtec.co.uk


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Why am I getting this error message?

2007-01-25 Thread agent2026

Actually he's not trying to debug in IE, he's testing in IE and getting that
error.

@Rick: The error you're getting may be caused by 
http://jquery.com/dev/bugs/bug/843/ this bug .  Basically you need to change
your settings of zIndex to a string.

Adam





Ⓙⓐⓚⓔ wrote:
 
 and as to why you get that message and the line number don't help much
 is that you are attempting to debug in IE!
 The players use firefox + firebug!
 

-- 
View this message in context: 
http://www.nabble.com/Why-am-I-getting-this-error-message--tf3095622.html#a8599073
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Form Ajax and PHP

2007-01-25 Thread Massimiliano Marini
Hi Mike,

 There is some good material here, just updated tonight.
 
 http://www.malsup.com/jquery/form/

Yes a very good work and material where I can learn more ... tnx 1K :)

--
Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
It's easier to invent the future than to predict it.  -- Alan Kay

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ie6 submit button error

2007-01-25 Thread old9

t many brackets, that's why jQuery always drove me crazy. :D

On 1/25/07, Karl Rudd [EMAIL PROTECTED] wrote:


Bah. I missed a closing bracket.


$(':submit')
.attr('disable','true')
.hide()
.before( $('input src=images/button_submit.png type=image') );

Karl Rudd

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
TM: 7387905
Blog: http://old9.blogsome.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] unobtrus

2007-01-25 Thread Klaus Hartl
John Beppu wrote:
 I'd like to also add that Unobtrusive Javascript is just cleaner and
 easier to understand than the alternative.

And here's another aspect I'd like to add: To me UOJS not also means 
graceful degradation plus separation of JS and HTML, it also means to 
not add elements to your HTML that have solely the purpose of satisfying 
  some scripting needs, like extra ids, elements and so on (hey Jake, 
you should like that :-) ).

I think jQuery makes UOJS possible like no other library. Prototype with 
Rails for example gives you the hell of obtrusive JavaScript (they don't 
care because of all the helpers you still don't have the maintenance 
nightmare). So if you're using Prototype elsewhere you might tend to 
stick to these habits...

Rey, I think this is an important point to emphasize if not happened yet.


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Thickbox incompatible with jQuery 1.1

2007-01-25 Thread agent2026

But if you want something that does a lot more, than why would you be using
ThickBox in the first place?  There are plenty of other lightboxes out there
with bells and whistles you can blow to your hearts content.  ThickBox is
the lightweight, 'One box to rule them all' solution.  Keep it simple, and
keep it small, 
http://codylindley.com/Javascript/257/thickbox-one-box-to-rule-them-all as
it was intended to be .

Adam


Sam Collett wrote:
 
 If (or should I say when) Thickbox does a lot more (like transition
 animations between images in a gallery etc), then the code size would
 increase.
 

-- 
View this message in context: 
http://www.nabble.com/Thickbox-incompatible-with-jQuery-1.1-tf3063738.html#a8599437
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] unobtrus

2007-01-25 Thread John Beppu
To be fair to the Rails people, there is a plugin called UJS for Rails
that promotes the use of Unobtrusive Javascript in Rails web
applications.

http://www.ujs4rails.com/


With that said, I'm not really a big fan of the helpers that Rails
provides for generating obtrusive Javascript in your pages.  I'm glad
that UJS for Rails exists so that Rails programmers can more easily
separate their Javascript from their HTML.

PS: Sorry about the nightmares.  ;-)

On 1/25/07, Klaus Hartl [EMAIL PROTECTED] wrote:
 John Beppu wrote:
  I'd like to also add that Unobtrusive Javascript is just cleaner and
  easier to understand than the alternative.

 And here's another aspect I'd like to add: To me UOJS not also means
 graceful degradation plus separation of JS and HTML, it also means to
 not add elements to your HTML that have solely the purpose of satisfying
   some scripting needs, like extra ids, elements and so on (hey Jake,
 you should like that :-) ).

 I think jQuery makes UOJS possible like no other library. Prototype with
 Rails for example gives you the hell of obtrusive JavaScript (they don't
 care because of all the helpers you still don't have the maintenance
 nightmare). So if you're using Prototype elsewhere you might tend to
 stick to these habits...

 Rey, I think this is an important point to emphasize if not happened yet.


 -- Klaus

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Another simple JQuery example

2007-01-25 Thread Kush Murod

Hi guys,

Just wanted to post quick piece of code I've developed

It is a replacement for js alert function I'll be using.
It is a very early stage, but I thought someone may learn from it.

code itself is written as plugin and hopefully comments are clear
It uses dimensions and bounce plugin from interface.

*Only work in FF*

http://eboyreal.com/sandbox/jquery/alertBox/alertMessage.html

HAPPY AUSTRALIA DAY, OY OY OY :)
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Problem with form plugin and xml

2007-01-25 Thread Dmitrii 'Mamut' Dimandt
anyone?

Dmitrii 'Mamut' Dimandt wrote:
 I'm trying to ajaxify my forms. I'm using the forms plugin:

 $(#FindHotel).ajaxForm(
 {
 success: showFormSubmitResult,
 dataType: 'xml'
 }
 );


 function showFormSubmitResult(responseText, statusText)
 {
 alert(responseText);
 }

 I'm getting 'null' :(

 The XML that's returned is valid XML that looks sort of like this. I
 wonder what could be the problem :(

 data 
 sort text=Sort by:  
 item isLast=0 link=/find/hotel/?sort=nameamp;dir=asc 
 textHotel name/text 
 image/image 
 /item 
 /sort 
 list 
 original_set text=You were looking for:  
 item 
 !--xhr-- 
 hotel
 name=test_hotel
 roomdata=405E43495D1748544D4843
 name=Тestoviy Otel
 noofstars=5* 
 currency=€ 
 minprice=10
 maxprice=61.2 

 Description
 /hotel 
 rooms 
 room
 name=SNGL
 id=1
 hid=8
 currency=€ 
 minprice=10
 maxprice=22.4 / 
 /rooms 
 /item 
 /original_set 
 /list 
 /data

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
   


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] unobtrus

2007-01-25 Thread Klaus Hartl
John Beppu wrote:
 To be fair to the Rails people, there is a plugin called UJS for Rails
 that promotes the use of Unobtrusive Javascript in Rails web
 applications.
 
 http://www.ujs4rails.com/
 
 
 With that said, I'm not really a big fan of the helpers that Rails
 provides for generating obtrusive Javascript in your pages.  I'm glad
 that UJS for Rails exists so that Rails programmers can more easily
 separate their Javascript from their HTML.

Yeah, I didn't mean to bash Rails. I love it and think it's a great 
product. The only thing I dislike is just that obtrusive JS thing being 
the jQuery adopt I am...

The UJS plugin is pretty cool as well but I'd prefer a full blown 
unobtrusive jQuery on Rails plugin of course.


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ie6 submit button error

2007-01-25 Thread Blair McKenzie

Breaking lines and indenting help.

Blair

On 1/25/07, old9 [EMAIL PROTECTED] wrote:


t many brackets, that's why jQuery always drove me crazy. :D

On 1/25/07, Karl Rudd [EMAIL PROTECTED]  wrote:

 Bah. I missed a closing bracket.


 $(':submit')
 .attr('disable','true')
 .hide()
 .before( $('input src=images/button_submit.png type=image') );

 Karl Rudd

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




--
TM: 7387905
Blog: http://old9.blogsome.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Retrieve a from iframe

2007-01-25 Thread Blair McKenzie

The only way to use jQuery across frames is to include jQuery in each
frame's source. If they do, then you could do something like:
var a=$(nothing);
$(iframe).each(function(){
  if (this.jQuery) a.add(this.jQuery(a));
});

Blair

On 1/25/07, David Gironella [EMAIL PROTECTED] wrote:


 How can I get all A from all IFRAMES in web?



Thk.



Giro.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Retrieve a from iframe

2007-01-25 Thread David Gironella
I can’t place code inside Iframe.

 

Thk.

Giro.

 

 

  _  

De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre
de Blair McKenzie
Enviado el: jueves, 25 de enero de 2007 12:18
Para: jQuery Discussion.
Asunto: Re: [jQuery] Retrieve a from iframe

 

The only way to use jQuery across frames is to include jQuery in each
frame's source. If they do, then you could do something like:
var a=$(nothing);
$(iframe).each(function(){
   if (this.jQuery ) a.add(this.jQuery(a));
});

Blair

On 1/25/07, David Gironella [EMAIL PROTECTED] wrote: 

How can I get all A from all IFRAMES in web?

 

Thk.

 

Giro.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





-- 
Este mensaje ha sido analizado por  http://www.mailscanner.info/
MailScanner 
en busca de virus y otros contenidos peligrosos, 
y se considera que está limpio. 
MailScanner agradece a transtec Computers http://www.transtec.co.uk/  por
su apoyo. 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Imagebox doesn't work in Safari

2007-01-25 Thread lukas | dressy vagabonds
hi everyone,

i've been trying to integrate interface's imagebox into my site,  
using jQuery 1.1.1 and Interface 1.1.1. As soon as i'm clicking on an  
image, the imagebox enters the loading image phase and is stuck  
there. i've put some debugging code into my site, reading
--
alert(jQuery(imageEl))
--

which alerts object in firefox, but no alert box in Safari

has anybody already encountered this problem?

best regards

lukas

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] cant append() form objects

2007-01-25 Thread Blair McKenzie

I refactored your function to use jQuery:
function appLayer(id){
  //create layerbox
  this.$layer = $(div id=' + id + _layer'
class='layerbox'/div).appendTo(#content);

  //create form
  this.$layer.append(this.$form = $(form id=' + id + _form' name=' +
id + _form' action='index.php' method='post'/form));

  //create main div
  this.$main = $(div id=' + id + _main'
class='morebox'/div).html(This box should get created, but it doesnt
because form didnt get created).prependTo(this.$form);
}

Interestingly, when I tryed to use this.$form.appendTo(this.$layer) it
didn't work. Is this a bug? Not sure. But this function worked for me.

Blair

On 1/25/07, Jeremy Dill [EMAIL PROTECTED] wrote:


 After upgrading from 1.0.4 to 1.1.1 the following code no longer works.
Please tell me if there is a solution to this issue.

---WORKING HTML TEST PAGE
html xmlns=http://www.w3.org/1999/xhtml;http://www.w3.org/1999/xhtml%22%3E
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
titletest/title
style
.layerbox{font-size:8pt;text-align:left;padding:10px;margin:20px;border:1px
solid #B2C5EC; background-color:#FCFCFC;float:left;
clear:left;height:200px;width:200px}
/style
script type='text/javascript' src='/js/jquery111.js'/script
/head

body
div id='content'/div
script language=JavaScript
function appLayer(id){
 //create layerbox
  var layerbox=document.createElement('div');
  layerbox.id=id+_layer;
  layerbox.className=layerbox;
  $(#content).prepend(layerbox);
  this.divName=layerbox.id;
  this.layerobj=layerbox;
 //create form
  var frm=document.createElement('form');
  frm.id=id+_form;
  frm.name=id+_form;
  frm.action = index.php;
  frm.method = post;
   this.frm=frm.id;
//---HERE IS THE PROBLEM-///
  $(#+this.divName).append(frm);
//---APPEND DOESNT WORK FOR FORM OBJECT--///
  //create main div
 var main=document.createElement('div');
 main.id=id+_main;
 main.className=morebox;
 main.innerHTML=This box should get created, but it doesnt because form
didnt get created;
 $(#+this.frm).prepend(main);
}
tst=new appLayer('Test');
/script
/body
/html
END PAGE-

The form object does not get created.  I don't have any problems appending
other objects such as divs, but the form object won't work anymore.

It works fine in 1.0.4.  Try it out.

Thanks in advance.

Jeremy

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Retrieve a from iframe

2007-01-25 Thread David Gironella
I test it but firefox 2 say me that I cant access to
HTMLDocument.getElementByTagName

 

Giro.

 

 

 

  _  

De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre
de Blair McKenzie
Enviado el: jueves, 25 de enero de 2007 12:41
Para: jQuery Discussion.
Asunto: Re: [jQuery] Retrieve a from iframe

 

What about:
var a=$(nothing);
$(iframe).each(function(){
   a.add(this.contentDocument.getElementsByTagName(a));
});

On 1/25/07, David Gironella [EMAIL PROTECTED] wrote:

I can't place code inside Iframe.

 

Thk.

Giro.

 

 

  _  

De: [EMAIL PROTECTED] [mailto: mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] En nombre de Blair McKenzie
Enviado el: jueves, 25 de enero de 2007 12:18
Para: jQuery Discussion.
Asunto: Re: [jQuery] Retrieve a from iframe

 

The only way to use jQuery across frames is to include jQuery in each
frame's source. If they do, then you could do something like:
var a=$(nothing);
$(iframe).each(function(){
   if (this.jQuery ) a.add(this.jQuery(a));
});

Blair

On 1/25/07, David Gironella [EMAIL PROTECTED] wrote: 

How can I get all A from all IFRAMES in web?

 

Thk.

 

Giro.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



-- 
Este mensaje ha sido analizado por  http://www.mailscanner.info/
MailScanner 
en busca de virus y otros contenidos peligrosos, 
y se considera que está limpio. 
MailScanner agradece a transtec http://www.transtec.co.uk/  Computers por
su apoyo. 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





-- 
Este mensaje ha sido analizado por  http://www.mailscanner.info/
MailScanner 
en busca de virus y otros contenidos peligrosos, 
y se considera que está limpio. 
MailScanner agradece a transtec Computers http://www.transtec.co.uk/  por
su apoyo. 

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] fadeIn fadeOut on timers, elem.style empty error

2007-01-25 Thread Neko
Hello to you jquery fans out there,
Im using innerfade to fade two areas randomly, stopping the random fading when 
a user hovers a link, showing the assozieated logo for the hovered link.
The Problem is that after some time the random fading just stops, while an 
error is thrown within jquery.js.
Error: elem.style has no properties Source File: ../js/jquery.js Line: 12 
Its the latest pack available.
You can find the Code at http://pastey.net/5487 including some 
explanatory Comments.
Id be pleased if somebody could take a look at it, i could just discard 
using jquery fadeIn but im trying to learn from it  :) 

greetings,
 Jonas Wolff


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Retrieve a from iframe

2007-01-25 Thread Blair McKenzie

Ah. That was my last idea. Sorry

Blair

On 1/25/07, David Gironella [EMAIL PROTECTED] wrote:


 I test it but firefox 2 say me that I cant access to
HTMLDocument.getElementByTagName



Giro.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Release: Treeview plugin

2007-01-25 Thread Jörn Zaefferer
I'd like to announce the release of my Treeview plugin for jQuery, which 
is based on the work of a href=http://be.twixt.us/jquery/;Myles 
Angell/a. It allows you to take nested unordered lists and convert 
them into a collapsable and expandable tree. It provides options to 
animate toggling, display the tree collapsed at first, select certain 
branches to start open or closed, and to create a tree controller to 
collapse, expand or toggle all branches at once.

Documentation, a demo, downloads can all be found on the a 
href=http://bassistance.de/jquery-plugins/jquery-plugin-treeview/;Treeview 
plugin page/a.

Have fun using the treeview, your feedback is of course appreciated.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: Treeview plugin

2007-01-25 Thread limodou
On 1/25/07, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 I'd like to announce the release of my Treeview plugin for jQuery, which
 is based on the work of a href=http://be.twixt.us/jquery/;Myles
 Angell/a. It allows you to take nested unordered lists and convert
 them into a collapsable and expandable tree. It provides options to
 animate toggling, display the tree collapsed at first, select certain
 branches to start open or closed, and to create a tree controller to
 collapse, expand or toggle all branches at once.

 Documentation, a demo, downloads can all be found on the a
 href=http://bassistance.de/jquery-plugins/jquery-plugin-treeview/;Treeview
 plugin page/a.

 Have fun using the treeview, your feedback is of course appreciated.

I tried it recently, and it's excellent. And I want to know if it can
support live modify, just like : add , remove, change?

And I don't know if it uses metadata plugin, because I don't see there
is any invoke to metadata, and I remove metadata from demo html page,
there is no bugs at all.


-- 
I like python!
UliPad The Python Editor: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: Treeview plugin

2007-01-25 Thread Rafael Santos

Thank you so much Jörn, it's really good although animations it's not
beautiful @ my IE.
Anyway, i'd like to know how the plugin detected the actions inside
#treecontrol? reading textNodes inside a?

2007/1/25, Jörn Zaefferer [EMAIL PROTECTED]:


I'd like to announce the release of my Treeview plugin for jQuery, which
is based on the work of a href=http://be.twixt.us/jquery/;Myles
Angell/a. It allows you to take nested unordered lists and convert
them into a collapsable and expandable tree. It provides options to
animate toggling, display the tree collapsed at first, select certain
branches to start open or closed, and to create a tree controller to
collapse, expand or toggle all branches at once.

Documentation, a demo, downloads can all be found on the a
href=http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
Treeview
plugin page/a.

Have fun using the treeview, your feedback is of course appreciated.

--
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Rafael Santos Sà :: webdeveloper
www.rafael-santos.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Some Firefox search plugins I made

2007-01-25 Thread j. siefer

*g funny, but i think ill use it, thanks
-- 
View this message in context: 
http://www.nabble.com/Some-Firefox-search-plugins-I-made-tf3097158.html#a8612971
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dropdown menu with IE select fix?

2007-01-25 Thread Brandon Aaron
It just needs to be applied to the element that *should* show up on
top of a select in IE.

--
Brandon Aaron

On 1/24/07, rolfsf [EMAIL PROTECTED] wrote:


 What element would I apply bgiframe to - the select or the nested lists in
 the menu? I've played a bit with the lists but it's not working yet.


 Sure, just use the bgiframe plugin found in the plugins svn.
 http://jquery.com/dev/svn/trunk/plugins/bgiframe/bgiframe.js?format=txt

 --
 Brandon Aaron


 --
 View this message in context: 
 http://www.nabble.com/dropdown-menu-with-IE-select-fix--tf3084885.html#a8594257
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Select Box

2007-01-25 Thread Dave Methvin
 me=document.getElementById('subselect');

 for(var i = 0;i  me.length;i++) {
 if(me.options[i].selected == true){
 }
 } 

Doesn't this work?

$(#subselect option:selected).each(function(){
  // do something with selected options
});

The plugin is good if you are adding/removing options a lot.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] API-Draft Looks great!

2007-01-25 Thread Christopher Jordan
This may have already been dicussed, but I just now noticed it. Has 
anyone looked at http://joern.jquery.com/api-draft/cat.xml#cat recently? 
It now contains the different sections of the API in a collapsible 
tree-view.

I think this is Jörn's baby (the link contains 'joern' so I'm making 
that guess. I can't remember from the original thread that talked about 
this site), and my hat's off to you, man! I really like the Wiki docs on 
the main jQuery site, but often times I find myself using this 
particular version of the API.

Very nice. :o)

Cheers,
Chris

-- 
http://cjordan.info


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Thickbox incompatible with jQuery 1.1

2007-01-25 Thread Sam Collett
On 25/01/07, agent2026 [EMAIL PROTECTED] wrote:

 But if you want something that does a lot more, than why would you be using
 ThickBox in the first place?  There are plenty of other lightboxes out there
 with bells and whistles you can blow to your hearts content.  ThickBox is
 the lightweight, 'One box to rule them all' solution.  Keep it simple, and
 keep it small,
 http://codylindley.com/Javascript/257/thickbox-one-box-to-rule-them-all as
 it was intended to be .

 Adam


You keep a simple core, but it would be nice if other developers could
use Thickbox as a base for their 'own bells and whistles'. Get a good
solid base for others to build on, rather than them needing to do
their own from scratch (so they don't need to work out how to centre
on the page, overlay page content, resize images etc).

e.g.

In your html page add thickbox:
script type=text/javascript  src=thickbox.js/script

And add the class 'thickbox' to anything you want to show in one.

Want it to look better (like adding transparency or transitions)? Just
include another script:
script type=text/javascript  src=thickbox-addon-fancy.js/script

No need to change your JavaScript (or even know JavaScript).

Like you say - 'one box to rule them all'. If developers want to have
something else thickbox isn't a choice. Having it modular means that
they can use it without going somewhere else and needing prototype or
changing a lot of code.




 Sam Collett wrote:
 
  If (or should I say when) Thickbox does a lot more (like transition
  animations between images in a gallery etc), then the code size would
  increase.
 

 --
 View this message in context: 
 http://www.nabble.com/Thickbox-incompatible-with-jQuery-1.1-tf3063738.html#a8599437
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] cant append() form objects

2007-01-25 Thread Brandon Aaron
Is this just in IE or in other browsers too?

--
Brandon Aaron

On 1/24/07, Jeremy Dill [EMAIL PROTECTED] wrote:


 After upgrading from 1.0.4 to 1.1.1 the following code no longer works.
 Please tell me if there is a solution to this issue.

 ---WORKING HTML TEST
 PAGE
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
 titletest/title
 style
 .layerbox{font-size:8pt;text-align:left;padding:10px;margin:20px;border:1px
 solid #B2C5EC; background-color:#FCFCFC;float:left;
 clear:left;height:200px;width:200px}
 /style
 script type='text/javascript'
 src='/js/jquery111.js'/script
 /head

 body
 div id='content'/div
 script language=JavaScript
 function appLayer(id){
  //create layerbox
   var layerbox=document.createElement('div');
   layerbox.id=id+_layer;
   layerbox.className=layerbox;
   $(#content).prepend(layerbox);
   this.divName=layerbox.id;
   this.layerobj=layerbox;
  //create form
   var frm=document.createElement('form');
   frm.id=id+_form;
   frm.name=id+_form;
   frm.action = index.php;
   frm.method = post;
this.frm=frm.id;
 //---HERE IS THE PROBLEM-///
   $(#+this.divName).append(frm);
 //---APPEND DOESNT WORK FOR FORM OBJECT--///
   //create main div
  var main=document.createElement('div');
  main.id=id+_main;
  main.className=morebox;
  main.innerHTML=This box should get created, but it doesnt because form
 didnt get created;
  $(#+this.frm).prepend(main);
 }
 tst=new appLayer('Test');
 /script
 /body
 /html
 END PAGE-

 The form object does not get created.  I don't have any problems appending
 other objects such as divs, but the form object won't work anymore.

 It works fine in 1.0.4.  Try it out.

 Thanks in advance.

 Jeremy
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Giving up regular DOCTYPES

2007-01-25 Thread arnaud sellenet
Hi !
I'm new to the list, and to jQuery too (I've played a little with  
prototype, but jquery realy seems  worth a try)

This is an example I think, where using your own attributes gets  
useful, not to say necessary :
I'm writing a calendar where user can select a days range clicking on  
the first day of the range, then on the second one.
User can only select, say, ranges from january 24th to march 15th.
When first day is selected, I want to have the days before the first  
area change style when the second day is hover'ed

So this is how I would do this :

div class=calendarmonthh3January/h3
div  class=calendarday1/div
div  class=calendarday2/div

div  class=calendarday23/div
div selectableday=1 class=calendarday24/div
div selectableday=2 class=calendarday25/div
.
div selectableday=41 class=calendarday15/div
/div

On hover of day D2, while day D1 was selected, I just have to change  
style of the divs of class calendarday with selectableday attribute  
lower than D1's selectableday attribute and greater than D2's  
selectableday attribute.

Do you think of a better way, without using a custom attribute (I'm  
not 100% sure but seems like you can't use numeric classes nor id  
right ?)


Le 25 janv. 07 à 04:13, Ⓙⓐⓚⓔ a écrit :

 I gave up relying on custom doctypes when I realized no matter how
 nice a dtd I made, the only use was at the validaters! I looked around
 for syntax driven editors, and found only a few and they were schema
 based!

 Now I just use XHTML 1.1 and play my own tricks... with the help of  
 jquery!

 h1 class=editable is just fine for me.

 On 1/24/07, zelexir [EMAIL PROTECTED] wrote:

 So, I had a wakeup call the other day when looking for a solution  
 to a
 problem of mine when I bumped into this:
 http://www.cs.tut.fi/~jkorpela/html/own-dtd.html Creating your own  
 DTD for
 HTML validation .

 So I'm wondering, why this isn't more widespread.

 Now I can write code like this: h1 editable=trueThis is a  
 topic/h1 and
 still make validation (not for the standard but for my edited  
 version of
 one).

 So I made a few changes in a edit in place script I'm working on,  
 and I
 gotta say it makes the source much more readable.

 so instead of
 h1 id=topic-5-news class=editableLineThis is the topic of news
 nr5/h1

 I get
 h1 db=news field=topic unique=5 editable=lineThis is the  
 topic of
 news nr5/h1

 Or like I'm using it:
 div db=news unique=5
h1 field=topic editable=trueThis is the topic of news  
 nr5/h1
div field=content editable=trueThis is a editable  
 paragraph/div
 /div

 and with jQuery I'm able to use the selectors $('h1 
 [editable=true]') to
 generate a input field and $('div[editable=true]') to generate a  
 WYSIWYG
 editor.

 I get the current table and unique id from checking the parent div's
 parameters, and the field from the current element.

 Ok so this is getting a little long, but why oh why, havn't I  
 thought of
 this before? And whats the catch?!
 I'ts late and I really gotta get some sleep, but I would love to  
 hear some
 input in this from fellow JQuery users, we do want our code to be  
 easy to
 read, don't we? :P
 --
 View this message in context: http://www.nabble.com/Giving-up- 
 regular-DOCTYPES-tf3095989.html#a8595317
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



 -- 
 Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Why am I getting this error message?

2007-01-25 Thread Rick Faircloth
Thanks, Adam...

Rick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of agent2026
Sent: Thursday, January 25, 2007 4:55 AM
To: discuss@jquery.com
Subject: Re: [jQuery] Why am I getting this error message?


Actually he's not trying to debug in IE, he's testing in IE and getting that
error.

@Rick: The error you're getting may be caused by 
http://jquery.com/dev/bugs/bug/843/ this bug .  Basically you need to change
your settings of zIndex to a string.

Adam





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Giving up regular DOCTYPES

2007-01-25 Thread Olaf Bosch
arnaud sellenet schrieb:

 Do you think of a better way, without using a custom attribute (I'm  
 not 100% sure but seems like you can't use numeric classes nor id  
 right ?)

Yes you have a way. Append a second class, so:

div class=calendarmonthh3January/h3
div  class=calendarday1/div
div  class=calendarday2/div

div  class=calendarday23/div
div  class=calendarday selectableday124/div
div  class=calendarday selectableday225/div
.
div  class=calendarday selectableday4115/div
/div

Then strip the string selectableday from the class in the script and
you have the numbers from custom attribute to do what you will.

-- 
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] help with append

2007-01-25 Thread Vaska
I've been toying with this backwards and forwards and I can't get  
it...have tried using 'after' as well.

I'm trying to append a paragraph with an ID of 'dhtml'. In the past,  
this worked, but it was not inserting the line within the paragraph...

$('div#dhtml').html(html);

My best guess has me thinking that this should work (inserting/ 
appending the info inside of the paragraph), but it is clearly  
failing here:

$('p#dhtml').append(html(html));

Am I missing something obvious here?

Thanks...


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Effect function runs twice

2007-01-25 Thread Jon Ege Ronnenberg

This might stupid question but how do I get version 1.1.1? The one I just
downloaded from jquery.org is 1.1.

On 1/22/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote:


looks like twice firing clicks was fixed in 1.1.1!

On 1/21/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote:
 is it really hiding 2 times... or a jerky hide of a tiny label?

 make the label much larger and try hide(1) for a very very slow
hide!

 On 1/21/07, Jon Ege Ronnenberg [EMAIL PROTECTED] wrote:
  Uhh I forgot to tell ya that you can see it live here:
  http://www.postcards.dk/jon-test/newsletter.php
 
  Regards, Jon.
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
 


 --
 Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ



--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Presentacular rewrite with jQuery?

2007-01-25 Thread Shane Graber - jQuery
I just happened onto Presentacular [1] for the S5 slideshow script
this morning and was wondering if anyone has rewritten it using
jQuery.

Shane

[1] http://labs.cavorite.com/presentacular/

-- 
-
Bender: Amy, you like cute things so I baked you a pony.
-

http://www.reefs.org - Where reefkeeping begins on the internet.
http://www.advancedaquarist.com - High quality, free monthly publication for
the reef keeping hobbyist.
http://www.aquaristcourses.org - Distance learning courses for the
marine aquarist.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] help with append

2007-01-25 Thread Sam Collett
On 25/01/07, Vaska [EMAIL PROTECTED] wrote:
 I've been toying with this backwards and forwards and I can't get
 it...have tried using 'after' as well.

 I'm trying to append a paragraph with an ID of 'dhtml'. In the past,
 this worked, but it was not inserting the line within the paragraph...

 $('div#dhtml').html(html);

 My best guess has me thinking that this should work (inserting/
 appending the info inside of the paragraph), but it is clearly
 failing here:

 $('p#dhtml').append(html(html));

 Am I missing something obvious here?

 Thanks...

That would replace the html. To append:

$('#dhtml').append(html)

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] API-Draft Looks great!

2007-01-25 Thread Mike Alsup
 This may have already been dicussed, but I just now noticed it. Has
 anyone looked at http://joern.jquery.com/api-draft/cat.xml#cat recently?
 It now contains the different sections of the API in a collapsible
 tree-view.

I agree.   It's really quite nice.  And it makes great use of plugins.
 Great work, Jörn.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Giving up regular DOCTYPES

2007-01-25 Thread Kristinn Sigmundsson
It is always (if not then atleast almost always) possible to do thing
like you describe without using custom attributes, BUT don't you think
that arnauds example makes more sense, codewise?

That way you can set the attribs easily
($(something).attr(selectableday, 1)) and then get all the
selectable days with $([EMAIL PROTECTED]).

I've just seen to many examples of javascript tools that use custom
strings in every availible attribute there is, for this to make any
sense anymore.

Is there any downside for using this?

On 1/25/07, Olaf Bosch [EMAIL PROTECTED] wrote:
 arnaud sellenet schrieb:

  Do you think of a better way, without using a custom attribute (I'm
  not 100% sure but seems like you can't use numeric classes nor id
  right ?)

 Yes you have a way. Append a second class, so:

 div class=calendarmonthh3January/h3
 div  class=calendarday1/div
 div  class=calendarday2/div
 
 div  class=calendarday23/div
 div  class=calendarday selectableday124/div
 div  class=calendarday selectableday225/div
 .
 div  class=calendarday selectableday4115/div
 /div

 Then strip the string selectableday from the class in the script and
 you have the numbers from custom attribute to do what you will.

 --
 Viele Grüße, Olaf

 ---
 [EMAIL PROTECTED]
 http://olaf-bosch.de
 www.akitafreund.de
 ---

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



-- 
——
 Med Vänliga Hälsningar
 Kristinn Kiddi Sigmundsson
   0707-971938
——

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: Treeview plugin

2007-01-25 Thread Jörn Zaefferer
limodou schrieb:
 I tried it recently, and it's excellent. And I want to know if it can
 support live modify, just like : add , remove, change?
   
Well, so far it's only a tree*view* plugin. But it should be a good 
basis for further work in that area.
 And I don't know if it uses metadata plugin, because I don't see there
 is any invoke to metadata, and I remove metadata from demo html page,
 there is no bugs at all.
   
I had plans for using the metadata plugin, but dropped them. The release 
doesn't contain the link anymore.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: Treeview plugin

2007-01-25 Thread Jörn Zaefferer
Rafael Santos schrieb:
 Thank you so much Jörn, it's really good although animations it's not 
 beautiful @ my IE.
 Anyway, i'd like to know how the plugin detected the actions inside 
 #treecontrol? reading textNodes inside a? 
Take a look at the treeController function inside the plugin. It simply 
assigns click events to the three elements inside the control.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Easy DOM Creation plugin not working as expected.

2007-01-25 Thread bmsterling

Hey guys and gals,
I am using the Dom creation plugin and when I pass the json information I
get nothing in return.  Below is the function I use:

buildScenarioTableList = function(list){
$.tpl(list, function(){
   return [
  'tr', { 'class':MyTableRow }, [
 'td', { 'class':MyTableCol2 }, [ 'nbsp;' ],
 'td', { 'class':MyTableCol1 }, [ this.active ],
 'td', { 'class':MyTableCol2 }, [ this.name ],
 'td', { 'class':MyTableCol2 }, [ this.desc ],
 'td', { 'class':MyTableCol2 }, [ this.id ],
 'td', { 'class':MyTableCol2 }, [ this.id ],
 'td', { 'class':MyTableCol2 }, [ this.id ]]
   ];
}).appendTo($('#fill-table  tbody'));
}

This is the info being passed:

{[id: 2, active: 'yes', name: 'Simple', desc: 'This is the
description'],[id: 3, active: 'yes', name: 'Simple', desc: 'This is the
description']}

The url in question: http://ov.informationexperts.com/index.htm (you will
need to login, just put anything in those two fields and hit submit) or
execute this function in firebug: buildECS();  You will see a table with
active, name.

Thanks,

--
Benjamin Sterling
http://KenzoMedia.com
http://KenzoHosting.com
-- 
View this message in context: 
http://www.nabble.com/Easy-DOM-Creation-plugin-not-working-as-expected.-tf3115987.html#a8631065
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] External or anonymous function - which is best?

2007-01-25 Thread Jörn Zaefferer
PragueExpat schrieb:
 My question: is it better to define this function as above and pass this
 or to define an anonymous function within the .each statement? I read that
 the above method only has to compile the function once, as opposed to a
 re-compile each time the (anonymous) function runs. What is the recommend
 way of doing this?
   
I'd like to quote here:

We *should* forget about small efficiencies, say about 97% of the time: 
premature optimizations is the root of all evil. - Donal E. Knuth

We follow two rules in the matter of optimization:
Rule 1. Don't do it.
Rule 2 (for experts only). Don't do it yet - that is, not until you have 
perfectly clear and unoptimized solution.

In other words: Write clean and succinct code! Something like this:

$(function(){
 function resizeDiv(){
  var x = $(this);
  if(x.height()  600){
 x.css(height, 600);
}
 };
 $(#mydiv).each(resizeDiv);
});

And in case you don't use that function anywhere else:

$(function(){
 $(#mydiv).each(function(){
  var x = $(this);
  if(x.height()  600){
 x.css(height,600);
}
 }
);
});

The cleaner your code, the easier it is to optimize later, but only 
where really appropiate. Firebug's profiler is a great tool for that issue.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Getting Started with the Form Plugin

2007-01-25 Thread Mike Alsup
For anyone seeking information about how to manage forms with jQuery,
I've just updated the Form Plugin example page at:

http://malsup.com/jquery/form/

You can find a quick start guide, API docs, examples, a FAQ and more.

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Getting Started with the Form Plugin

2007-01-25 Thread Jörn Zaefferer
Mike Alsup schrieb:
 For anyone seeking information about how to manage forms with jQuery,
 I've just updated the Form Plugin example page at:

 http://malsup.com/jquery/form/

 You can find a quick start guide, API docs, examples, a FAQ and more.
   
Great work on that page, Mike! And another great example of some jQuery 
plugins at work, especailly tabs  history and chili.

Did you use a (modified) version of my docTool for the API?

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] External or anonymous function - which is best?

2007-01-25 Thread Prague Expat
Thanks, that makes sense. One more thing - after this code runs, is the 
resizeDiv function in the global namespace, in a persistant JQuery object, 
or garbage collected?


- Original Message - 
From: Jörn Zaefferer [EMAIL PROTECTED]
To: jQuery Discussion. discuss@jquery.com
Sent: Thursday, January 25, 2007 4:37 PM
Subject: Re: [jQuery] External or anonymous function - which is best?


PragueExpat schrieb:
 My question: is it better to define this function as above and pass this
 or to define an anonymous function within the .each statement? I read that
 the above method only has to compile the function once, as opposed to a
 re-compile each time the (anonymous) function runs. What is the recommend
 way of doing this?

I'd like to quote here:

We *should* forget about small efficiencies, say about 97% of the time:
premature optimizations is the root of all evil. - Donal E. Knuth

We follow two rules in the matter of optimization:
Rule 1. Don't do it.
Rule 2 (for experts only). Don't do it yet - that is, not until you have
perfectly clear and unoptimized solution.

In other words: Write clean and succinct code! Something like this:

$(function(){
 function resizeDiv(){
  var x = $(this);
  if(x.height()  600){
x.css(height, 600);
}
 };
 $(#mydiv).each(resizeDiv);
});

And in case you don't use that function anywhere else:

$(function(){
 $(#mydiv).each(function(){
  var x = $(this);
  if(x.height()  600){
x.css(height,600);
}
 }
);
});

The cleaner your code, the easier it is to optimize later, but only
where really appropiate. Firebug's profiler is a great tool for that issue.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Getting Started with the Form Plugin

2007-01-25 Thread Klaus Hartl
Jörn Zaefferer wrote:
 Mike Alsup schrieb:
 For anyone seeking information about how to manage forms with jQuery,
 I've just updated the Form Plugin example page at:

 http://malsup.com/jquery/form/

 You can find a quick start guide, API docs, examples, a FAQ and more.
   
 Great work on that page, Mike! And another great example of some jQuery 
 plugins at work, especailly tabs  history and chili.

Yeah, nice! Thanks for using...


-- Klaus


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] External or anonymous function - which is best?

2007-01-25 Thread Jörn Zaefferer
Prague Expat schrieb:
 Thanks, that makes sense. One more thing - after this code runs, is the 
 resizeDiv function in the global namespace, in a persistant JQuery object, 
 or garbage collected?
The DOM ready function provides a private scope, therefore the function 
shouldn't be visible anywhere else, so to my knowledge, it is available 
for garbage collection.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Getting Started with the Form Plugin

2007-01-25 Thread Klaus Hartl
Mike Alsup wrote:
 For anyone seeking information about how to manage forms with jQuery,
 I've just updated the Form Plugin example page at:
 
 http://malsup.com/jquery/form/
 
 You can find a quick start guide, API docs, examples, a FAQ and more.
 
 Mike

I like how you combined bookmarkable and non bookmarkable tabs and 
seeing that it actually works!

:-)


-- Klaus


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] External or anonymous function - which is best?

2007-01-25 Thread Michael Geary
 $(document).ready(function(){
 
  function resizeDiv(that){
   var x = $(that);
   if(x.height()  600){
x.css(height,600px);
   }
  };
 
  $(#mydiv).each(function(){resizeDiv(this)});
 
 });
 
 My question: is it better to define this function as above 
 and pass this or to define an anonymous function within
 the .each statement? I read that the above method only
 has to compile the function once, as opposed to a re-compile
 each time the (anonymous) function runs.

Functions are compiled to bytecode once, not each time they are executed.
Maybe someone was talking about the Function constructor which takes a
string argument and does compile the function each time you execute the
constructor?

 What is the recommend way of doing this?

Well, there's certainly no reason to use *two* functions here. You could
write the code either with a single anonymous function or a single named
function, as shown in Jörn's two examples, whichever you prefer.

-Mike


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread jgrucza

I have a somewhat similar problem with ID selectors, and I posted a message
about it and a bug but so far I haven't gotten a single response from anyone
(here's the bug: http://jquery.com/dev/bugs/bug/881/).

My problem is IDs preceded by a class or another ID (i.e. .myClass #myId
or #firstId #secondId).  It's causing an exception in the jquery code on
this line:

   if ( m[1] == #  ret[ret.length-1].getElementById ) {

I don't know if it's related to yours or not.

-Jennifer


Hi,

I've just upgraded from 1.0.3 to 1.1.1 and some selectors don't work 
anymore.
A simple selector like $(div#tab_1) cant' find the div div id=tab_1 
in v1.1.1 while there was no problem with v1.0.3 .

So unless the selecting philosophy has greatly changed between these two 
versions, I guess this is a pretty important bug.

It seems to be OK on 1.0.4 though, but I have a $(document).ready is not 
a function error.

Can somebody tell me if I'm wrong or if it's a bug ? 

Thanks in advance 

-- 
Vincent FUCHS

-- 
View this message in context: 
http://www.nabble.com/simple-selector-with-ID-doesn%27t-work-anymore-tf3080046.html#a8636549
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Getting Started with the Form Plugin

2007-01-25 Thread Mike Alsup
 Did you use a (modified) version of my docTool for the API?

Hi Jörn,

Unfortunately I already had that part done when you posted about your
docTool!  When I get time I may update that page using the docTool
because it provides some extra bits that I didn't include (tooltips,
etc).  But first I want to get some more examples out there.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Getting Started with the Form Plugin

2007-01-25 Thread Jörn Zaefferer
Mike Alsup schrieb:
 Did you use a (modified) version of my docTool for the API?
 

 Hi Jörn,

 Unfortunately I already had that part done when you posted about your
 docTool!  When I get time I may update that page using the docTool
 because it provides some extra bits that I didn't include (tooltips,
 etc).  But first I want to get some more examples out there.
   
Ok then. I'm gonna update it soon. The version I used for the treeview 
plugin now supports @option tags.

I'd also like to use Chili for the API browser. Looks like I have the 
same problem that you had. What exactly did you modify to get it working?

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Why won't this code work?

2007-01-25 Thread Rick Faircloth
The link Toggle the Box and the boxed text show up on the page,
but the boxed text is not hidden and the link does not toggle the box.

What's wrong?

Rick



!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN

html
head
titlejQuery Slick Box/title

script type=text/javascript src=jquery.js

$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('#slickbox').hide();
  
   }); 
 
 // toggles the slickbox on clicking the noted link  
  $('a#slick-toggle').click(function() {
$('#slickbox').toggle(400);
return false;

});

/script


/head

body


pa href=# id=slick-toggleToggle the Box/a/p
br
div id=slickbox style=background: #EEE; border: 1px solid #900; height:
15px;
This is the box that will be shown and hidden and toggled at your whim.
It has inline styles, which typically is a bad thing, but for the sake of
our demonstration, we'll let it slide, right?
/div


/body
/html
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] cant append() form objects

2007-01-25 Thread Jeremy Dill

With Jquery 1.1.1
Firefox 1.5 - Fails
Firefox 2.0 - Fails
IE 6.0  - Fails
IE 7.0  - Fails

With Jquery 1.0.4
Firefox 1.5 - Works
Firefox 2.0 - Works
IE 6.0  - Works
IE 7.0  - Works

Seems to be fairly consistant at least across these browsers.

-Original Message-
From: Brandon Aaron [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 25, 2007 7:48 AM
To: [EMAIL PROTECTED]; jQuery Discussion.
Subject: Re: [jQuery] cant append() form objects

Is this just in IE or in other browsers too?

--
Brandon Aaron

On 1/24/07, Jeremy Dill [EMAIL PROTECTED] wrote:


 After upgrading from 1.0.4 to 1.1.1 the following code no longer works.
 Please tell me if there is a solution to this issue.

 ---WORKING HTML TEST
 PAGE
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html; 
 charset=iso-8859-1 / titletest/title style 
 .layerbox{font-size:8pt;text-align:left;padding:10px;margin:20px;borde
 r:1px solid #B2C5EC; background-color:#FCFCFC;float:left;
 clear:left;height:200px;width:200px}
 /style
 script type='text/javascript'
 src='/js/jquery111.js'/script
 /head

 body
 div id='content'/div
 script language=JavaScript
 function appLayer(id){
  //create layerbox
   var layerbox=document.createElement('div');
   layerbox.id=id+_layer;
   layerbox.className=layerbox;
   $(#content).prepend(layerbox);
   this.divName=layerbox.id;
   this.layerobj=layerbox;
  //create form
   var frm=document.createElement('form');
   frm.id=id+_form;
   frm.name=id+_form;
   frm.action = index.php;
   frm.method = post;
this.frm=frm.id;
 //---HERE IS THE PROBLEM-///
   $(#+this.divName).append(frm);
 //---APPEND DOESNT WORK FOR FORM OBJECT--///
   //create main div
  var main=document.createElement('div');
  main.id=id+_main;
  main.className=morebox;
  main.innerHTML=This box should get created, but it doesnt because 
 form didnt get created;  $(#+this.frm).prepend(main); } tst=new 
 appLayer('Test'); /script /body /html 
 END PAGE-

 The form object does not get created.  I don't have any problems 
 appending other objects such as divs, but the form object won't work
anymore.

 It works fine in 1.0.4.  Try it out.

 Thanks in advance.

 Jeremy
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Getting Started with the Form Plugin

2007-01-25 Thread Mike Alsup
 I'd also like to use Chili for the API browser. Looks like I have the
 same problem that you had. What exactly did you modify to get it working?

Yeah, I like Chili a lot.  I made a couple changes for optimization
because I didn't want unnecessary server calls and there were a couple
minor bugs bug Andrea is rolling these changes/fixes into the next
rev.  Note that Opera support is still pending (I disable Chili for
Opera for now).

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Getting Started with the Form Plugin

2007-01-25 Thread Mike Alsup
 Recently I've started using the form plugin and I've noticed in firebug that
 the X-Requested-With header is not being sended for POSTs requests. GETs
 work fine.
 I'm using last versions for both jquery and form plugin and Firefox 2.0
 is it normal behaviour or do I loosing something?


Jip,

I just tried both 'get' and 'post' and both are sending the proper
headers.  $.ajax (which is what the form plugin uses)  *always* set
the X-Requested-With header.  Do you have a sample page?

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Why won't this code work?

2007-01-25 Thread Christof Donat
Hi,

   $(document).ready(function() {
  // hides the slickbox as soon as the DOM is ready
  // (a little sooner than page load)
   $('#slickbox').hide();

});

  // toggles the slickbox on clicking the noted link
   $('a#slick-toggle').click(function() {
 $('#slickbox').toggle(400);
 return false;

 });

try it this way:

$(document).ready(function() {
  $('#slickbox').hide();
  $('a#slick-toggle').click(function() {
$('#slickbox').toggle(400);
return false;
  });
});

Then the Element behind $('a#slick-toggle') does exist when you try to use it.

BTW.: If you are shure, that the id slick-toggle is alway a a-element, you 
will be off better with $('#slick-toggle'). In that case jQuery can simply 
use document.getElementById(). I am not shure about jQuery 1.1, but older 
Versions with $('a#slick-toggle') would search the whole document tree for 
a-tags and check if they have the given id. That is of course a lot slower.

You can even spare another jquery query, but don't expect too much speed up 
from that:

$(document).ready(function() {
  var sl = $('#slickbox').hide();
  $('a#slick-toggle').click(function() {
sl.toggle(400);
return false;
  });
});

Since you already use an id here, the second query doesn't really take much 
time.

Christof

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] unobtrus

2007-01-25 Thread Mark D. Lincoln
All,

Okay, I am confused by the responses and maybe it's my own fault for asking the 
question the way that I did.  We are on board with the idea of keeping the 
presentation and behavior separate for both flexibility and maintainability of 
the application.  In fact all of our client applications for both Windows and 
the Web are design this way to facilitate their maintenance and enhancement.  
We have an extensive component plug-in library that makes our development of 
very powerful business applications a snap.  This is one of the reasons that we 
were drawn to JQuery when we discovered it.  What my question should have been 
relates to the issue of graceful degradation of the Web application.  Is it 
important for us to be concerned with our Web portal applications degrading 
gracefully if the user has scripting disabled in their browser?

Mark D. Lincoln
 
Mark D. Lincoln, Director of Research  Development
Eye On Solutions, LLC
(866) 253-9366x101
www.eyeonsolutions.com
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
Sent: Thursday, January 25, 2007 1:26 AM
To: jQuery Discussion.
Subject: Re: [jQuery] unobtrus

It's easy to lump 'crap html' with 'requiring javascript'... both are
undesirable! Whereas the former has no merit, the latter is sometimes
required for the presentation of beautiful sites!

John's description of 'crap html' shows just how bad the nightmare can be!

So let's all end the nightmare,with jQuery  css to the rescue!

On 1/24/07, John Beppu [EMAIL PROTECTED] wrote:
 I'd like to also add that Unobtrusive Javascript is just cleaner and
 easier to understand than the alternative.

 When I try to analyze a page that has tons of Javascript mixed with
 HTML, it can be very difficult see what's going on.  Contrast that
 with the unobtrusive approach where you can use CSS selectors or XPath
 queries to grab the elements you care about and apply behaviours to
 them.If you're good at naming your CSS classes and ids, the code
 you end up with has the potential to be so much cleaner and so much
 more beautiful.

 I don't even think it's more work to take this approach.

 It's not a hassle compared to the maintenance nightmare you might face
 otherwise with entagled Javascript and HTML.

 The Separation of Concerns is a good thing.  Many significant advances
 in the art of programming have been through people figuring out ways
 to separating concerns from each other.  MVC separates Models, Views,
 and Controllers from each other -- the benefit is understandability.
 Using HTML for content and CSS for presentation is another form of
 separation where two aspects of display have been separated, and
 again, this makes things easier to understand and way more flexible,
 because now the 2 parts can vary independently.  Javascript being
 separated from HTML is yet another step in this direction.

 If you're not sold on the general principles behind separating
 concerns, try to imagine the opposite.

 Imagine... a PHP page that makes SQL queries right before it populates
 a big HTML table that makes heavy use of nested tables for layout but
 also has some inlined CSS via the style attribute, and to top it all
 off the HTML is littered with onclick handlers and script tags at
 various places in the page.

 Now imagine a whole web site built this way.  (PAIN)




 That's what we're trying to get away from.

 That's why we (as programmers) are always coming up with new ways to
 separate concerns.

 It's a trend that you ignore at your own peril.



 (I'm not sure what possessed me to write so much, but I gotta post
 that to my blog ;-)


 On 1/24/07, Klaus Hartl [EMAIL PROTECTED] wrote:
  Ⓙⓐⓚⓔ wrote:
   there are a million reasons to separate js from the html!
  
   but UOJS is the ability for a page to still work without javascript. A
   very admirable feature!
 
  I'd say accessibility is one - obviously the most important - aspect of
  UOJS. You could probably code accessible without separating js and html
  but since the whole UOJS movement started adherers also consider
  separation good practice.
 
  I pretty much believe that this separation is part of UOJS, but hey,
  nowhere is there an official definition so in the end it's just another
  personal opinion.
 
  And yes of course, it is admirable :-) Everybody should be doing it!
 
 
  -- Klaus
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] unobtrus

2007-01-25 Thread Marshall Salinger
Hi Mark,

It seems that in this very 'controlled' situation, you shouldn't have to be too 
concerned with it. They aren't web based so you don't have to cater to every 
situation. You set the bar for the requirements of your portal, so it's more 
like software. You have to have XYZ to run it, period.

-Marshall


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark D. Lincoln
Sent: Thursday, January 25, 2007 9:51 AM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] unobtrus

All,

Okay, I am confused by the responses and maybe it's my own fault for asking the 
question the way that I did.  We are on board with the idea of keeping the 
presentation and behavior separate for both flexibility and maintainability of 
the application.  In fact all of our client applications for both Windows and 
the Web are design this way to facilitate their maintenance and enhancement.  
We have an extensive component plug-in library that makes our development of 
very powerful business applications a snap.  This is one of the reasons that we 
were drawn to JQuery when we discovered it.  What my question should have been 
relates to the issue of graceful degradation of the Web application.  Is it 
important for us to be concerned with our Web portal applications degrading 
gracefully if the user has scripting disabled in their browser?

Mark D. Lincoln
 
Mark D. Lincoln, Director of Research  Development
Eye On Solutions, LLC
(866) 253-9366x101
www.eyeonsolutions.com
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
Sent: Thursday, January 25, 2007 1:26 AM
To: jQuery Discussion.
Subject: Re: [jQuery] unobtrus

It's easy to lump 'crap html' with 'requiring javascript'... both are
undesirable! Whereas the former has no merit, the latter is sometimes
required for the presentation of beautiful sites!

John's description of 'crap html' shows just how bad the nightmare can be!

So let's all end the nightmare,with jQuery  css to the rescue!

On 1/24/07, John Beppu [EMAIL PROTECTED] wrote:
 I'd like to also add that Unobtrusive Javascript is just cleaner and
 easier to understand than the alternative.

 When I try to analyze a page that has tons of Javascript mixed with
 HTML, it can be very difficult see what's going on.  Contrast that
 with the unobtrusive approach where you can use CSS selectors or XPath
 queries to grab the elements you care about and apply behaviours to
 them.If you're good at naming your CSS classes and ids, the code
 you end up with has the potential to be so much cleaner and so much
 more beautiful.

 I don't even think it's more work to take this approach.

 It's not a hassle compared to the maintenance nightmare you might face
 otherwise with entagled Javascript and HTML.

 The Separation of Concerns is a good thing.  Many significant advances
 in the art of programming have been through people figuring out ways
 to separating concerns from each other.  MVC separates Models, Views,
 and Controllers from each other -- the benefit is understandability.
 Using HTML for content and CSS for presentation is another form of
 separation where two aspects of display have been separated, and
 again, this makes things easier to understand and way more flexible,
 because now the 2 parts can vary independently.  Javascript being
 separated from HTML is yet another step in this direction.

 If you're not sold on the general principles behind separating
 concerns, try to imagine the opposite.

 Imagine... a PHP page that makes SQL queries right before it populates
 a big HTML table that makes heavy use of nested tables for layout but
 also has some inlined CSS via the style attribute, and to top it all
 off the HTML is littered with onclick handlers and script tags at
 various places in the page.

 Now imagine a whole web site built this way.  (PAIN)




 That's what we're trying to get away from.

 That's why we (as programmers) are always coming up with new ways to
 separate concerns.

 It's a trend that you ignore at your own peril.



 (I'm not sure what possessed me to write so much, but I gotta post
 that to my blog ;-)


 On 1/24/07, Klaus Hartl [EMAIL PROTECTED] wrote:
  Ⓙⓐⓚⓔ wrote:
   there are a million reasons to separate js from the html!
  
   but UOJS is the ability for a page to still work without javascript. A
   very admirable feature!
 
  I'd say accessibility is one - obviously the most important - aspect of
  UOJS. You could probably code accessible without separating js and html
  but since the whole UOJS movement started adherers also consider
  separation good practice.
 
  I pretty much believe that this separation is part of UOJS, but hey,
  nowhere is there an official definition so in the end it's just another
  personal opinion.
 
  And yes of course, it is admirable :-) Everybody should be doing it!
 
 
  -- Klaus
 
  ___
  jQuery mailing list
  

Re: [jQuery] unobtrus

2007-01-25 Thread Rey Bango
Mark,

Having come from the corporate world, I fully understand your question 
and here's my perspective. If you effectively control your application's 
usage requirements (ie: browser, browser features, OS, hardware, etc), 
then you  have the ultimate say in which direction to head to. It sounds 
like you do and you fully disclose that to your target audience. While I 
always recommend coding in an unobtrusive way, you can effectively 
develop your app without regard for that because of special needs of you 
application and the fact that you make the requirements mandatory.

If you're web application was targeting a much broader audience where 
you have less controls over the requirements listed above, then I would 
certainly tell you that you should take graceful degradation seriously 
as you're more likely to encounter issues beyond your control.

I would still recommend that you seriously consider the advice given by 
many of the folks here because you never know if you'd one day like to 
take your portal system to a much broader audience.

Rey..

Mark D. Lincoln wrote:
 All,
 
 Okay, I am confused by the responses and maybe it's my own fault for asking 
 the question the way that I did.  We are on board with the idea of keeping 
 the presentation and behavior separate for both flexibility and 
 maintainability of the application.  In fact all of our client applications 
 for both Windows and the Web are design this way to facilitate their 
 maintenance and enhancement.  We have an extensive component plug-in 
 library that makes our development of very powerful business applications a 
 snap.  This is one of the reasons that we were drawn to JQuery when we 
 discovered it.  What my question should have been relates to the issue of 
 graceful degradation of the Web application.  Is it important for us to be 
 concerned with our Web portal applications degrading gracefully if the user 
 has scripting disabled in their browser?
 
 Mark D. Lincoln
  
 Mark D. Lincoln, Director of Research  Development
 Eye On Solutions, LLC
 (866) 253-9366x101
 www.eyeonsolutions.com
  
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
 Sent: Thursday, January 25, 2007 1:26 AM
 To: jQuery Discussion.
 Subject: Re: [jQuery] unobtrus
 
 It's easy to lump 'crap html' with 'requiring javascript'... both are
 undesirable! Whereas the former has no merit, the latter is sometimes
 required for the presentation of beautiful sites!
 
 John's description of 'crap html' shows just how bad the nightmare can be!
 
 So let's all end the nightmare,with jQuery  css to the rescue!
 
 On 1/24/07, John Beppu [EMAIL PROTECTED] wrote:
 I'd like to also add that Unobtrusive Javascript is just cleaner and
 easier to understand than the alternative.

 When I try to analyze a page that has tons of Javascript mixed with
 HTML, it can be very difficult see what's going on.  Contrast that
 with the unobtrusive approach where you can use CSS selectors or XPath
 queries to grab the elements you care about and apply behaviours to
 them.If you're good at naming your CSS classes and ids, the code
 you end up with has the potential to be so much cleaner and so much
 more beautiful.

 I don't even think it's more work to take this approach.

 It's not a hassle compared to the maintenance nightmare you might face
 otherwise with entagled Javascript and HTML.

 The Separation of Concerns is a good thing.  Many significant advances
 in the art of programming have been through people figuring out ways
 to separating concerns from each other.  MVC separates Models, Views,
 and Controllers from each other -- the benefit is understandability.
 Using HTML for content and CSS for presentation is another form of
 separation where two aspects of display have been separated, and
 again, this makes things easier to understand and way more flexible,
 because now the 2 parts can vary independently.  Javascript being
 separated from HTML is yet another step in this direction.

 If you're not sold on the general principles behind separating
 concerns, try to imagine the opposite.

 Imagine... a PHP page that makes SQL queries right before it populates
 a big HTML table that makes heavy use of nested tables for layout but
 also has some inlined CSS via the style attribute, and to top it all
 off the HTML is littered with onclick handlers and script tags at
 various places in the page.

 Now imagine a whole web site built this way.  (PAIN)




 That's what we're trying to get away from.

 That's why we (as programmers) are always coming up with new ways to
 separate concerns.

 It's a trend that you ignore at your own peril.



 (I'm not sure what possessed me to write so much, but I gotta post
 that to my blog ;-)


 On 1/24/07, Klaus Hartl [EMAIL PROTECTED] wrote:
 Ⓙⓐⓚⓔ wrote:
 there are a million reasons to separate js from the html!

 but UOJS is the ability for a page to still work without javascript. A
 very 

Re: [jQuery] unobtrus

2007-01-25 Thread Mike Alsup
 Is it important for us to be concerned with our Web portal applications
 degrading gracefully if the user has scripting disabled in their browser?

That's a question only you (and your team and your managers) can
answer.  But don't code yourself into a corner if you don't have to.
Consider what happens next year when your sales team has a big fish on
the line but the sale is contingent on portal access via mobile
browser.  How fast can you adapt to new requirements like that?
Requirements *always* change - usually before you've even satisfied
the first round of them.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Using jQuery Ajax to save PhotoNotes

2007-01-25 Thread Julie Carl

Hello everyone. I am a jQuery newbie. Help! I recently found a really useful
image annotation javascript code called PhotoNotes.
http://www.dustyd.net/projects/PhotoNotes . Unfortunately, it did not come
with an example code on saving PhotoNotes notes using any ajax library to
get me started- I prefer jQuery though my javascript knowledge is very
limited.  If you can kindly look into PhotoNotes and give me any suggestions
to get me started, that will be great. Thanks.
Moises
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Why won't this code work?

2007-01-25 Thread Rick Faircloth
Hi, Christof...

Thanks for the suggestion, but that didn't work either...same response as
before.

I wonder...on the source of the demo page showing this effect, there is
reference
to both the jquery.js file and another file, examples.js, which I don't have
access to
or reference in my code to.

script src=/scripts/jquery.js type=text/javascript/script
script src=/scripts/examples.js type=text/javascript/script

I wonder if the lack of the second src reference in my code
is preventing this example from working.  I was assuming that all the
functionality needed would be contained within jquery.js, itself.

If the author of the examples for
http://www.learningjquery.com/2006/09/slicker-show-and-hide
reads this, would they please make the examples.js code available, if it's
needed?

Rick



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Christof Donat
Sent: Thursday, January 25, 2007 12:40 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Why won't this code work?

Hi,

   $(document).ready(function() {
  // hides the slickbox as soon as the DOM is ready
  // (a little sooner than page load)
   $('#slickbox').hide();

});

  // toggles the slickbox on clicking the noted link
   $('a#slick-toggle').click(function() {
 $('#slickbox').toggle(400);
 return false;

 });

try it this way:

$(document).ready(function() {
  $('#slickbox').hide();
  $('a#slick-toggle').click(function() {
$('#slickbox').toggle(400);
return false;
  });
});

Then the Element behind $('a#slick-toggle') does exist when you try to use
it.

BTW.: If you are shure, that the id slick-toggle is alway a a-element,
you 
will be off better with $('#slick-toggle'). In that case jQuery can simply 
use document.getElementById(). I am not shure about jQuery 1.1, but older 
Versions with $('a#slick-toggle') would search the whole document tree for 
a-tags and check if they have the given id. That is of course a lot
slower.

You can even spare another jquery query, but don't expect too much speed up 
from that:

$(document).ready(function() {
  var sl = $('#slickbox').hide();
  $('a#slick-toggle').click(function() {
sl.toggle(400);
return false;
  });
});

Since you already use an id here, the second query doesn't really take much 
time.

Christof

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] unobtrus

2007-01-25 Thread Tim Gossett
Reduce risk by not putting all your eggs in one basket.
Eliminate risk by building a damn good basket, and putting all your eggs in it.

What do you and your team consider to be a damn good basket? Reliance
on a certain environment creates the risk of a single point of
failure: if one of things is not there, the whole app goes to pot.
Using OUJS—and, for that matter, using every other technology
unobtrusively—means that if one component fails, the whole system does
not necessarily fail; it degrades. How valuable is that to you?

--
Tim is MrGossett

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] scroll buttons on one side in carousel plugin

2007-01-25 Thread Vikrant Azad

Thanks for your reply.
But I have played enough with the css. Infact most of the things in css do
not produce any result. I don't know how but the script generated most of
the style and css is not respected for so many things. I wish I could give
you examples here.

vik



Beren wrote:
 
 Probably you can work it out with plain CSS instead of touching the code
 of
 the script.
 
-- 
View this message in context: 
http://www.nabble.com/scroll-buttons-on-one-side-in-carousel-plugin-tf3078563.html#a8639970
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] I'm so confused...

2007-01-25 Thread jgrucza

I started getting this error message after switching to 1.1 and then 1.1.1,
but then I tried going back to older versions of jQuery, and I'm still
getting the same error!  I never got it before I tried the upgrade, though. 
And this error is not showing up on our production servers either.  I'm
totally mystified why I would be seeing it on my own local development
server but not elsewhere.

Anyone have any ideas as to what's messed up?

By the way, I only get the error in the case where the element that the
selector is looking for is not present on the page.

Thanks for anyone who has any ideas,
Jennifer


jgrucza wrote:
 
 So I'm getting this error message:
 
 ret[ret.length - 1] has no properties
 
 being thrown from this line in the jquery source:
 
 if ( m[1] == #  ret[ret.length-1].getElementById ) {
 
 for certain selectors, namely when I have an id preceded by a class or
 another id, for example:
 
 $(.myClass #myId)
 $(#firstId #secondId)
 
 This was not a problem in previous versions.
 
 Jennifer
 

-- 
View this message in context: 
http://www.nabble.com/ret-ret.length---1--has-no-properties-tf3065965.html#a8639904
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Changing a browser's starting page

2007-01-25 Thread Gerry Danen
Looking through the docs, I'm not sure that jQuery can do this, but
perhaps someone can point me in the right direction?

I administer an intranet and we recently changed from
intranet.something.com to staff.something.com. Getting 300 users to
change their browser's start page to point to the new domain is a
chore that will likely not get done for some time.

So I thought, JavaScript or jQuery might be of help. If I detect the
old domain name, use jQuery to force a change. We mainly use FF2, IE6,
and IE7.

Any help or suggestions are most welcome.

Gerry Danen

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Changing a browser's starting page

2007-01-25 Thread Mike Alsup
 So I thought, JavaScript or jQuery might be of help. If I detect the
 old domain name, use jQuery to force a change. We mainly use FF2, IE6,

You should handle this type of redirect on the server.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] unobtrus

2007-01-25 Thread Mark D. Lincoln
Tim,

I guess the issue for us is that we want to give our clients as rich a UI as
possible both in Windows and the Web and if we focus on degradation, we may
have to compromise on the richness of the UI.  If you try to use the Google
word processor or the Google spreadsheet without scripting enabled, they do
little if anything at all.  But if you have scripting enabled, they give you
a very rich UI similar to a conventional desktop application.  This is the
type of user interface experience we are looking for in our Web
applications, however, it means that graceful degradation is probably out. 

Mark D. Lincoln
 
Mark D. Lincoln, Director of Research  Development
Eye On Solutions, LLC
(866) 253-9366x101
www.eyeonsolutions.com
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Tim Gossett
Sent: Thursday, January 25, 2007 2:16 PM
To: jQuery Discussion.
Subject: Re: [jQuery] unobtrus

Reduce risk by not putting all your eggs in one basket.
Eliminate risk by building a damn good basket, and putting all your eggs in
it.

What do you and your team consider to be a damn good basket? Reliance
on a certain environment creates the risk of a single point of
failure: if one of things is not there, the whole app goes to pot.
Using OUJS-and, for that matter, using every other technology
unobtrusively-means that if one component fails, the whole system does
not necessarily fail; it degrades. How valuable is that to you?

--
Tim is MrGossett

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Changing a browser's starting page

2007-01-25 Thread Gerry Danen
Mike,

I know I can do DNS forwarding, or PHP forwarding on the login page. I
just want to blow the old domain away without everybody calling the
help desk. I want to clean house and do for the user what they won't
do themselves.

Gerry

On 1/25/07, Mike Alsup [EMAIL PROTECTED] wrote:
  So I thought, JavaScript or jQuery might be of help. If I detect the
  old domain name, use jQuery to force a change. We mainly use FF2, IE6,

 You should handle this type of redirect on the server.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Changing a browser's starting page

2007-01-25 Thread Jonathan Sharp

On 1/25/07, Mike Alsup [EMAIL PROTECTED] wrote:


 So I thought, JavaScript or jQuery might be of help. If I detect the
 old domain name, use jQuery to force a change. We mainly use FF2, IE6,

You should handle this type of redirect on the server.



He wants to help users change their browsers start page.

It can be done in javascript but users will have to initiate the change by
clicking a link:
Here's the IE way...
http://www.java-scripts.net/javascripts/Set-as-HomePage-Script.phtml
You'll have to google for firefox/other browsers if necessairy.

You can check the window.location and regex the domain to see which domain
they're on and then pop up something in say thickbox (if you want to get
snazzy) with a link to click that will change it in their browser.

-js
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Changing a browser's starting page

2007-01-25 Thread Olaf Bosch
Gerry Danen schrieb:
 Mike,
 
 I know I can do DNS forwarding, or PHP forwarding on the login page. I
 just want to blow the old domain away without everybody calling the
 help desk. I want to clean house and do for the user what they won't
 do themselves.

I would give the old domain a static site, content:

*Our domain is changed to NEWDOMAIN, please change your bookmarks*

you will in 20 sec automatic going to the new domain, or click here
www.newdomain.com

Then a META refresh after 20 sec

When you delete the old Domain then the helpdesk never cane sleep ;)

-- 
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread Giuliano Marcangelo

Jennifer,

I am far from being an expert, but as you know an id must be
unique..therefore .myClass #myId is not necessary to target
#myId.surely you should only target the idsame with #firstId
#secondIdsimply declare the id that you wish to target

hth

On 25/01/07, jgrucza [EMAIL PROTECTED] wrote:



I have a somewhat similar problem with ID selectors, and I posted a
message
about it and a bug but so far I haven't gotten a single response from
anyone
(here's the bug: http://jquery.com/dev/bugs/bug/881/).

My problem is IDs preceded by a class or another ID (i.e. .myClass #myId
or #firstId #secondId).  It's causing an exception in the jquery code on
this line:

   if ( m[1] == #  ret[ret.length-1].getElementById ) {

I don't know if it's related to yours or not.

-Jennifer



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Changing a browser's starting page

2007-01-25 Thread Andy Matthews
I'm pretty sure this would be a MAJOR security breach and I doubt that it's
allowed. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Gerry Danen
Sent: Thursday, January 25, 2007 1:54 PM
To: jQuery Discussion.
Subject: [jQuery] Changing a browser's starting page

Looking through the docs, I'm not sure that jQuery can do this, but perhaps
someone can point me in the right direction?

I administer an intranet and we recently changed from intranet.something.com
to staff.something.com. Getting 300 users to change their browser's start
page to point to the new domain is a chore that will likely not get done for
some time.

So I thought, JavaScript or jQuery might be of help. If I detect the old
domain name, use jQuery to force a change. We mainly use FF2, IE6, and IE7.

Any help or suggestions are most welcome.

Gerry Danen

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Changing a browser's starting page

2007-01-25 Thread jgrucza

That would be a nightmare if sites could willy nilly change users' start
pages.  I'm pretty sure there's no way to do this or all the evil spammers
in the world would have already done so, right?

Jennifer


Gerry Danen wrote:
 
 Looking through the docs, I'm not sure that jQuery can do this, but
 perhaps someone can point me in the right direction?
 
 I administer an intranet and we recently changed from
 intranet.something.com to staff.something.com. Getting 300 users to
 change their browser's start page to point to the new domain is a
 chore that will likely not get done for some time.
 
 So I thought, JavaScript or jQuery might be of help. If I detect the
 old domain name, use jQuery to force a change. We mainly use FF2, IE6,
 and IE7.
 
 Any help or suggestions are most welcome.
 
 Gerry Danen
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/Changing-a-browser%27s-starting-page-tf3118721.html#a8640197
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread jgrucza

Yeah I know that, but consider this situation:

Two different kinds of pages each have an element with the same ID.  I want
my Javascript to only affect the element on one of those pages.  So I
precede the ID with the class name I use for that page type, to target the
right one.  Isn't this a reasonable use case?

Jennifer


Giuliano Marcangelo wrote:
 
 Jennifer,
 
 I am far from being an expert, but as you know an id must be
 unique..therefore .myClass #myId is not necessary to target
 #myId.surely you should only target the idsame with
 #firstId
 #secondIdsimply declare the id that you wish to target
 
 hth
 
 On 25/01/07, jgrucza [EMAIL PROTECTED] wrote:


 I have a somewhat similar problem with ID selectors, and I posted a
 message
 about it and a bug but so far I haven't gotten a single response from
 anyone
 (here's the bug: http://jquery.com/dev/bugs/bug/881/).

 My problem is IDs preceded by a class or another ID (i.e. .myClass
 #myId
 or #firstId #secondId).  It's causing an exception in the jquery code
 on
 this line:

if ( m[1] == #  ret[ret.length-1].getElementById ) {

 I don't know if it's related to yours or not.

 -Jennifer



 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/simple-selector-with-ID-doesn%27t-work-anymore-tf3080046.html#a8640644
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread Aaron Heimlich

On 1/25/07, jgrucza [EMAIL PROTECTED] wrote:


Two different kinds of pages each have an element with the same ID.  I
want
my Javascript to only affect the element on one of those pages.  So I
precede the ID with the class name I use for that page type, to target the
right one.  Isn't this a reasonable use case?



Agreed; Just because element IDs have to be unique doesn't mean that the
element has to be in the same place on every page.

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread Karl Swedberg

Hi Giuliano,

I tried to reproduce your problem, but both types of selectors worked  
fine for me.


I used jQuery 1.1.1 packed (Rev. 1173).

You can see the test here:
http://test.learningjquery.com/ids.htm

Here is the relevant script and css placed in the head:

  script type=text/javascript
$(document).ready(function() {

  $('#main-content #first-para').addClass('test1');

  $('div#second-para').addClass('test2');

});
  /script

style type=text/css media=screen
 .test1 {
   background: #ff9;
 }
 .test2 {
   background: #cff;
 }
/style

And here is the relevant HTML:

div id=main-content
  h2ID Issues?/h2
  div id=wrapper
  Using jQuery 1.1.1 Rev. 1173, packed.
div id=first-para
  pApplied selector: code$('#main-content #first-para')/ 
code, should make the div's background yellow. /p

/div
  /div
  div id=second-para
pApplied selector: code$('div#second-para')/code, should  
make the div's background light blue./p

  /div
/div




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



On Jan 25, 2007, at 3:17 PM, Giuliano Marcangelo wrote:


Jennifer,

I am far from being an expert, but as you know an id must be  
unique..therefore .myClass #myId is not necessary to target  
#myId.surely you should only target the idsame with  
#firstId #secondIdsimply declare the id that you wish to  
target


hth

On 25/01/07, jgrucza [EMAIL PROTECTED] wrote:

I have a somewhat similar problem with ID selectors, and I posted a  
message
about it and a bug but so far I haven't gotten a single response  
from anyone

(here's the bug: http://jquery.com/dev/bugs/bug/881/).

My problem is IDs preceded by a class or another ID (i.e. .myClass  
#myId
or #firstId #secondId).  It's causing an exception in the jquery  
code on

this line:

   if ( m[1] == #  ret[ret.length-1].getElementById ) {

I don't know if it's related to yours or not.

-Jennifer



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


  1   2   >