[jQuery] sending data with $.post

2007-10-08 Thread james_027

hi,

when using the $.post() the second argument is for the data to be
send. is there a shortcut way of specifying all the data in the forms?
rather than manually doing {'field1':'value1', 'field2':'value2', ...}

Thanks
james



[jQuery] Re: [PREVIEW] another future grid: jquery.KIKEgrid alpha...

2007-10-08 Thread Enrique Meléndez Estrada


@Jörn: thanxs, I love jquery. Obviously, i did'nt mean to highlight what 
others Do wrong, but what others Don't do at all and I needed for my 
Intranet purposes. Anyway, I changed the tone of the page 
(http://www.ita.es/jquery/kikegrid.htm) as you can see :-)


Of course I'll upgrade to UI, each plugin. It's alpha, because it is for 
internal use, not prepared as a public plugin (no API, etc...). But 
enough to see where things are going.


Also there'll be full AJAX use, as well as some surprises for FF and 
IE7. I'm also doing ala Extjs theme version which is becoming promising.


--
Enrique Meléndez Estrada (2367)
Servicios Informáticos
Organización y Servicios Internos
Instituto Tecnológico de Aragón



[jQuery] Re: jqGrid new version

2007-10-08 Thread Tony

Very good idea Olivier,
I will update this in the plugin.
Tony

On 8 Окт, 02:19, Olivier Percebois-Garve [EMAIL PROTECTED] wrote:
 Very slick work tony
 May I suggest to add a loading icon (maybe with status of the queue) ?
 I have an erratic Internet connection and nothing tells me if the next
 pane will eventually be loaded.

 -Olivier

 Tony wrote:
  Rey,
  Thank you for this note. It is my bad. It is corrected now.

  Tony

  P.S.
  The searchdb plugin will be updated soon too.

  On 7 Окт, 17:59, Rey Bango [EMAIL PROTECTED] wrote:

  Tony,

  The link to the searchDB plugin is invalid.
  (http://www.trirand.com/jqgrid/searchdb.zip)

  Rey

  Tony wrote:

  I have released a new version of jqGrid.
  Demo page here:http://trirand.com/jqgrid/jqgrid.html
  Home page:http://www.trirand.com/blog/

  Enjoy.



[jQuery] Re: jqGrid new version

2007-10-08 Thread Tony

Ryura,

I know that the documentation describes only options and methods and
does not have a detailed step by step guide.
About PHP - jqGrid can work not only with PHP (this is just example).
It work with any server side language like ASP, CF that can generate
XML or JSON data from database.
In the demo page there is a full code of every example. Instead I will
update the demo pages with detailed comments.

Regards
Tony

On 8 Окт, 02:03, Ryura [EMAIL PROTECTED] wrote:
 Tony,

 You've made a nice looking plugin, however the documentation is hard
 to understand. I'm not sure on how to include a jqGrid onto my site.
 Would it be possible for you to make a more detailed documentation for
 those of us who are fairly unfamiliar with PHP?



[jQuery] IE6 Stylesheet Woes

2007-10-08 Thread Andy Kent

I'm working on fixing my JSS plugin for IE, it appears that IE has
really problems with showing you the source of stylesheets that are
between style tags.

$('style').text() - returns null

$('style').html() - returns the source but it is modified, e.g. all
non-supported selectors are changed to 'UNKOWN' (very unhelpful!)

Before I delve deeper into this does anyone have a work around
already??

I assume this is supposed to be some sort of security feature but it
seems very strange seeing as loading external styles works as
expected.

Thanks,
Andy.



[jQuery] slideViewer 1.1

2007-10-08 Thread GianCarlo Mingati

the plugin now works with jquery 1.2 and the jquery.easing.1.2 plugin
GC



[jQuery] Re: IE6 Stylesheet Woes

2007-10-08 Thread Michael Geary

Andy, you can read or write the content of an IE stylesheet with:

   $('style')[n].styleSheet.cssText

where n is the index of the stylesheet you want.

Instead of browser detection, I test for the presence of that .styleSheet
property, and then either use .styleSheet.cssText or .text() depending.

Some example non-jQuery code that I use (shows writing and replacing but not
reading):

function addStyle( css ) {
var style = document.createElement( 'style' );
style.type = 'text/css';
head.appendChild( style );
if( style.styleSheet )
style.styleSheet.cssText = css;
else
style.appendChild( document.createTextNode(css) );
return style;
}

function changeStyle( style, css ) {
if( style.styleSheet )
style.styleSheet.cssText = css;
else
style.replaceChild( document.createTextNode(css),
style.firstChild );
return style;
}

-Mike

 From: Andy Kent
 
 I'm working on fixing my JSS plugin for IE, it appears that 
 IE has really problems with showing you the source of 
 stylesheets that are between style tags.
 
 $('style').text() - returns null
 
 $('style').html() - returns the source but it is modified, 
 e.g. all non-supported selectors are changed to 'UNKOWN' 
 (very unhelpful!)
 
 Before I delve deeper into this does anyone have a work 
 around already??
 
 I assume this is supposed to be some sort of security feature 
 but it seems very strange seeing as loading external styles 
 works as expected.
 
 Thanks,
 Andy.
 



[jQuery] Re: IE6 Stylesheet Woes

2007-10-08 Thread Andy Kent

Thanks Mike, that's a huge help and sounds like it will solve my
problem perfectly. I will have a play now.

Should jQuery not be clever enough to handle this internally when you
call .text() on a style element?
Is it worth filing as a bug do you think?

Andy.

On 8 Oct, 11:07, Michael Geary [EMAIL PROTECTED] wrote:
 Andy, you can read or write the content of an IE stylesheet with:

$('style')[n].styleSheet.cssText

 where n is the index of the stylesheet you want.

 Instead of browser detection, I test for the presence of that .styleSheet
 property, and then either use .styleSheet.cssText or .text() depending.

 Some example non-jQuery code that I use (shows writing and replacing but not
 reading):

 function addStyle( css ) {
 var style = document.createElement( 'style' );
 style.type = 'text/css';
 head.appendChild( style );
 if( style.styleSheet )
 style.styleSheet.cssText = css;
 else
 style.appendChild( document.createTextNode(css) );
 return style;
 }

 function changeStyle( style, css ) {
 if( style.styleSheet )
 style.styleSheet.cssText = css;
 else
 style.replaceChild( document.createTextNode(css),
 style.firstChild );
 return style;
 }

 -Mike From: Andy Kent

  I'm working on fixing my JSS plugin for IE, it appears that
  IE has really problems with showing you the source of
  stylesheets that are between style tags.

  $('style').text() - returns null

  $('style').html() - returns the source but it is modified,
  e.g. all non-supported selectors are changed to 'UNKOWN'
  (very unhelpful!)

  Before I delve deeper into this does anyone have a work
  around already??

  I assume this is supposed to be some sort of security feature
  but it seems very strange seeing as loading external styles
  works as expected.

  Thanks,
  Andy.



[jQuery] Re: IE6 Stylesheet Woes

2007-10-08 Thread Andy Kent

Unfortunately after some experimentation this method still appears to
yield 'UNKNOWN' in place of selectors that are not understood by IE.

Poo.

On 8 Oct, 11:15, Andy Kent [EMAIL PROTECTED] wrote:
 Thanks Mike, that's a huge help and sounds like it will solve my
 problem perfectly. I will have a play now.

 Should jQuery not be clever enough to handle this internally when you
 call .text() on a style element?
 Is it worth filing as a bug do you think?

 Andy.

 On 8 Oct, 11:07, Michael Geary [EMAIL PROTECTED] wrote:

  Andy, you can read or write the content of an IE stylesheet with:

 $('style')[n].styleSheet.cssText

  where n is the index of the stylesheet you want.

  Instead of browser detection, I test for the presence of that .styleSheet
  property, and then either use .styleSheet.cssText or .text() depending.

  Some example non-jQuery code that I use (shows writing and replacing but not
  reading):

  function addStyle( css ) {
  var style = document.createElement( 'style' );
  style.type = 'text/css';
  head.appendChild( style );
  if( style.styleSheet )
  style.styleSheet.cssText = css;
  else
  style.appendChild( document.createTextNode(css) );
  return style;
  }

  function changeStyle( style, css ) {
  if( style.styleSheet )
  style.styleSheet.cssText = css;
  else
  style.replaceChild( document.createTextNode(css),
  style.firstChild );
  return style;
  }

  -Mike From: Andy Kent

   I'm working on fixing my JSS plugin for IE, it appears that
   IE has really problems with showing you the source of
   stylesheets that are between style tags.

   $('style').text() - returns null

   $('style').html() - returns the source but it is modified,
   e.g. all non-supported selectors are changed to 'UNKOWN'
   (very unhelpful!)

   Before I delve deeper into this does anyone have a work
   around already??

   I assume this is supposed to be some sort of security feature
   but it seems very strange seeing as loading external styles
   works as expected.

   Thanks,
   Andy.



[jQuery] Re: JSS - New Plug-in

2007-10-08 Thread Sam Collett

I noticed that you have added String.prototype.trim. jQuery actually
has this already, e.g. jQuery.trim( foo  );


An easy was to get better CSS support in browsers that are not up to
it. Maybe in a future version, browsers that are capable will just be
ignored?

Also, maybe best to wrap it in a closure:

(function($) {
  // plugin code here, use $ as much as you like
})(jQuery);

On Oct 7, 12:39 am, Andy Kent [EMAIL PROTECTED] wrote:
 Hi Guys,

 This is a plug-in that was thrown together in a few spare hours after
 chatting with some people at FOWA last week, I hadn't had much sleep
 at the time so it's still a bit rough round the edges.

 In a nutshell though it gives you full support for all jQuery
 selectors from within your CSS files in a totally unobtrusive mannor.
 This effectively means cross browser CSS3 support via JavaScript.

 You can find out more and grab it from:

 http://andykent.bingodisk.com/bingo/public/jss/

 Any feedback, good or bad would be appreciated.

 Thanks,
 Andy.



[jQuery] Re: JSS - New Plug-in

2007-10-08 Thread R. Rajesh Jeba Anbiah

On Oct 7, 4:39 am, Andy Kent [EMAIL PROTECTED] wrote:
  snip
 http://andykent.bingodisk.com/bingo/public/jss/

I *exactly* wanted to do the same plugin. I also used similar idea in
some of the projects already (crude code without plugin). My ideas
were:

1. Common crossbrowser CSS in a file, say crossbrowser.css
2. CSS2 in css2.css. Not linked, but commented out (linking in non-
compliant browser has side effects for the selectors. So, just
commented)
3. CSS3 in css3.css. Not linked, but commented out

Plugin:
1. If FF (more other detection for capability)
   a. link the css2.css via script
   b. Don't link css3.css, but hack the rules and fix them via $.css()
  [Parse the comments, find css3.css and get the content with $.ajax,
parse the content and apply hacks)

2. If IE
   a. Don't link css2.css  css3.css, but hack the rules and fix them
via $.css()

--
  ?php echo 'Just another PHP saint'; ?
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/



[jQuery] Re: jQPanels

2007-10-08 Thread Daniele Paoni

On Mon, 2007-10-08 at 04:14 +, [EMAIL PROTECTED] wrote:
 I have just posted my very first plug-in.
 Is an easy and unubitrusive script to create and manage sliding panels
 with for the moment quite few options.
 I'd really should like to have some feedback about the coding.
 Demo page and download link:
 a href=http://www.andreacfm.com/examples/jQpanels/;Examples Page/
 a,
 a href=http://www.andreacfm.com/page.cfm/Downloads;Download zip
 file/a
 
 
Very nice work.
Is it possible to add an option to have only one panel open at the same
time ?

Thanks
Daniele



[jQuery] Re: Packing JS code

2007-10-08 Thread Richard D. Worth
See:
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_compress_my_code.3F

- Richard

On 10/8/07, Pops [EMAIL PROTECTED] wrote:


 What I can download to pack and minified my javascript code?

 Thanks




[jQuery] Re: JSS - New Plug-in

2007-10-08 Thread GianCarlo Mingati

WOW!



[jQuery] Re: jQPanels

2007-10-08 Thread [EMAIL PROTECTED]

@Daniele.
I think I do not understand what you mean.
Please give me more details ( I also speak italian if you need it).

@Duncan
Thanks for the suggestion. That's  a nice idea to implement.
I will work on that.

Andrea

On 8 oct, 06:44, Duncan Heal [EMAIL PROTECTED] wrote:
 Thanks. It's great the jQuery community has such talent.
 A suggestion I have would be to add the ability to specify an event
 handler. Maybe make it click by default but allow users to change it
 to hover or mousedown (two events I would find useful). Just an idea.
 Thanks again
 Duncan

 On 8/10/2007, at 5:14 PM, [EMAIL PROTECTED] wrote:



  I have just posted my very first plug-in.
  Is an easy and unubitrusive script to create and manage sliding panels
  with for the moment quite few options.
  I'd really should like to have some feedback about the coding.
  Demo page and download link:
  a href=http://www.andreacfm.com/examples/jQpanels/;Examples Page/
  a,
  a href=http://www.andreacfm.com/page.cfm/Downloads;Download zip
  file/a



[jQuery] Re: slideViewer 1.1

2007-10-08 Thread GianCarlo Mingati

http://www.gcmingati.net/wordpress/2007/09/12/seeing-it-burn-gives-me-the-chills/

integrated in a post, as it was invented for.
;-))
GC



[jQuery] Re: Selector with Pipe (|) character not working

2007-10-08 Thread Andy Matthews
My pleasure. Just giving back to the rest of the list.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Abubakar Saddique
Sent: Friday, October 05, 2007 1:22 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Selector with Pipe (|) character not working


thanks ..really appreciate your help


On 10/5/07, Andy Matthews [EMAIL PROTECTED] wrote: 

Sure thing. The HTML spec found here:
http://www.w3.org/TR/html401/types.html#type-name
http://www.w3.org/TR/html401/types.html#type-name 
 
Says this:
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed
by any number
of letters, digits ([0-9]), hyphens (-), underscores (_), colons (:),
and periods (.). 

  _  

From: jquery-en@googlegroups.com [mailto:
mailto:jquery-en@googlegroups.com [EMAIL PROTECTED] On Behalf Of
Abubakar Saddique
Sent: Friday, October 05, 2007 11:40 AM 

To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Selector with Pipe (|) character not working


 

may i ask why not pipes?


On 10/5/07, Andy Matthews [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

I'd suggest not using the pipe as part of your ID or class names. Try using
a dash - or underscore, then split on those.

  _  

From: jquery-en@googlegroups.com [mailto:
mailto:jquery-en@googlegroups.com [EMAIL PROTECTED] On Behalf Of
Richard D. Worth
Sent: Friday, October 05, 2007 9:07 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Selector with Pipe (|) character not working

 

You need to escape the pipe since it is a special character. Use \\| instead
of | inside the selector. For more info, see:

http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element
_that_has_weird_characters_in_its_ID.3F
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_elemen
t_that_has_weird_characters_in_its_ID.3F 

- Richard


On 10/3/07, ab   mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED]  wrote: 


I am trying to select an element with with ID  which have pipe
character (|)
i  found that its not working 


CODE--HTML
input type =text   id=firstName|1  name=firstName|1/ 

CODE-SCRIPT
   alert($(#firstname|1).val() );

and output is undefined.. 

Works well if i remove pipe

Please help me..is it a bug or feature 











[jQuery] Re: Packing JS code

2007-10-08 Thread Rey Bango


Pops,

Check out YUI compressor:

http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-compressor/

Rey...

Pops wrote:

What I can download to pack and minified my javascript code?

Thanks




[jQuery] Re: HTML returned from GET: What's the best solution to this issue?

2007-10-08 Thread Andy Matthews

Still looking to see if this is possible.

My solution (not very elegant) was to replace paragraph tags with br /
tags, then split on the br / tag like so:

html
head
title/title
/head
body
br /br /
this is the first paragraph...
br /br /
this is the second paragraph...
br /br /
/body
/html

That works just fine, but I'd really love to be able to generate a jQuery
object from text. It would be much simpler than my solution I'm sure. You
can see what I came up with here:

http://www.commadelimited.com/code/fillertext/




[jQuery] Re: slideViewer 1.1

2007-10-08 Thread Rey Bango


Always provide a link GianCarlo so that new folks can find the plugin 
easier.


Rey

GianCarlo Mingati wrote:

the plugin now works with jquery 1.2 and the jquery.easing.1.2 plugin
GC




[jQuery] Re: slideViewer 1.1

2007-10-08 Thread Rey Bango


Link to the plugin:

http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html

BTW, slideViewer rocks. ;)

GianCarlo Mingati wrote:

http://www.gcmingati.net/wordpress/2007/09/12/seeing-it-burn-gives-me-the-chills/

integrated in a post, as it was invented for.
;-))
GC




[jQuery] Re: IE6 Stylesheet Woes

2007-10-08 Thread James Dempster

I've pinched some code from Christian Bach (http://lovepeacenukes.com/
jquery/ie6cssfix/) and put it into it's own test case. Tested it on
Win IE 6/7, FF 1.5/2, Safari3, Opera 9 and they all showed the same
results.

Test it out. Hopefully it can help.
http://www.jdempster.com/public/jss/js_css.html

On Oct 8, 11:29 am, Andy Kent [EMAIL PROTECTED] wrote:
 Unfortunately after some experimentation this method still appears to
 yield 'UNKNOWN' in place of selectors that are not understood by IE.

 Poo.

 On 8 Oct, 11:15, Andy Kent [EMAIL PROTECTED] wrote:

  Thanks Mike, that's a huge help and sounds like it will solve my
  problem perfectly. I will have a play now.

  Should jQuery not be clever enough to handle this internally when you
  call .text() on a style element?
  Is it worth filing as a bug do you think?

  Andy.

  On 8 Oct, 11:07, Michael Geary [EMAIL PROTECTED] wrote:

   Andy, you can read or write the content of an IE stylesheet with:

  $('style')[n].styleSheet.cssText

   where n is the index of the stylesheet you want.

   Instead of browser detection, I test for the presence of that .styleSheet
   property, and then either use .styleSheet.cssText or .text() depending.

   Some example non-jQuery code that I use (shows writing and replacing but 
   not
   reading):

   function addStyle( css ) {
   var style = document.createElement( 'style' );
   style.type = 'text/css';
   head.appendChild( style );
   if( style.styleSheet )
   style.styleSheet.cssText = css;
   else
   style.appendChild( document.createTextNode(css) );
   return style;
   }

   function changeStyle( style, css ) {
   if( style.styleSheet )
   style.styleSheet.cssText = css;
   else
   style.replaceChild( document.createTextNode(css),
   style.firstChild );
   return style;
   }

   -Mike From: Andy Kent

I'm working on fixing my JSS plugin for IE, it appears that
IE has really problems with showing you the source of
stylesheets that are between style tags.

$('style').text() - returns null

$('style').html() - returns the source but it is modified,
e.g. all non-supported selectors are changed to 'UNKOWN'
(very unhelpful!)

Before I delve deeper into this does anyone have a work
around already??

I assume this is supposed to be some sort of security feature
but it seems very strange seeing as loading external styles
works as expected.

Thanks,
Andy.



[jQuery] Replicating Prototype lightbox with jQuery

2007-10-08 Thread Michael Price


'ello all,
I was using Thickbox on an image gallery to show enlarged pictures - so 
far, so good. Until the boss points at one of our other sites where the 
enlarge viewer drops open, slides sideways, then the close button drops 
down afterwards - and says he wants it to work like that. I thought it 
looked familiar so I viewed source. Sure enough, it was the Prototype 
lightbox:


http://www.headlamhall.co.uk/gallery.htm

I don't want to use Proto if I can get away with it (nothing WRONG with 
it, per se - I'm just a jQuery fanboy!) so is there a jQuery equivalent 
to this or any way I can mod Thickbox to make this happen?


Regards,
Michael Price



[jQuery] Re: Replicating Prototype lightbox with jQuery

2007-10-08 Thread Andy Matthews

Someone JUST posted a link to their direct jQuery Lightbox conversion.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Price
Sent: Monday, October 08, 2007 9:16 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Replicating Prototype lightbox with jQuery


'ello all,
I was using Thickbox on an image gallery to show enlarged pictures - so far,
so good. Until the boss points at one of our other sites where the enlarge
viewer drops open, slides sideways, then the close button drops down
afterwards - and says he wants it to work like that. I thought it looked
familiar so I viewed source. Sure enough, it was the Prototype
lightbox:

http://www.headlamhall.co.uk/gallery.htm

I don't want to use Proto if I can get away with it (nothing WRONG with it,
per se - I'm just a jQuery fanboy!) so is there a jQuery equivalent to this
or any way I can mod Thickbox to make this happen?

Regards,
Michael Price




[jQuery] Re: Replicating Prototype lightbox with jQuery

2007-10-08 Thread Michael Price


Andy Matthews wrote:

Someone JUST posted a link to their direct jQuery Lightbox conversion.


Which is exactly the one I just found on Google as well :)

I think instead of think before you speak I should invest time in 
Google before you type - although that would be tricky since you have 
to type in order to Google so never mind!


Thanks for pointing that out Andy, and thanks Leandro for the excellent 
looking plugin!


Regards,
Michael Price



[jQuery] Re: Replicating Prototype lightbox with jQuery

2007-10-08 Thread Andy Matthews

Hey Michael...I hope you didn't take offense at my comment. I wasn't try ing
to be rude. I was just surprised that you asked that question right after
someone posted the answer. I just thought it was a really fun coincidence.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Price
Sent: Monday, October 08, 2007 9:29 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Replicating Prototype lightbox with jQuery


Andy Matthews wrote:
 Someone JUST posted a link to their direct jQuery Lightbox conversion.

Which is exactly the one I just found on Google as well :)

I think instead of think before you speak I should invest time in Google
before you type - although that would be tricky since you have to type in
order to Google so never mind!

Thanks for pointing that out Andy, and thanks Leandro for the excellent
looking plugin!

Regards,
Michael Price




[jQuery] Re: IE6 Stylesheet Woes

2007-10-08 Thread Andy Kent

This has the same issue I'm afraid.

It works for all those examples as IE thinks they are valid. Give
something like div~p:first a go though and I you get the selector
replaced with the string 'UNKOWN' in the innerHTML source code.

Thanks for the attempt but sill no prize yet!

:( *tears*

Andy.

On 8 Oct, 14:43, James Dempster [EMAIL PROTECTED] wrote:
 I've pinched some code from Christian Bach (http://lovepeacenukes.com/
 jquery/ie6cssfix/) and put it into it's own test case. Tested it on
 Win IE 6/7, FF 1.5/2, Safari3, Opera 9 and they all showed the same
 results.

 Test it out. Hopefully it can 
 help.http://www.jdempster.com/public/jss/js_css.html

 On Oct 8, 11:29 am, Andy Kent [EMAIL PROTECTED] wrote:

  Unfortunately after some experimentation this method still appears to
  yield 'UNKNOWN' in place of selectors that are not understood by IE.

  Poo.

  On 8 Oct, 11:15, Andy Kent [EMAIL PROTECTED] wrote:

   Thanks Mike, that's a huge help and sounds like it will solve my
   problem perfectly. I will have a play now.

   Should jQuery not be clever enough to handle this internally when you
   call .text() on a style element?
   Is it worth filing as a bug do you think?

   Andy.

   On 8 Oct, 11:07, Michael Geary [EMAIL PROTECTED] wrote:

Andy, you can read or write the content of an IE stylesheet with:

   $('style')[n].styleSheet.cssText

where n is the index of the stylesheet you want.

Instead of browser detection, I test for the presence of that 
.styleSheet
property, and then either use .styleSheet.cssText or .text() depending.

Some example non-jQuery code that I use (shows writing and replacing 
but not
reading):

function addStyle( css ) {
var style = document.createElement( 'style' );
style.type = 'text/css';
head.appendChild( style );
if( style.styleSheet )
style.styleSheet.cssText = css;
else
style.appendChild( document.createTextNode(css) );
return style;
}

function changeStyle( style, css ) {
if( style.styleSheet )
style.styleSheet.cssText = css;
else
style.replaceChild( document.createTextNode(css),
style.firstChild );
return style;
}

-Mike From: Andy Kent

 I'm working on fixing my JSS plugin for IE, it appears that
 IE has really problems with showing you the source of
 stylesheets that are between style tags.

 $('style').text() - returns null

 $('style').html() - returns the source but it is modified,
 e.g. all non-supported selectors are changed to 'UNKOWN'
 (very unhelpful!)

 Before I delve deeper into this does anyone have a work
 around already??

 I assume this is supposed to be some sort of security feature
 but it seems very strange seeing as loading external styles
 works as expected.

 Thanks,
 Andy.



[jQuery] Re: Replicating Prototype lightbox with jQuery

2007-10-08 Thread Michael Price


Andy Matthews wrote:

Hey Michael...I hope you didn't take offense at my comment. I wasn't try ing
to be rude. I was just surprised that you asked that question right after
someone posted the answer. I just thought it was a really fun coincidence.


No offence taken - sorry if my tone implied I was at all upset by your 
reply - it was funny that I'd ask a question right after someone had 
posted the answer though. :)


Regards,
Michael Price



[jQuery] Re: Replicating Prototype lightbox with jQuery

2007-10-08 Thread Andy Matthews

Excellent. Hope that helps. I just used Thickbox in a personal project.
Works a treat. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Price
Sent: Monday, October 08, 2007 9:56 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Replicating Prototype lightbox with jQuery


Andy Matthews wrote:
 Hey Michael...I hope you didn't take offense at my comment. I wasn't 
 try ing to be rude. I was just surprised that you asked that question 
 right after someone posted the answer. I just thought it was a really fun
coincidence.

No offence taken - sorry if my tone implied I was at all upset by your reply
- it was funny that I'd ask a question right after someone had posted the
answer though. :)

Regards,
Michael Price




[jQuery] Re: multiple selects, hiddens and text inputs with same name

2007-10-08 Thread rgrwkmn

Thanks Wizzud, that's some syntax I've been needing to know. Why can't
you use the $(this).id?

On Oct 7, 3:16 am, Wizzud [EMAIL PROTECTED] wrote:
 NB . to add/change an id:
 $('select[name=foo]').each(function(i){
   this.id = 'bar'+i;
   });

 On Oct 6, 2:47 am, rgrwkmn [EMAIL PROTECTED] wrote: In addition to 
 Wizzud's solution:
  Since it seems that you want to be able to access each select with the
  name foo individually and change their values individually you could
  try something like this:

  $('select[name=foo]').each(function(i){
$(this).addClass('foo'+i);
});

  This would dynamically add classes foo0, foo1, foo2, etc. to your
  selects named foo, meaning you could access each by class name if you
  know what order they appear in. Also, make sure to run that script
  whenever the contents of your table change so you always have an up to
  date list. I assume it would be 'better' to give id's to each one
  since they are unique, but unique class names work just as well and
  there is no addId method in jQuery.

  On Oct 5, 5:59 pm, Wizzud [EMAIL PROTECTED] wrote:

   With...
   select name='foo'option value='bar1'bar1/option/select
   select name='foo'option value='bar2'bar2/option/select

   try...
   var selects = $('select[name=foo]');

   See the Attribute Filters, under Selectors in the API Reference.

   (If you have non-unique ids for elements on your page, do not rely on
   selecting them by $('#id')!)

   syg6-2 wrote:

For reasons I won't go into here I have a page which has a table with
a variable amount of rows. Each row has a hidden, text, and select.
They all have the same name. I also have other selects on the page
with different names.

What I need to do is access only the selects, to be able to add and
remove options. So I need to know how many selects with the name foo
are on the page

I have tried this:

jQuery(select#foo)

which simply returns [Object object]. If I do this:

jQuery(select#foo).length

it returns 0 which is not true. When I load the page I have 2 selects
already. So if I do this:

jQuery(select#foo).text()

it returns white space. And

jQuery(select#foo).val()

returns undefined.

I have also tried stuff like

jQuery(select#foo[0]).val()

but nothing seems to work. Since uses can dynamically add rows to the
table (and with each one a hidden, text input and select) I need to 1)
know how many selects with a given id/name there are and 2) be able to
manipulate the values in each one.

How can I do this?

Thanks!

   --
   View this message in 
   context:http://www.nabble.com/multiple-selects%2C-hiddens-and-text-inputs-wit...
   Sent from the jQuery General Discussion mailing list archive at 
   Nabble.com.



[jQuery] Re: Figured it out

2007-10-08 Thread Guy Fraser

jarrod wrote:
 Right after I posted I realized that it was because the element was hidden.
 I changed the method to first show the element, then get the offset and that
 works.
   


It would probably be useful if the dimensions plugin could handle that 
scenario...


[jQuery] Permission denied to get property Window.node Type

2007-10-08 Thread SMA

Inside http://www.insiderec.com/
When I clicked on the bottom left text to open a popup image the
following error occurs,
Permission denied to get property Window.node Type.
With the alert which is indicated only in firefox.
Working fine with IE.
Please tell me how should I solved this problem.



[jQuery] double clicking an entity, preventing double function entry.

2007-10-08 Thread Naliano

Hi Folks,

I'm struggling with some jQuery that is probably simple for most of
you.

I have a button on a screen that is having a click function added to
it.

When a user double clicks said button, the click function gets entered
twice.

I'd like to prevent the second entry into the function, as having it
enter twice screws up the logic of the button.

(It's amazing to me how many people double-click web links.)

Here's some of the code...

$(this).click(function() {
  $.get(uri,
function(data){
  //do stuff, we want to do this stuff once

Clues for me?

regards



[jQuery] Re: ANNOUCE: jQuery lightBox plugin

2007-10-08 Thread Joan Piedra
Leandro,
Great job, I see some changes in the plugins work. I've seen a bug in the
overlay when resizing the window (maybe it's just a css bug).

And a suggestion would be that it shouldn't close when trying to select the
text, nor clicking somewhere while the lightbox hasn't loaded yet.

PS. I like the new layout design for the plugin's site!

On 10/7/07, Leandro Vieira Pinho [EMAIL PROTECTED] wrote:


 Nice suggestion.

 A keyboard navigation is coming too.

 Regards.

 On 10/7/07, Guy Fraser [EMAIL PROTECTED] wrote:
 
  Leandro Vieira Pinho wrote:
   Guys,
  
   I have translate the jQuery lightBox plugin page into english. And, I
   have did a new layout too.
  
   See: http://leandrovieira.com/projects/jquery/lightbox/
  
 
  Excellent work!
 
  One feature request though - mainly for usability. It's not immediately
  apparent that you can mouse-over the image to see the next/prev and
  click to get next/previous image. Would it be possible to also show a
  next/prev text link below the image?
 
  Guy
 
  
 


 --
 Grato
 Leandro Vieira Pinho
 Diretor da w3invent - http://w3invent.com.br
 Blog pessoal sobre Desenvolvimento Web - http://leandrovieira.com
 Colunista semanal iMasters - http://www.imasters.com.br/




-- 
Joan Piedra  ||  Frontend web developer
http://www.justaquit.com/  ||  http://www.joanpiedra.com/


[jQuery] Re: Works in IE not FF?!

2007-10-08 Thread Oscar from Sweden

Bump!

No one?



[jQuery] How to check is element exist

2007-10-08 Thread zidoo

if home some like this:

$('div id=editLng_'+lng_id+'/div').appendTo('body');

now when i create new element i need to check if that element already
exist, if exist focus, else create. I cant find in jquery
documentation isExist statement or something like that.

Thanks.



[jQuery] Re: slideViewer 1.1

2007-10-08 Thread Guy Fraser

GianCarlo Mingati wrote:
 the plugin now works with jquery 1.2 and the jquery.easing.1.2 plugin
 GC
   


URL?


[jQuery] Re: selecting elements in a nested table

2007-10-08 Thread [EMAIL PROTECTED]

Thanks!

Excellent info! What I was playing around was something almost like
what you had, but not quite. The devil is in the details like they say.



[jQuery] How do I get this to fade in

2007-10-08 Thread skinnytiger

I'm using the below script to load html into a placeholder, it all
looks groovy but I want it to fade in, where do I add the .fadeIn() to
get this to work?

script type=text/javascript
$(document).ready(function(){
$(.thumbnail li).click(function(){
$(#large li).html($(this).html());
return false;
});

});
/script



[jQuery] Accordion Plugin Heigh

2007-10-08 Thread Gerson Goulart

Hi All!!!

I'm working with the Accordion plugin and wants the accordion menu with 
100% height of the parent element (with height=100% or with 
'position:absolute;top:0;bottom:0;')

Like the Accordion Windows in:
http://extjs.com/deploy/ext-2.0-alpha1/examples/window/desktop.html

How can I do this?

Thanks!


[jQuery] [Help] Ajax Created table from JSON DataSet

2007-10-08 Thread Phunky

Hey guys,

Im hoping that someone here will be able to post me in the right
direction of an example for creating a TABLE from a JSON Dataset.

Im not sure what the best practice is for doing this and cant seem to
find any tutorials about it either :( im having no problem retrieving
the data, but im stuck on how to access the JSON Object and then loop
through via the each() to append the data to the TABLE

Thanks in advance



[jQuery] Re: JSS - New Plug-in

2007-10-08 Thread Guy Fraser

Sam Collett wrote:
 I noticed that you have added String.prototype.trim. jQuery actually
 has this already, e.g. jQuery.trim( foo  );
   

Urg! No messing with core JS objects please - don't turn jQuery in to 
another Prototype :(

@ All developers: Please, please, please namespace stuff properly. This 
is one of the biggest advantages of jQuery.


[jQuery] Re: slideViewer 1.1

2007-10-08 Thread Guy Fraser

GianCarlo Mingati wrote:
 http://www.gcmingati.net/wordpress/2007/09/12/seeing-it-burn-gives-me-the-chills/

 integrated in a post, as it was invented for.
   

That's pretty nice - would it be possible to make the images clickable 
so you progress to the next slide just by clicking the image?


[jQuery] Re: slideViewer 1.1

2007-10-08 Thread Joan Piedra
You should add the stop function for a better animation ;)
jQuery(this).parent().parent().parent().prev().find(ul).stop().animate({
left: cnt}, settings.easeTime, settings.easeFunc);

On 10/8/07, GianCarlo Mingati [EMAIL PROTECTED] wrote:



 http://www.gcmingati.net/wordpress/2007/09/12/seeing-it-burn-gives-me-the-chills/

 integrated in a post, as it was invented for.
 ;-))
 GC




-- 
Joan Piedra  ||  Frontend web developer
http://www.justaquit.com/  ||  http://www.joanpiedra.com/


[jQuery] Re: jQPanels

2007-10-08 Thread Guy Fraser

[EMAIL PROTECTED] wrote:
 @Daniele.
 I think I do not understand what you mean.
 Please give me more details ( I also speak italian if you need it).
   

If I understand correctly, the scenario would be that when one panel is 
opened the others would be closed - a bit like an accordion menu. Being 
able to close either all other panels on the page when one is opened or 
just a selection of panels that are somehow grouped togehter would be 
very useful.



[jQuery] Re: jQPanels

2007-10-08 Thread Cloudream

like $(someid).slideToggle ?

On Oct 8, 12:14 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 I have just posted my very first plug-in.
 Is an easy and unubitrusive script to create and manage sliding panels
 with for the moment quite few options.
 I'd really should like to have some feedback about the coding.
 Demo page and download link:
 a href=http://www.andreacfm.com/examples/jQpanels/;Examples Page/
 a,
 a href=http://www.andreacfm.com/page.cfm/Downloads;Download zip
 file/a



[jQuery] [Site using jQ] Joost

2007-10-08 Thread Fred Janon
http://www.joost.com

Fred


[jQuery] Re: How to check for specified fonts

2007-10-08 Thread EdMartin

Yes. That certainly would have been an issue if I were doing the
testing on an XHTML 1.1 page. In fact, however, I'm doing it on a kind
of gateway page that gives access to more than one distance-learning
courses, only one of which (a Calculus course) needs the full MathML
capability. So I serve the gateway page and all the non-Calculus
course pages as XHTML 1.0 Transitional.

If someone using IE6 or IE7 then wants to access the Calculus course,
I additionally check for the presence of DesignScience's free
MathPlayer plugin (http://www.dessci.com/en/products/mathplayer/).
When running this plugin on IE it has the effect of overwriting the
DOCTYPE of the XHTML 1.1 pages, making their content available as text/
html.

Ed Martin



[jQuery] Re: [Site using jQ] Joost

2007-10-08 Thread Rey Bango


Sweet find Fred. They must've recently added it in.

Rey...

Fred Janon wrote:

http://www.joost.com
 
Fred
 


[jQuery] Problem while setting designMode=on in firefox.

2007-10-08 Thread Ashish Agrawal

check out this page in FireFox - http://www.agrawalinfotech.com/editor.html
As you can see I have 2 IFrames and I am setting then designMode=on
one using jQuery(document).ready method
and other with simple old body onload method.

First one (with document.ready) don't work (at least for me in FF 2).
But second one works fine as expected.
Can any one tell me how can I simulate body onload using jQuery?



[jQuery] Re: HTML returned from GET: What's the best solution to this issue?

2007-10-08 Thread Andy Matthews

Ooooh...I like it. I'll give that a shot, thanks! 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rgrwkmn
Sent: Sunday, October 07, 2007 10:14 PM
To: jQuery (English)
Subject: [jQuery] Re: HTML returned from GET: What's the best solution to
this issue?


$.get is the Ajax call and .find gets all the p tags. They pretty much do
all the work for you. I'm using .appendTo() as an example of something you
could do with this.

$.get(hillbilly.html, function(data){
$(data).find('p').appendTo('#someId');
});

Once the data is in something you can get it all again the same way:
$('#someId').find('p')   or   $(#someId  p)

On Oct 7, 9:30 pm, Andy Matthews [EMAIL PROTECTED] wrote:
 Just a clarification...I really just want to be able to pass in a 
 string of text, from any source, and create a valid jQuery object from 
 it. In this case, this is the string that I'm going to be using:

 http://www.commadelimited.com/code/fillertext/hillbilly.html

 I want to isolate the p tags into a jQuery object.

 On Oct 7, 7:46 pm, Andy Matthews [EMAIL PROTECTED] wrote: I'm 
 building a little app that will read in a page of static HTML. I'd
  like to take the string that's returned from the get() call and 
  parse through it, dumping only the paragraphs into a jQuery object 
  with a length of 40.

  What's the best approach to this?




[jQuery] Re: IE6 Stylesheet Woes

2007-10-08 Thread James Dempster
Thats strange, I've added lots of strange chars and it still works ok for
me.

Screenshots.
http://www.jdempster.com/public/jss/ie6.png
http://www.jdempster.com/public/jss/ie7.png
http://www.jdempster.com/public/jss/ff2.png

I did test it in more but these will do for now. Can any one else check
their IE?

/James

On 10/8/07, Andy Kent [EMAIL PROTECTED] wrote:


 This has the same issue I'm afraid.

 It works for all those examples as IE thinks they are valid. Give
 something like div~p:first a go though and I you get the selector
 replaced with the string 'UNKOWN' in the innerHTML source code.

 Thanks for the attempt but sill no prize yet!

 :( *tears*

 Andy.

 On 8 Oct, 14:43, James Dempster [EMAIL PROTECTED] wrote:
  I've pinched some code from Christian Bach (http://lovepeacenukes.com/
  jquery/ie6cssfix/) and put it into it's own test case. Tested it on
  Win IE 6/7, FF 1.5/2, Safari3, Opera 9 and they all showed the same
  results.
 
  Test it out. Hopefully it can help
 .http://www.jdempster.com/public/jss/js_css.html
 
  On Oct 8, 11:29 am, Andy Kent [EMAIL PROTECTED] wrote:
 
   Unfortunately after some experimentation this method still appears to
   yield 'UNKNOWN' in place of selectors that are not understood by IE.
 
   Poo.
 
   On 8 Oct, 11:15, Andy Kent [EMAIL PROTECTED] wrote:
 
Thanks Mike, that's a huge help and sounds like it will solve my
problem perfectly. I will have a play now.
 
Should jQuery not be clever enough to handle this internally when
 you
call .text() on a style element?
Is it worth filing as a bug do you think?
 
Andy.
 
On 8 Oct, 11:07, Michael Geary [EMAIL PROTECTED] wrote:
 
 Andy, you can read or write the content of an IE stylesheet with:
 
$('style')[n].styleSheet.cssText
 
 where n is the index of the stylesheet you want.
 
 Instead of browser detection, I test for the presence of that
 .styleSheet
 property, and then either use .styleSheet.cssText or .text()
 depending.
 
 Some example non-jQuery code that I use (shows writing and
 replacing but not
 reading):
 
 function addStyle( css ) {
 var style = document.createElement( 'style' );
 style.type = 'text/css';
 head.appendChild( style );
 if( style.styleSheet )
 style.styleSheet.cssText = css;
 else
 style.appendChild( document.createTextNode(css) );
 return style;
 }
 
 function changeStyle( style, css ) {
 if( style.styleSheet )
 style.styleSheet.cssText = css;
 else
 style.replaceChild( document.createTextNode(css),
 style.firstChild );
 return style;
 }
 
 -Mike From: Andy Kent
 
  I'm working on fixing my JSS plugin for IE, it appears that
  IE has really problems with showing you the source of
  stylesheets that are between style tags.
 
  $('style').text() - returns null
 
  $('style').html() - returns the source but it is modified,
  e.g. all non-supported selectors are changed to 'UNKOWN'
  (very unhelpful!)
 
  Before I delve deeper into this does anyone have a work
  around already??
 
  I assume this is supposed to be some sort of security feature
  but it seems very strange seeing as loading external styles
  works as expected.
 
  Thanks,
  Andy.


 



[jQuery] Getting a specific option in a select

2007-10-08 Thread Giovanni Battista Lenoci

Hi, I'm trying to get the option with a specific value in it.

This is the syntax I use and doesn't works:

alert($('option:[value*=\'2\']', $('#category_1')).size());

It alerts 0, if I try without the value I get the correct size of the
options in the select.

Where's the error?

Thank you



[jQuery] Re: How to check is element exist

2007-10-08 Thread Klaus Hartl

zidoo wrote:
 if home some like this:
 
 $('div id=editLng_'+lng_id+'/div').appendTo('body');
 
 now when i create new element i need to check if that element already
 exist, if exist focus, else create. I cant find in jquery
 documentation isExist statement or something like that.
 
 Thanks.

Try:

var $div = $('#id');
$div = $div.length  $div || $('div id=id/div').appendTo('body');



--Klaus


[jQuery] Re: multiple selects, hiddens and text inputs with same name

2007-10-08 Thread syg6

Thanks a million both of you! I saw your responses over the weekend
but was unable to try them out until today, Monday.

It worked like a charm! jQuery rocks! Thanks again!

Bob

On 7 Oct, 10:16, Wizzud [EMAIL PROTECTED] wrote:
 NB . to add/change an id:
 $('select[name=foo]').each(function(i){
   this.id = 'bar'+i;
   });

 On Oct 6, 2:47 am, rgrwkmn [EMAIL PROTECTED] wrote:

  In addition to Wizzud's solution:
  Since it seems that you want to be able to access each select with the
  name foo individually and change their values individually you could
  try something like this:

  $('select[name=foo]').each(function(i){
$(this).addClass('foo'+i);
});

  This would dynamically add classes foo0, foo1, foo2, etc. to your
  selects named foo, meaning you could access each by class name if you
  know what order they appear in. Also, make sure to run that script
  whenever the contents of your table change so you always have an up to
  date list. I assume it would be 'better' to give id's to each one
  since they are unique, but unique class names work just as well and
  there is no addId method in jQuery.

  On Oct 5, 5:59 pm, Wizzud [EMAIL PROTECTED] wrote:

   With...
   select name='foo'option value='bar1'bar1/option/select
   select name='foo'option value='bar2'bar2/option/select

   try...
   var selects = $('select[name=foo]');

   See the Attribute Filters, under Selectors in the API Reference.

   (If you have non-unique ids for elements on your page, do not rely on
   selecting them by $('#id')!)

   syg6-2 wrote:

For reasons I won't go into here I have a page which has a table with
a variable amount of rows. Each row has a hidden, text, and select.
They all have the same name. I also have other selects on the page
with different names.

What I need to do is access only the selects, to be able to add and
remove options. So I need to know how many selects with the name foo
are on the page

I have tried this:

jQuery(select#foo)

which simply returns [Object object]. If I do this:

jQuery(select#foo).length

it returns 0 which is not true. When I load the page I have 2 selects
already. So if I do this:

jQuery(select#foo).text()

it returns white space. And

jQuery(select#foo).val()

returns undefined.

I have also tried stuff like

jQuery(select#foo[0]).val()

but nothing seems to work. Since uses can dynamically add rows to the
table (and with each one a hidden, text input and select) I need to 1)
know how many selects with a given id/name there are and 2) be able to
manipulate the values in each one.

How can I do this?

Thanks!

   --
   View this message in 
   context:http://www.nabble.com/multiple-selects%2C-hiddens-and-text-inputs-wit...
   Sent from the jQuery General Discussion mailing list archive at 
   Nabble.com.



[jQuery] jQuery and .Net Postbacks

2007-10-08 Thread RDO

Hi guys,

I'm having problems with .Net postbacks and jQuery. When I first come
to the web page I'm working on, everything works fine: all elements
that should be present, are. All events are properly attached to their
respective elements. It's all honky dory (pardon the cliche), until I
send data to the server and get a postback response. All events are
lost and the elements act completely unpredictably. Any ideas what
might be happening? Your help is much appreciated.

Best,
RDO



[jQuery] Re: Code review: 1 problem each in IE and FF

2007-10-08 Thread R. Rajesh Jeba Anbiah

On Oct 8, 8:43 am, Andy Matthews [EMAIL PROTECTED] wrote:
 I was just working on a quick little project to utilize some gibberish
 text I've had laying around:http://www.commadelimited.com/code/fillertext/
   snip

Culprit is append(). You may try $text.text() instead. If you use
Firebug, you can see that it's appending to the wrong place.

--
  ?php echo 'Just another PHP saint'; ?
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/



[jQuery] Re: Problem while setting designMode=on in firefox.

2007-10-08 Thread Bil Corry


Ashish Agrawal wrote on 10/8/2007 10:26 AM: 

First one (with document.ready) don't work (at least for me in FF 2).
But second one works fine as expected.
Can any one tell me how can I simulate body onload using jQuery?


This is how I did it.  I never tested anything beyond FF2 and IE7, but it does 
work for them.


!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html
head
meta http-equiv=Content-Type content=text/html; 
charset=utf-8
titleDesignmode Demo/title
script src=jquery-latest.pack.js 
type=text/javascript/script
script language=JavaScript type=text/javascript
jQuery.fn.designmode = function(option) {
var option = option || 'On';
this.each(function(i){
if (this)
if (this.contentDocument)
$(this).load( 
function() { this.contentDocument.designMode = option; }); // FF2
else if (this.contentWindow  
this.contentWindow.document)

this.contentWindow.document.designMode = option; // IE7
});
return this;
}

$(function(){
$(#edit).designmode(); // turn on designMode
});
/script
/head
body style=background: white;
iframe id=edit style=height: 100px; width: 400px; border: 1px solid 
black; background: white; overflow: auto; display: inline;
/iframe
/body
/html





- Bil



[jQuery] Re: Code review: 1 problem each in IE and FF

2007-10-08 Thread Andy Matthews

That didn't do it either. I ended up building a string in the loop, then
dumping that into the textarea usin val(). Thanks for the poke in the right
direction though. Wouldn't have thought that append() would have that
behaviour. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of R. Rajesh Jeba Anbiah
Sent: Monday, October 08, 2007 11:51 AM
To: jQuery (English)
Subject: [jQuery] Re: Code review: 1 problem each in IE and FF


On Oct 8, 8:43 am, Andy Matthews [EMAIL PROTECTED] wrote:
 I was just working on a quick little project to utilize some gibberish 
 text I've had laying 
 around:http://www.commadelimited.com/code/fillertext/
   snip

Culprit is append(). You may try $text.text() instead. If you use
Firebug, you can see that it's appending to the wrong place.

--
  ?php echo 'Just another PHP saint'; ?
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/




[jQuery] Re: Problem while setting designMode=on in firefox.

2007-10-08 Thread Ashish Agrawal

Thanks for quick reply, cool its working absolute fine. And many
thanks for having that as plugin.

Ashish Agrawal

On Oct 8, 10:28 pm, Bil Corry [EMAIL PROTECTED] wrote:
 Ashish Agrawal wrote on 10/8/2007 10:26 AM:

  First one (with document.ready) don't work (at least for me in FF 2).
  But second one works fine as expected.
  Can any one tell me how can I simulate body onload using jQuery?

 This is how I did it.  I never tested anything beyond FF2 and IE7, but it 
 does work for them.

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
 http://www.w3.org/TR/html4/loose.dtd;
 html
 head
 meta http-equiv=Content-Type content=text/html; 
 charset=utf-8
 titleDesignmode Demo/title
 script src=jquery-latest.pack.js 
 type=text/javascript/script
 script language=JavaScript type=text/javascript
 jQuery.fn.designmode = function(option) {
 var option = option || 'On';
 this.each(function(i){
 if (this)
 if (this.contentDocument)
 $(this).load( 
 function() { this.contentDocument.designMode = option; }); // FF2
 else if (this.contentWindow 
  this.contentWindow.document)
 
 this.contentWindow.document.designMode = option; // IE7
 });
 return this;
 }

 $(function(){
 $(#edit).designmode(); // turn on designMode
 });
 /script
 /head
 body style=background: white;
 iframe id=edit style=height: 100px; width: 400px; border: 
 1px solid black; background: white; overflow: auto; display: inline;
 /iframe
 /body
 /html

 - Bil



[jQuery] Re: Please TEST? Re: Safari crash and burn on Accordion form

2007-10-08 Thread MichaelEvangelista


Geez... I goofed.

Towards the bottom of the form, I guess where the Next should be, I 
actually get: ...


I am a dummy - sorry.

I made a separate set of files for the temp page, and forgot to put in that 
bit of code.

how anticlimactic. please try again
http://comparemyagent.com/fa/testsafari.cfm

thanks for looking at it, good to know it 'detected' your safari, too (with 
that popup)



--

--
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog : www.miuaiga.com


Howard Jones [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]


MichaelEvangelista wrote:


update - it was actually super easy to
sniff for Safari and to replace the calls to the accordion function with 
plain ol' jQuery .slideUp() and .slideDown()


My only safari version is via Browsercam - and I really can't tell how 
the animation looks.

http://comparemyagent.com/fa/testsafari.cfm

If anybody with a safari browser would care to check...  should I use 
another method besides slideUp/down?

Is it fairly smooth?

Also, this thing was crashing safari before I made my changes.

Now it should
1) pop up an alert

Yep
2) require some fields on each tab by clicking 'next' but not by clicking 
'back'

3) be able to go back and forth from the 3rd panel no problem
Towards the bottom of the form, I guess where the Next should be, I 
actually get:


The error occurred in /vservers/gwssite/htdocs/fa/inc/include_fa_buy.cfm: 
line 154
152 : label for=recordClientCommentsBuy class=inputDo you have any 
specific requests?/label
153 : textarea name=recordClientCommentsBuy 
id=recordClientCommentsBuy class=inputclass onfocus=this.value = ''

154 : cfoutput#exampleText1#/cfoutput/textareabr /

and a stack trace.

You're getting there ;-)

Howie
(whose own .getJSON calls never seem to call their callbacks in Safari 2)






[jQuery] Tell-a-friend script?

2007-10-08 Thread marlyred


I am looking for a 'tell-a-friend' jquery script to use on a static html
webpage.  Does anyone know if there is one available?

If not, am willing to pay for someone to write it for me.  Am also looking
for a jquery ajax contact form to use on a static html webpage if anyone
knows of one.

Best Regards
-- 
View this message in context: 
http://www.nabble.com/Tell-a-friend-script--tf4584690s27240.html#a13087221
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Tell-a-friend script?

2007-10-08 Thread Rey Bango


Hi,

You'll need some level of backend integration with both of these forms. 
What server-side language are you using?


Rey

marlyred wrote:


I am looking for a 'tell-a-friend' jquery script to use on a static html
webpage.  Does anyone know if there is one available?

If not, am willing to pay for someone to write it for me.  Am also looking
for a jquery ajax contact form to use on a static html webpage if anyone
knows of one.

Best Regards


[jQuery] Re: Replicating Prototype lightbox with jQuery

2007-10-08 Thread Leandro Vieira Pinho

Regards Michael.

On Oct 8, 11:29 am, Michael Price [EMAIL PROTECTED] wrote:
 Andy Matthews wrote:
  Someone JUST posted a link to their direct jQuery Lightbox conversion.

 Which is exactly the one I just found on Google as well :)

 I think instead of think before you speak I should invest time in
 Google before you type - although that would be tricky since you have
 to type in order to Google so never mind!

 Thanks for pointing that out Andy, and thanks Leandro for the excellent
 looking plugin!

 Regards,
 Michael Price



[jQuery] Select box show/hide

2007-10-08 Thread bombaru

Does anyone have any examples of how I could use a select box to show/
hide different divs on a page.  To take it a level further, I would
also like the same behavior to work if images are clicked.

A little background:  I'm tring to build a payment options page and
have a list of payment icons (Visa, MC, AmEx, etc) as well as a select
box that lists the options.  The page would have all the forms in
their own DIVs with an ititial value set to hide();.  clicking on an
image would result in showing the appropriate DIV for that option as
well as changing the select box to alert the customer of their
choice.  Using the select box would have the same behavior but no need
to highlight the image.  Does this make any sense?

I've been messing around with this for a while and can not seem to get
anything to work.  I'd appreciate any help you might be able to offer
me.  Here's an example of the page:

h1Payment Methods/h1
pConfused about payment types? a href=#Learn more about your
payment options here./a/p
form
select
option id=value1Option 1/option
option id=value2Option 2/option
option id=value3Option 3/option
option id=value4Option 4/option
option id=value5Option 5/option
option id=value6Option 6/option
option id=value7Option 7/option
  /select
/form
div class=option id=option-1Option 1/div
div class=option id=option-2Option 2/div
div class=option id=option-3Option 3/div
div class=option id=option-4Option 4/div
div class=option id=option-5Option 5/div
div class=option id=option-6Option 6/div
div class=option id=option-7Option 7/div

script type=text/javascript
$(document).ready(function() {
 // (hide the divs on initial view)
 $('#option-1').hide();
 $('#option-2').hide();
 $('#option-3').hide();
 $('#option-4').hide();
 $('#option-5').hide();
 $('#option-6').hide();
 $('#option-7').hide();

 // (need help figuring out how to trigger the show)

});
/script

Thanks for your help.



[jQuery] Re: Getting a specific option in a select

2007-10-08 Thread motob

Try removing the colon (:) after the option element, like so:

$('option[value*=\'2\']', $('#category_1')).size()

On Oct 8, 12:11 pm, Giovanni Battista Lenoci [EMAIL PROTECTED]
wrote:
 Hi, I'm trying to get the option with a specific value in it.

 This is the syntax I use and doesn't works:

 alert($('option:[value*=\'2\']', $('#category_1')).size());

 It alerts 0, if I try without the value I get the correct size of the
 options in the select.

 Where's the error?

 Thank you



[jQuery] Re: Packing JS code

2007-10-08 Thread Pops

Thanks rey, this is good enough. I just needed something for our
automated build/distribution process.

-
HLS

On Oct 8, 9:24 am, Rey Bango [EMAIL PROTECTED] wrote:
 Pops,

 Check out YUI compressor:

 http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-comp...

 Rey...

 Pops wrote:
  What I can download to pack and minified my javascript code?

  Thanks



[jQuery] Re: Packing JS code

2007-10-08 Thread Rey Bango


My pleasure. :)

Rey...

Pops wrote:

Thanks rey, this is good enough. I just needed something for our
automated build/distribution process.

-
HLS

On Oct 8, 9:24 am, Rey Bango [EMAIL PROTECTED] wrote:

Pops,

Check out YUI compressor:

http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-comp...

Rey...

Pops wrote:

What I can download to pack and minified my javascript code?
Thanks





[jQuery] Re: Select box show/hide

2007-10-08 Thread Chris Jordan
bombaru,

I had just helped another user with almost this same question. I'm lazy, so
check out this short
threadhttp://groups.google.com/group/jquery-en/browse_thread/thread/61f29abca67a866c/075832c811ad0ee3#075832c811ad0ee3
.

He was doing things on a click, but you could do them on  the change event.
I've not used this event in jQuery so I'm making an assumption that it's
covered. Why wouldn't it be, right?

so in the code in that thread I do something like:

$(.someClass).bind(click, function(){
 // function goes here...
});

you would do something like:

$(#mySelectBoxElement).bind(change, function(){
 // function goes here...
});

or I think you could do:
$(#mySelectBoxElement).change(function(){
 // function goes here...
});

I'm not sure which is the preferable syntax. I think it's a matter of style.
I tend to use the bind function.

I hope this helps.

Cheers,
Chris


On 10/8/07, bombaru [EMAIL PROTECTED] wrote:


 Does anyone have any examples of how I could use a select box to show/
 hide different divs on a page.  To take it a level further, I would
 also like the same behavior to work if images are clicked.

 A little background:  I'm tring to build a payment options page and
 have a list of payment icons (Visa, MC, AmEx, etc) as well as a select
 box that lists the options.  The page would have all the forms in
 their own DIVs with an ititial value set to hide();.  clicking on an
 image would result in showing the appropriate DIV for that option as
 well as changing the select box to alert the customer of their
 choice.  Using the select box would have the same behavior but no need
 to highlight the image.  Does this make any sense?

 I've been messing around with this for a while and can not seem to get
 anything to work.  I'd appreciate any help you might be able to offer
 me.  Here's an example of the page:

 h1Payment Methods/h1
 pConfused about payment types? a href=#Learn more about your
 payment options here./a/p
 form
 select
 option id=value1Option 1/option
 option id=value2Option 2/option
 option id=value3Option 3/option
 option id=value4Option 4/option
 option id=value5Option 5/option
 option id=value6Option 6/option
 option id=value7Option 7/option
   /select
 /form
 div class=option id=option-1Option 1/div
 div class=option id=option-2Option 2/div
 div class=option id=option-3Option 3/div
 div class=option id=option-4Option 4/div
 div class=option id=option-5Option 5/div
 div class=option id=option-6Option 6/div
 div class=option id=option-7Option 7/div

 script type=text/javascript
 $(document).ready(function() {
 // (hide the divs on initial view)
 $('#option-1').hide();
 $('#option-2').hide();
 $('#option-3').hide();
 $('#option-4').hide();
 $('#option-5').hide();
 $('#option-6').hide();
 $('#option-7').hide();

 // (need help figuring out how to trigger the show)

 });
 /script

 Thanks for your help.




-- 
http://cjordan.us


[jQuery] Re: How do I get this to fade in

2007-10-08 Thread motob


You could do something like this:

$(.thumbnail li).click(function(){
  var thumbnailHtml = $(this).html();

  $(#large li).fadeOut(fast, function(){
$(this).html(thumbnailHtml).fadeIn(slow);
  });

  return false;
});



On Oct 8, 6:47 am, skinnytiger [EMAIL PROTECTED] wrote:
 I'm using the below script to load html into a placeholder, it all
 looks groovy but I want it to fade in, where do I add the .fadeIn() to
 get this to work?

 script type=text/javascript
 $(document).ready(function(){
 $(.thumbnail li).click(function(){
 $(#large li).html($(this).html());
 return false;
 });

 });

 /script



[jQuery] Re: How do I get this to fade in

2007-10-08 Thread James Dempster

I'm not sure if the script you have quite makes sense to me. But I've
added where I think it should go.

script type=text/javascript
$(document).ready(function(){
$(.thumbnail li).click(function(){
$(#large li).html($
(this).html()).hide().fadeIn('slow');
return false;
});
});
/script

Hope it helps :¬)

/James

On Oct 8, 11:47 am, skinnytiger [EMAIL PROTECTED] wrote:
 I'm using the below script to load html into a placeholder, it all
 looks groovy but I want it to fade in, where do I add the .fadeIn() to
 get this to work?

 script type=text/javascript
 $(document).ready(function(){
 $(.thumbnail li).click(function(){
 $(#large li).html($(this).html());
 return false;
 });

 });

 /script



[jQuery] Re: Select box show/hide

2007-10-08 Thread Chris Jordan
Also, I just noticed this code:
$(document).ready(function() {
 // (hide the divs on initial view)
 $('#option-1').hide();
 $('#option-2').hide();
 $('#option-3').hide();
 $('#option-4').hide();
 $('#option-5').hide();
 $('#option-6').hide();
 $('#option-7').hide();

 // (need help figuring out how to trigger the show)

});

you could simplify that code like this:
$(div[id^='option']).hide();

This says, get me all the elements of type div that have the attribute 'id'
that starts with 'option'.

Seven lines to one line! Isn't that cool!?

Have fun!

Chris

On 10/8/07, Chris Jordan [EMAIL PROTECTED] wrote:

 bombaru,

 I had just helped another user with almost this same question. I'm lazy,
 so check out this short 
 threadhttp://groups.google.com/group/jquery-en/browse_thread/thread/61f29abca67a866c/075832c811ad0ee3#075832c811ad0ee3
 .

 He was doing things on a click, but you could do them on  the change
 event. I've not used this event in jQuery so I'm making an assumption that
 it's covered. Why wouldn't it be, right?

 so in the code in that thread I do something like:

 $(.someClass).bind(click, function(){
  // function goes here...
 });

 you would do something like:

 $(#mySelectBoxElement).bind(change, function(){
  // function goes here...
 });

 or I think you could do:
 $(#mySelectBoxElement).change(function(){
  // function goes here...
 });

 I'm not sure which is the preferable syntax. I think it's a matter of
 style. I tend to use the bind function.

 I hope this helps.

 Cheers,
 Chris


 On 10/8/07, bombaru [EMAIL PROTECTED] wrote:
 
 
  Does anyone have any examples of how I could use a select box to show/
  hide different divs on a page.  To take it a level further, I would
  also like the same behavior to work if images are clicked.
 
  A little background:  I'm tring to build a payment options page and
  have a list of payment icons (Visa, MC, AmEx, etc) as well as a select
  box that lists the options.  The page would have all the forms in
  their own DIVs with an ititial value set to hide();.  clicking on an
  image would result in showing the appropriate DIV for that option as
  well as changing the select box to alert the customer of their
  choice.  Using the select box would have the same behavior but no need
  to highlight the image.  Does this make any sense?
 
  I've been messing around with this for a while and can not seem to get
  anything to work.  I'd appreciate any help you might be able to offer
  me.  Here's an example of the page:
 
  h1Payment Methods/h1
  pConfused about payment types? a href=#Learn more about your
  payment options here./a/p
  form
  select
  option id=value1Option 1/option
  option id=value2Option 2/option
  option id=value3Option 3/option
  option id=value4Option 4/option
  option id=value5Option 5/option
  option id=value6Option 6/option
  option id=value7Option 7/option
/select
  /form
  div class=option id=option-1Option 1/div
  div class=option id=option-2Option 2/div
  div class=option id=option-3Option 3/div
  div class=option id=option-4Option 4/div
  div class=option id=option-5Option 5/div
  div class=option id=option-6Option 6/div
  div class=option id=option-7Option 7/div
 
  script type=text/javascript
  $(document).ready(function() {
  // (hide the divs on initial view)
  $('#option-1').hide();
  $('#option-2').hide();
  $('#option-3').hide();
  $('#option-4').hide();
  $('#option-5').hide();
  $('#option-6').hide();
  $('#option-7').hide();
 
  // (need help figuring out how to trigger the show)
 
  });
  /script
 
  Thanks for your help.
 
 


 --
 http://cjordan.us




-- 
http://cjordan.us


[jQuery] Re: Select box show/hide

2007-10-08 Thread Josh Nathanson


You could create a common function to figure out which div to open, then 
bind it to the appropriate elements:


$(img.changediv).click(showfunc); //bind to images with class changediv
$(#selectid).change(showfunc); //  bind to specific select element

var showfunc = function() {
   if ($(this).is(select) ) {
   // get correct div based on $(this).val()
   }
   else {
   // get correct div based on img clicked
   }
   div.show();
}



- Original Message - 
From: bombaru [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Monday, October 08, 2007 12:35 PM
Subject: [jQuery] Select box show/hide




Does anyone have any examples of how I could use a select box to show/
hide different divs on a page.  To take it a level further, I would
also like the same behavior to work if images are clicked.

A little background:  I'm tring to build a payment options page and
have a list of payment icons (Visa, MC, AmEx, etc) as well as a select
box that lists the options.  The page would have all the forms in
their own DIVs with an ititial value set to hide();.  clicking on an
image would result in showing the appropriate DIV for that option as
well as changing the select box to alert the customer of their
choice.  Using the select box would have the same behavior but no need
to highlight the image.  Does this make any sense?

I've been messing around with this for a while and can not seem to get
anything to work.  I'd appreciate any help you might be able to offer
me.  Here's an example of the page:

h1Payment Methods/h1
pConfused about payment types? a href=#Learn more about your
payment options here./a/p
form
select
   option id=value1Option 1/option
   option id=value2Option 2/option
   option id=value3Option 3/option
   option id=value4Option 4/option
   option id=value5Option 5/option
   option id=value6Option 6/option
   option id=value7Option 7/option
 /select
/form
div class=option id=option-1Option 1/div
div class=option id=option-2Option 2/div
div class=option id=option-3Option 3/div
div class=option id=option-4Option 4/div
div class=option id=option-5Option 5/div
div class=option id=option-6Option 6/div
div class=option id=option-7Option 7/div

script type=text/javascript
$(document).ready(function() {
// (hide the divs on initial view)
$('#option-1').hide();
$('#option-2').hide();
$('#option-3').hide();
$('#option-4').hide();
$('#option-5').hide();
$('#option-6').hide();
$('#option-7').hide();

// (need help figuring out how to trigger the show)

});
/script

Thanks for your help.





[jQuery] Session management in an Ajax app

2007-10-08 Thread Rey Bango


A buddy of mine, Raymond Camden, posted an interesting question on his 
blog:


How can you timeout a session in an Ajax-based application?

http://www.coldfusionjedi.com/index.cfm/2007/10/8/Ask-a-Jedi-How-can-you-timeout-a-session-in-an-Ajaxbased-application

The gist is that if you have a dashboard-type app and you need to 
determine if your session has timed out on the next Ajax request, how 
would you go about doing it. He mentioned creating a ping-like service 
that would poll the server every so often. It seems that this would 
dramatically increase the number of HTTP requests.


Since session management is available in many server-side languages, not 
just ColdFusion obviously, I think this is a good topic that's 
applicable to most any project.


Is there a better way of doing it?

Rey...


[jQuery] Re: Select box show/hide

2007-10-08 Thread Karl Swedberg
Here is one way you could do it, based on the index of the options  
and divs:


  $(document).ready(function() {
var $optionDivs = $('div[id^=option]').hide();
$('select').change(function() {
  var i = $('option', this).index( $(':selected')[0]);
  $optionDivs.hide().eq(i).show();
});
  });

tested successfully in FF 2.0.0.7

The IDs on those divs seem superfluous. You could do the same thing  
with a common class:

$('div.options').hide(); // etc.
Or you could wrap all of those divs in another div with an id of  
options:

$('#options  div').hide() // etc.

Hope that helps.

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



On Oct 8, 2007, at 4:23 PM, Chris Jordan wrote:


Also, I just noticed this code:
$(document).ready(function() {
 // (hide the divs on initial view)
 $('#option-1').hide();
 $('#option-2').hide();
 $('#option-3').hide();
 $('#option-4').hide();
 $('#option-5').hide();
 $('#option-6').hide();
 $('#option-7').hide();

 // (need help figuring out how to trigger the show)

});

you could simplify that code like this:
$(div[id^='option']).hide();

This says, get me all the elements of type div that have the  
attribute 'id' that starts with 'option'.


Seven lines to one line! Isn't that cool!?

Have fun!

Chris

On 10/8/07, Chris Jordan [EMAIL PROTECTED] wrote:
bombaru,

I had just helped another user with almost this same question. I'm  
lazy, so check out this short thread.


He was doing things on a click, but you could do them on  the  
change event. I've not used this event in jQuery so I'm making an  
assumption that it's covered. Why wouldn't it be, right?


so in the code in that thread I do something like:

$(.someClass).bind(click, function(){
 // function goes here...
});

you would do something like:

$(#mySelectBoxElement).bind(change, function(){
 // function goes here...
});

or I think you could do:
$(#mySelectBoxElement).change(function(){
 // function goes here...
});

I'm not sure which is the preferable syntax. I think it's a matter  
of style. I tend to use the bind function.


I hope this helps.

Cheers,
Chris



On 10/8/07, bombaru [EMAIL PROTECTED] wrote:

Does anyone have any examples of how I could use a select box to show/
hide different divs on a page.  To take it a level further, I would
also like the same behavior to work if images are clicked.

A little background:  I'm tring to build a payment options page and
have a list of payment icons (Visa, MC, AmEx, etc) as well as a select
box that lists the options.  The page would have all the forms in
their own DIVs with an ititial value set to hide();.  clicking on an
image would result in showing the appropriate DIV for that option as
well as changing the select box to alert the customer of their
choice.  Using the select box would have the same behavior but no need
to highlight the image.  Does this make any sense?

I've been messing around with this for a while and can not seem to get
anything to work.  I'd appreciate any help you might be able to offer
me.  Here's an example of the page:

h1Payment Methods/h1
pConfused about payment types? a href=#Learn more about your
payment options here./a/p
form
select
option id=value1Option 1/option
option id=value2Option 2/option
option id=value3Option 3/option
option id=value4Option 4/option
option id=value5Option 5/option
option id=value6Option 6/option
option id=value7Option 7/option
  /select
/form
div class=option id=option-1Option 1/div
div class=option id=option-2Option 2/div
div class=option id=option-3Option 3/div
div class=option id=option-4Option 4/div
div class=option id=option-5Option 5/div
div class=option id=option-6Option 6/div
div class=option id=option-7Option 7/div

script type=text/javascript
$(document).ready(function() {
// (hide the divs on initial view)
$('#option-1').hide();
$('#option-2').hide();
$('#option-3').hide();
$('#option-4').hide();
$('#option-5').hide();
$('#option-6').hide();
$('#option-7').hide();

// (need help figuring out how to trigger the show)

});
/script

Thanks for your help.




--
http://cjordan.us



--
http://cjordan.us




[jQuery] Re: jQPanels

2007-10-08 Thread [EMAIL PROTECTED]

@GUY
I agree should be very usefull but means a major update...or better a
complete rewrite of the plugin to allow panels to work as groups of
elements or singularly.
Right now if you use the plug in against mor element ( es : $
('.slide').siledPanel()   and you have more div with slide class) the
effect should work with an inconvenient that the callback  fire more
times and so the class of the calling element ( panel-up or panle-down
changes with no logic relation).
If you do not style with arrows and so on it should be fine.

I will work on and will advise for update.

thanks for comments

Andrea

On Oct 8, 9:32 am, Cloudream [EMAIL PROTECTED] wrote:
 like $(someid).slideToggle ?

 On Oct 8, 12:14 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:

  I have just posted my very first plug-in.
  Is an easy and unubitrusive script to create and manage sliding panels
  with for the moment quite few options.
  I'd really should like to have some feedback about the coding.
  Demo page and download link:
  a href=http://www.andreacfm.com/examples/jQpanels/;Examples Page/
  a,
  a href=http://www.andreacfm.com/page.cfm/Downloads;Download zip
  file/a



[jQuery] Re: jQuery (Superfish) conflicting with swfobject

2007-10-08 Thread Wessa


I am having trouble with this fix myself. http://growthbooks.com - the
superfish drop down menu is not working in ie6 (windows xp sp2) or ie7
(windows xp sp2). I applied the z-index:999 to the .nav element and the drop
down is still not showing. It works fine in firefox/safari etc..

Any clues would be appreciated very much.
-- 
View this message in context: 
http://www.nabble.com/jQuery-%28Superfish%29-conflicting-with-swfobject-tf4545960s27240.html#a13051082
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jQuery and .Net Postbacks

2007-10-08 Thread Jeffrey Kretz

If you have a sample page I could take a look at, I can give it a shot.

I have a number of .NET applications that are married with jQuery both for
UI work, as well as Ajax calls, and haven't had any troubles.

But I'd be happy to take a look at yours if you'd like.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of RDO
Sent: Monday, October 08, 2007 8:53 AM
To: jQuery (English)
Subject: [jQuery] jQuery and .Net Postbacks


Hi guys,

I'm having problems with .Net postbacks and jQuery. When I first come
to the web page I'm working on, everything works fine: all elements
that should be present, are. All events are properly attached to their
respective elements. It's all honky dory (pardon the cliche), until I
send data to the server and get a postback response. All events are
lost and the elements act completely unpredictably. Any ideas what
might be happening? Your help is much appreciated.

Best,
RDO




[jQuery] Re: [PREVIEW] another future grid: jquery.KIKEgrid alpha...

2007-10-08 Thread Jörn Zaefferer


Enrique Meléndez Estrada schrieb:


@Jörn: thanxs, I love jquery. Obviously, i did'nt mean to highlight 
what others Do wrong, but what others Don't do at all and I needed for 
my Intranet purposes. Anyway, I changed the tone of the page 
(http://www.ita.es/jquery/kikegrid.htm) as you can see :-)


Of course I'll upgrade to UI, each plugin. It's alpha, because it is 
for internal use, not prepared as a public plugin (no API, etc...). 
But enough to see where things are going.


Also there'll be full AJAX use, as well as some surprises for FF and 
IE7. I'm also doing ala Extjs theme version which is becoming promising.



Sounds great! Be sure to post your progress here :-)

Jörn


[jQuery] Image chooser / smooth popup with jQuery?

2007-10-08 Thread MichaelEvangelista


Has anyone created a similar app, using jQuery, to the extjs.com Image 
Chooser?

http://extjs.com/deploy/ext/docs/index.html - click
Image Chooser Component in the right column

I need to do something similar, but simpler - my page will have a set number 
of 'blank' thumbnails.


1) Click any placeholder block to see a selection of thumbnails (some sort 
of popup or shown/hidden div)

2) Choose an image to see a large version
3) Click a link or button to close the selector, with the selected image 
shown in place of the initial 'blank' for that space

4) Write a variable to a hidden field for each image selected

I also need to allow for any image to be clicked again, and changed, as many 
times as the user wants.


I have done similar things with basic popup windows, where a selection in a 
form field in the popup changes the parent form when the popup is closed - 
but I am looking for a more elegant solution, without page refreshes or 
browser popups...


any suggestions?

--

--
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog : www.miuaiga.com





[jQuery] tablesorter options not working

2007-10-08 Thread Rabbit

Hi all. I've the following code:

  jQuery('#bid_requests_for_part').tablesorter({
sortColumn: 'Vendor',
sortClassAsc: 'headerSortUp',
sortClassDesc: 'headerSortDown',
headerClass: 'header',
stripingRowClass: [ 'even', 'odd' ],
stripeRowsOnStartup: true
  });

The sorting portion works, but none of the options are taking effect.
Except headerClass -- that is setting the class of the th elements.
Beyond that, nothing; no striping, no table header styles.

I've included the thead and tbody elements in my table, too.

Any ideas?



[jQuery] Rotate an Image 90 Degrees with jquery-rotate plugin

2007-10-08 Thread cfdvlpr

I started a rather lengthy discussion about this awhile back and never
really found anything to work.
However, I just came across this plugin that seems like it might do
the trick:
http://code.google.com/p/jquery-rotate/
Has anyone else used this plugin?  Does it work well for you?



[jQuery] Re: Tell-a-friend script?

2007-10-08 Thread marlyred


Hi,

PHP, but my pages are static html.

Marlyred



Rey Bango-2 wrote:
 
 
 Hi,
 
 You'll need some level of backend integration with both of these forms. 
 What server-side language are you using?
 
 Rey
 
 marlyred wrote:
 
 I am looking for a 'tell-a-friend' jquery script to use on a static html
 webpage.  Does anyone know if there is one available?
 
 If not, am willing to pay for someone to write it for me.  Am also
 looking
 for a jquery ajax contact form to use on a static html webpage if anyone
 knows of one.
 
 Best Regards
 
 

-- 
View this message in context: 
http://www.nabble.com/Tell-a-friend-script--tf4584690s27240.html#a13106026
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Session management in an Ajax app

2007-10-08 Thread Rabbit

Rey Bango wrote:
 The gist is that if you have a dashboard-type app and you need to
 determine if your session has timed out on the next Ajax request, how
 would you go about doing it. He mentioned creating a ping-like service
 that would poll the server every so often. It seems that this would
 dramatically increase the number of HTTP requests.

Disclaimer: My suggestion would probably work best for MVC-style
frameworks like Rails. That said...

I wouldn't poll the server on a timer. Instead I'd wrap the applicable
controllers in a before_filter that check the age of the session. If
the session is too old, intercept the request and render whatever is
appropriate for your application.

- Rabbit

---

On Oct 8, 1:34 pm, Rey Bango [EMAIL PROTECTED] wrote:
 A buddy of mine, Raymond Camden, posted an interesting question on his
 blog:

 How can you timeout a session in an Ajax-based application?

 http://www.coldfusionjedi.com/index.cfm/2007/10/8/Ask-a-Jedi-How-can-...

 The gist is that if you have a dashboard-type app and you need to
 determine if your session has timed out on the next Ajax request, how
 would you go about doing it. He mentioned creating a ping-like service
 that would poll the server every so often. It seems that this would
 dramatically increase the number of HTTP requests.

 Since session management is available in many server-side languages, not
 just ColdFusion obviously, I think this is a good topic that's
 applicable to most any project.

 Is there a better way of doing it?

 Rey...



[jQuery] Selecting option:first on dynamic menu list

2007-10-08 Thread Alan

I just wanted to share, I had this problem :
in FF it would select the last option
in IE, the first.

With a dynamic loaded Menu, you need to put
the .attr(selected,selected) in a function after the load is
successful:

$(#user_list).load(getUserList.php,function(){
$(#user_list option:first).attr(selected,selected);
}):


WORKS LIKE A CHARM NOW!



[jQuery] jEditable selects disappearing

2007-10-08 Thread SterlingK

Hi.

My example file: http://travishannon.com/test.php

In the above file, using the public release of jEditable and jquery
1.2.1 (also tried with earlier versions), I've created what should be
a an edit-in-place select box.  However, when I click on it, the text
just disappears.

I've tried it using a 'loadurl' option, and with that an empty select
box is created (i.e. - it's not loading the values).  I'm using the
same file as the example for simplicity's sake.

This is a mysql-driven value, which works totally fine when I use just
a text box and not a select.  I've tried it without the db connection,
with static values, with the same effects.

Here's my code:
$(function() {

  $(.select_status).editable(member_props_interest_save.php, {
data   :
{'interested':'interested','rejected':'rejected','selected':'interested'},
type : 'select',
indicator: 'saving',
tooltip: 'click to edit',
submit: OK
  });

});

And the text itself:
pThis should show a select box on click:
b class=select_status id=select_1 style=height:20px;
?php echo (my database field); ?
/b
/p

Take a look and see if it has the same effect for you.

Thanks for your help!

- Sterling



[jQuery] Re: Tell-a-friend script?

2007-10-08 Thread Chris W. Parker

On Monday, October 08, 2007 3:19 PM marlyred said:

 Hi,
 
 PHP, but my pages are static html.
 
 Marlyred

You may have already received an email about this offlist but javascript
(jQuery is javascript) cannot send emails. What it will need to do is
submit the form's data to a server side script (in your case PHP) and
have the server send the email through its MTA (probably sendmail,
possibly postfix). Static HTML doesn't have anything to do with it. The
PHP script that needs to be written doesn't necessarily need to display
anything to the user.

The flow would go like this:

static page with form - form is submitted to PHP page - PHP page sends
email and then redirects to another static page with a confirmation e.g.
Your tell-a-friend request has been sent.



HTH,
Chris.


[jQuery] Re: Session management in an Ajax app

2007-10-08 Thread Michael Geary

Rey and I were kicking this around in IM and I came up with a little plugin
to do this.

The idea is that you want to alert the user a short while before the server
session times out. If you know how long the session timeout is, you can use
code like this:

(function( $ ) {
$.expire = function( fn, callback, interval, start ) {
var timer;
function set() {
timer = setTimeout( callback, interval );
}
if( start ) set();
return function() {
clearTimeout( timer );
set();
fn.apply( this, arguments );
};
};

$.ajaxExpire = function( callback, interval, start ) {
$.ajax = $.expire( $.ajax, callback, interval, start );
};
})( jQuery );

$.test = function( x ) {
console.log( this().jquery, x, 'started' );
};

$.test = $.expire( $.test,
function() { console.log( 'expired' ); },
2000 );

$.test('a');
$.test('b');
$.test('c');

$.ajaxExpire(
function() { $('.SessionExpired').show('slow') },
15*60*1000 /* 15 minutes */ );

$.ajaxExpire(
function() { $('.SessionExpired').show('slow') },
15*60*1000 /* 15 minutes */
true /* start session expiration now */ );

The $.test stuff is just for testing (you can paste this whole thing into
the Firebug multi-line command line and try it out, minus the ajax stuff).
To add a session timeout notifier to jQuery's $.ajax() function, you would
use something like one of the two $.ajaxExpire calls at the end. The first
one doesn't start a timer when you first call it; it only starts one on the
first $.ajax call. The second one with the 'true' at the end starts the
timer immediately - more likely to be what you want if the initial page load
starts the server session timer just like an ajax request would.

This sets a global session timer that applies to all $.ajax calls - each one
restarts the timer. It should also apply to $.get, $.post, etc. - anything
that goes through $.ajax.

I haven't tested the $.ajaxExpire itself, but the underlying code is tested.
I'll post something with a full test when I get a chance, but I figured I'd
put it up here in case anyone wants to try it out in the meantime. (Let me
know if it's broken!)

Nothing in $.expire is specific to jQuery - you could remove it from the
$/jQuery wrapper, call it just expire(), and do something like this if you
have a library with an ajax function called myajax:

myajax = expire( myajax, function() { alert('Hey!'); }, 15*60*1000, true );

-Mike

 From: Rey Bango
 
 A buddy of mine, Raymond Camden, posted an interesting question on his
 blog:
 
 How can you timeout a session in an Ajax-based application?
 

http://www.coldfusionjedi.com/index.cfm/2007/10/8/Ask-a-Jedi-How-can-you-tim
eout-a-session-in-an-Ajaxbased-application
 
 The gist is that if you have a dashboard-type app and you 
 need to determine if your session has timed out on the next 
 Ajax request, how would you go about doing it. He mentioned 
 creating a ping-like service that would poll the server every 
 so often. It seems that this would dramatically increase the 
 number of HTTP requests.
 
 Since session management is available in many server-side 
 languages, not just ColdFusion obviously, I think this is a 
 good topic that's applicable to most any project.
 
 Is there a better way of doing it?
 
 Rey...



[jQuery] jQuery documentation, Aptana and scriptDoc support

2007-10-08 Thread Daemach

I'm just crawling back into the programming world after a long hiatus,
and noticed a new generate HTML docs button in Aptana.  If you
follow the scriptDoc standards, it generates a pretty decent output
with one click.  Their code assist functionality pulls from these
scriptDoc blocks as well which should mean easier coding with plugins
if plugin authors start using that standard.  The one missing param in
their list is @example, so I'm hoping that engine can be extended.

More documentation here:

http://aptana.com/docs/index.php/Documenting_your_code_using_ScriptDoc

I've been digging for a while now, and I still can't find any official
documentation specs for the jQuery documentation system.  Can someone
point me to that engine?  It would be useful, I think, if there was
some official location for documentation specs, the docs engine and
other information that will improve the experience of creating really
useful documentation for jQuery plugins.



[jQuery] Re: Tell-a-friend script?

2007-10-08 Thread marlyred


Hi,

I understand what you are saying but unfortunateIy I do not know enough
about using forms, sending data to php, ajax etc to accomplish this.

I recently implemented the following on another site i was working on..
http://www.roscripts.com/AJAX_contact_form-144.html

This example however uses the mootools loibrary, but as I am using jquery
for some other stuff on my current site I was wondering if it was possible
to do the same kind of thing using jquery, and then make the necessary
alterations to turn it into a 'recommend us/tell-a-friend form.

Best Regards



Chris W. Parker wrote:
 
 
 On Monday, October 08, 2007 3:19 PM marlyred said:
 
 Hi,
 
 PHP, but my pages are static html.
 
 Marlyred
 
 You may have already received an email about this offlist but javascript
 (jQuery is javascript) cannot send emails. What it will need to do is
 submit the form's data to a server side script (in your case PHP) and
 have the server send the email through its MTA (probably sendmail,
 possibly postfix). Static HTML doesn't have anything to do with it. The
 PHP script that needs to be written doesn't necessarily need to display
 anything to the user.
 
 The flow would go like this:
 
 static page with form - form is submitted to PHP page - PHP page sends
 email and then redirects to another static page with a confirmation e.g.
 Your tell-a-friend request has been sent.
 
 
 
 HTH,
 Chris.
 
 

-- 
View this message in context: 
http://www.nabble.com/Tell-a-friend-script--tf4584690s27240.html#a13107303
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Any server status if use script tag for XSS?

2007-10-08 Thread Jacky
Hi,

I would like to call crossite script.
So I use the script tag technique (create script tag, assign src and append
to head) to do so.
But unlike xmlhttprequest, I cannot get any response status from it.
So I just wonder if there is anyway I can detect if the remote script is not
available?

I tried to use try-catch, which works on Firefox but not IE. Code:

$(document).ready(function(){
try{
var s = document.createElement(script);
s.type = text/javascript;
s.src = http://thisurldoesnotexist/dsfsdlfjk.js;;
document.appendChild(s);
}
catch(e){
alert(any error);
}
});

-- 
Best Regards,
Jacky
網絡暴民 http://jacky.seezone.net


[jQuery] Re: jQuery (Superfish) conflicting with swfobject

2007-10-08 Thread Joel Birch

Hi Wessa,

I have checked your link and the menu is actually working in both IE6
and IE7. May I suggest you attempt to reload the page in a way that
avoids the cache? Holding Alt down when clicking the refresh button
seems to ignore the cache successfully on my PC.

I notice however, that you have run into the IE issue where fonts look
jaggy due to altering the opacity (fading) on a parent element that
does not have an explicitly defined solid background colour. You will
find that you need to apply a solid orange to the submenus in IE
instead of the pretty gradient you currently have, as this mostly
fixes this issue.

Good luck.
Joel Birch.


PS. Invalid HTML. There, I said it. ;)


[jQuery] jQuery 1.2.1 and Validation Plug-in won't run in IE 7...

2007-10-08 Thread Rick Faircloth
Hi, all.

 

I'm trying to run Jorn's validation plug-in ( 1.0, beta 1 ) with

jQuery 1.2.1.

 

They work together in Firefox, but not in IE 7.  However,

I can get them to work in IE 7 if I use jQuery 1.1.1.

 

Any issues going on with jQuery 1.2.1 and Jorn's validation plug-in?

 

Rick



[jQuery] Re: Tell-a-friend script?

2007-10-08 Thread Joel Birch

On 10/9/07, marlyred [EMAIL PROTECTED] wrote:

 I recently implemented the following on another site i was working on..
 http://www.roscripts.com/AJAX_contact_form-144.html

 This example however uses the mootools loibrary, but as I am using jquery
 for some other stuff on my current site I was wondering if it was possible
 to do the same kind of thing using jquery, and then make the necessary
 alterations to turn it into a 'recommend us/tell-a-friend form.

Hi,

You should be able to get that roscripts solution working with jQuery
by just rewriting the mootools component as jQuery. Here is my simple
attempt:

 $(document).ready(function(){
$('#myForm').bind('submit',function(){
var log = $('#log_res').empty().addClass('ajax-loading');
$.ajax({
type: GET,
url: log.attr('action'),
data: $('input[type=text],textarea',this).serialize(),
success: function(msg){
log.removeClass('ajax-loading').append(msg);
}
});
return false;
});
});

I'm no ajax expert so I was unsure about how to get the form data to
send, so I just stuck with sending data from text inputs and textareas
only, which should do to get their existing demo page working. For a
more flexible script maybe you need to include the Forms plugin so
that all the form data is sent.

Anyway, this is by no means a complete solution, but if you dropped it
into their demo in place of the mootools script and it works, then you
are one step closer I suppose. Be aware that their PHP script could
probably be more secure than it currently is as i doesn't seem like
any of the data is being sanitised.

Joel Birch.


[jQuery] Re: jQuery 1.2.1 and Validation Plug-in won't run in IE 7...

2007-10-08 Thread MichaelEvangelista
Hi Rick -
I had a similar issue with jQuery 1.2 and IE... until I read down towards the 
bottom of Joern's discussion page for the plugin , and saw a link to a new 
version posted just a few weeks ago... works great now! Let me know if you 
don't find it.

-- 

--
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog : www.miuaiga.com


  Rick Faircloth [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
  Hi, all.

   

  I'm trying to run Jorn's validation plug-in ( 1.0, beta 1 ) with

  jQuery 1.2.1.

   

  They work together in Firefox, but not in IE 7.  However,

  I can get them to work in IE 7 if I use jQuery 1.1.1.

   

  Any issues going on with jQuery 1.2.1 and Jorn's validation plug-in?

   

  Rick


[jQuery] Re: Select box show/hide

2007-10-08 Thread Chris Jordan
Karl, I was thinking that the ids seemed unnecessary too, but then I thought
that maybe he'd want to show only a subset of the items rather than all or
nothing.

Chris

On 10/8/07, Karl Swedberg [EMAIL PROTECTED] wrote:

 Here is one way you could do it, based on the index of the options and
 divs:

   $(document).ready(function() {
 var $optionDivs = $('div[id^=option]').hide();
 $('select').change(function() {
   var i = $('option', this).index( $(':selected')[0]);
   $optionDivs.hide().eq(i).show();
 });
   });

 tested successfully in FF 2.0.0.7

 The IDs on those divs seem superfluous. You could do the same thing with a
 common class:
 $('div.options').hide(); // etc.
 Or you could wrap all of those divs in another div with an id of
 options:
 $('#options  div').hide() // etc.

 Hope that helps.

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



 On Oct 8, 2007, at 4:23 PM, Chris Jordan wrote:

 Also, I just noticed this code:
 $(document).ready(function() {
  // (hide the divs on initial view)
  $('#option-1').hide();
  $('#option-2').hide();
  $('#option-3').hide();
  $('#option-4').hide();
  $('#option-5').hide();
  $('#option-6').hide();
  $('#option-7').hide();

  // (need help figuring out how to trigger the show)

 });

 you could simplify that code like this:
 $(div[id^='option']).hide();

 This says, get me all the elements of type div that have the attribute
 'id' that starts with 'option'.

 Seven lines to one line! Isn't that cool!?

 Have fun!

 Chris

 On 10/8/07, Chris Jordan [EMAIL PROTECTED] wrote:
 
  bombaru,
 
  I had just helped another user with almost this same question. I'm lazy,
  so check out this short 
  threadhttp://groups.google.com/group/jquery-en/browse_thread/thread/61f29abca67a866c/075832c811ad0ee3#075832c811ad0ee3
  .
 
  He was doing things on a click, but you could do them on  the change
  event. I've not used this event in jQuery so I'm making an assumption that
  it's covered. Why wouldn't it be, right?
 
  so in the code in that thread I do something like:
 
  $(.someClass).bind(click, function(){
   // function goes here...
  });
 
  you would do something like:
 
  $(#mySelectBoxElement).bind(change, function(){
   // function goes here...
  });
 
  or I think you could do:
  $(#mySelectBoxElement).change(function(){
   // function goes here...
  });
 
  I'm not sure which is the preferable syntax. I think it's a matter of
  style. I tend to use the bind function.
 
  I hope this helps.
 
  Cheers,
  Chris
 
 
  On 10/8/07, bombaru [EMAIL PROTECTED] wrote:
  
  
   Does anyone have any examples of how I could use a select box to show/
   hide different divs on a page.  To take it a level further, I would
   also like the same behavior to work if images are clicked.
  
   A little background:  I'm tring to build a payment options page and
   have a list of payment icons (Visa, MC, AmEx, etc) as well as a select
   box that lists the options.  The page would have all the forms in
   their own DIVs with an ititial value set to hide();.  clicking on an
   image would result in showing the appropriate DIV for that option as
   well as changing the select box to alert the customer of their
   choice.  Using the select box would have the same behavior but no need
   to highlight the image.  Does this make any sense?
  
   I've been messing around with this for a while and can not seem to get
  
   anything to work.  I'd appreciate any help you might be able to offer
   me.  Here's an example of the page:
  
   h1Payment Methods/h1
   pConfused about payment types? a href=#Learn more about your
   payment options here./a/p
   form
   select
   option id=value1Option 1/option
   option id=value2Option 2/option
   option id=value3Option 3/option
   option id=value4Option 4/option
   option id=value5Option 5/option
   option id=value6Option 6/option
   option id=value7Option 7/option
 /select
   /form
   div class=option id=option-1Option 1/div
   div class=option id=option-2Option 2/div
   div class=option id=option-3Option 3/div
   div class=option id=option-4Option 4/div
   div class=option id=option-5Option 5/div
   div class=option id=option-6Option 6/div
   div class=option id=option-7Option 7/div
  
   script type=text/javascript
   $(document).ready(function() {
   // (hide the divs on initial view)
   $('#option-1').hide();
   $('#option-2').hide();
   $('#option-3').hide();
   $('#option-4').hide();
   $('#option-5').hide();
   $('#option-6').hide();
   $('#option-7').hide();
  
   // (need help figuring out how to trigger the show)
  
   });
   /script
  
   Thanks for your help.
  
  
 
 
  --
  http://cjordan.us




 --
 http://cjordan.us





-- 
http://cjordan.us


[jQuery] Re: jQuery 1.2.1 and Validation Plug-in won't run in IE 7...

2007-10-08 Thread Rick Faircloth
Hi, Michael.

 

I did find a new version ( 1.1, Jun 21, 2007 ), but it's still not working
in IE 7

with jQuery 1.2.1.  It works in FF2.

 

It still works with jQuery 1.1.1.

 

Perhaps that's not the latest version?

 

Rick

 

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of MichaelEvangelista
Sent: Tuesday, October 09, 2007 12:04 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery 1.2.1 and Validation Plug-in won't run in IE
7...

 

Hi Rick -

I had a similar issue with jQuery 1.2 and IE... until I read down towards
the bottom of Joern's discussion page for the plugin , and saw a link to a
new version posted just a few weeks ago... works great now! Let me know if
you don't find it.


-- 

--
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog : www.miuaiga.com

 

 

Rick Faircloth [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

Hi, all.

 

I'm trying to run Jorn's validation plug-in ( 1.0, beta 1 ) with

jQuery 1.2.1.

 

They work together in Firefox, but not in IE 7.  However,

I can get them to work in IE 7 if I use jQuery 1.1.1.

 

Any issues going on with jQuery 1.2.1 and Jorn's validation plug-in?

 

Rick



[jQuery] Applying a string as a function?

2007-10-08 Thread Pops

I am completing a new plugin where I have a function JSON option to
fade in instead of just show().  So the code is:

 settings.fadeIn?$box.fadeIn():$box.show();

settings.fadeIn is passed as a true or false value in the plugin
function settings parameter:

var settings = {
 ...
 fadeIn : true,
 
  };

What I prefer is to define the option as a string:

var settings = {
 ...
 show:: fadeIn,// default is .show()
 
  };

and apply it accordingly.

The only way I can think of doing it is with eval(), which I prefer
not to if there is another way:

 var how = (settings.show!=)?settings.show:show;
 eval($box.+how+());

Is this the only way?

Thanks

--
HLS



[jQuery] Re: Applying a string as a function?

2007-10-08 Thread Michael Geary

 From: Pops
  var how = (settings.show!=)?settings.show:show;
  eval($box.+how+());

foo.bar means the same thing as foo['bar'], so this code is the same as:

  var how = (settings.show!=)?settings.show:show;
  $box[how]();

Or a very clean and simple version:

  $box[ settings.show || 'show' ]();

-Mike