[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-29 Thread bingo

hi

you can do it this way
$document({
$("div#mydiv").html("No of Users: " + "");
})


On Nov 30, 12:55 am, Action <[EMAIL PROTECTED]> wrote:
> On Nov 29, 8:02 pm, Wizzud <[EMAIL PROTECTED]> wrote:
>
>
>
> > For example ... ?
>
> > On Nov 29, 9:34 pm, Action <[EMAIL PROTECTED]> wrote:
>
> > > I have a PHP array of data I want to be able to append to the html
> > > using jquery and ajax. I want to be able to add different elements of
> > > the array to different parts of the page.
>
> > > How can I go about doing this?- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Newbie needs help on selector

2007-11-29 Thread Dan M

Karl,

Thanks for taking the time to help!

Should I be able to apply the hide method from there???

$('input:not(:checkbox)').prev('label').hide('slow');

Dan

On Nov 29, 10:45 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> On Nov 29, 2007, at 8:00 PM, Dan M wrote:
>
>
>
> > All,
>
> > I don't know if this is the correct place to post this but here
> > goes...
>
> > I have form with many elements (textboxes, selects, textareas and
> > such). Each element has a label just before it. I'm trying to select
> > all of the labels in the form EXCEPT those that precede a checkbox.
>
> > Thanks in advance for any help.
>
> > Dan
>
> Hi Dan,
>
> You could start with the inputs and remove the checkboxes, and finally
> find all previous labels:
>
> $('input:not(:checkbox)').prev('label');
>
> Or you could do it with a filter function:
>
>$('label').filter(function() {
>  return !$(this).next(':checkbox').length;
>});
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com


[jQuery] Re: slideUp submenu before loading a new page (it won't wait)

2007-11-29 Thread Rob_

> Woops! My bad.
> Should be this:

"this" is finally working!  :-))

But as a result I ran into a new problem, which I'll think over first
(before possibly asking about it tomorrow).

So getting there..., thanks to You :)


[jQuery] Re: jQuery.extend not working for function as target,is it a bug?

2007-11-29 Thread Jacky Chen
Hi polyrhythmic,

what reversion number of jquery you use?
i use the newest jquery from svn.reversion number of the jquery is #3973,is
that of you used?

* $Date: 2007-11-29 07:53:54 +0800 (星期四, 29 十一月 2007) $
* $Rev: 3973 $

Regards
Jacky

2007/11/30, polyrhythmic <[EMAIL PROTECTED]>:
>
>
> Hello Jacky,
>
> I can't reproduce your error.  jQuery.extend should work for
> functions, this is how it works internally.  Perhaps there is an issue
> in your code I cannot see.  I ran the following through the Firebug
> console just now with these results:
> [  : my commands ]
>
> >>> var targetfn = function() { console.log('I am tgtfn'); };
> >>> targetfn();
> I am tgtfn
> >>> $.extend(targetfn, { childfn: function() { console.log('I am
> childfn'); } });
> function()
> >>> targetfn.childfn();
> I am childfn
> >>> alert(typeof targetfn.childfn);
> [alerted "function"]
>
> What browser are you testing in?  I know that there are issues with
> typeof not returning the proper value for functions, that's part of a
> long discussion on the jQuery-dev list:
>
> http://groups.google.com/group/jquery-dev/browse_thread/thread/89cc50c9e936feb6?hl=en
> Things are running right for me in Firefox 2.0.0.10 on XP.
>
> Charles
>
> On Nov 29, 4:15 am, Jacky <[EMAIL PROTECTED]> wrote:
> > /*
> >  * jQuery 1.2.1 - New Wave Javascript
> >  *
> >  * Copyright (c) 2007 John Resig (jquery.com)
> >  * Dual licensed under the MIT (MIT-LICENSE.txt)
> >  * and GPL (GPL-LICENSE.txt) licenses.
> >  *
> >  * $Date: 2007-11-29 07:53:54 +0800 (星期四, 29 十一月 2007) $
> >  * $Rev: 3973 $
> >  */
> >
> > the jQuery reversion is #3973,function can't extend with
> > jQuery.extend.
> >
> > function target(){
> > /**some code here*/
> >
> > }
> >
> > jQuery.extend(target,{
> > someMethod:function(){
> > /** some code here */
> > }
> >
> > });
> >
> > alert(typeof target.someMethod);// type of target.someMethod is
> > undefined
>


[jQuery] Trying to Ajax-swap two forms

2007-11-29 Thread howardk

Hi, I think I'm missing something obvious. I'm trying to save screen
real-estate and have a search-form do an ajax-swap on a submit with
the results page that it creates. The results page is also a form
(simply because it has a submit buttom at the bottom at this point),
which likewise is supposed to swap itself out on a submit and return
to the initial search form.

Something is going awry however. Pressing the first submit button just
brings the initial form back again. Maybe somebody else can see the
dumb thing I'm obviously doing here -- I can't!

The container for the initial search form is '#panel-1' and gets
loaded up with the contents of 'form-1.html'. This is then supposed to
get swapped out for '#panel-2', which gets loaded with 'form-2.html'.
At any rate, here's the jquery. I'll note that the alert() is never
triggered:

$(document).ready( function() {
$( '#panel-2' ).hide();
$( '#panel-1-1' ).load( "form-1.html", function() {
$( '#submit-button-1' ).submit( function() {
alert ( "You just pressed '#submit-button-1" );
$( 'panel-1' ).hide();
$( 'panel-2' ).load( "form-2.html", function() {
$( '#submit-button-2' ).submit( function() {

});
});
});
});
});

and here are the wrappers:


I'm the overall div#container

I'm a div#panel-1



I'm a div#panel-2



You can see the code running (or rather not running :-) at
http://www.fatdog.com/AjaxFormSwap/SwapTest.html. The two form pages
that get loaded are at .../AjaxFormSwap/form-1.html and .../
form-2.html.

Any help would be much appreciated! Thanks,
Howard




[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-29 Thread Action



On Nov 29, 8:02 pm, Wizzud <[EMAIL PROTECTED]> wrote:
> For example ... ?
>
> On Nov 29, 9:34 pm, Action <[EMAIL PROTECTED]> wrote:
>
> > I have a PHP array of data I want to be able to append to the html
> > using jquery and ajax. I want to be able to add different elements of
> > the array to different parts of the page.
>
> > How can I go about doing this?


[jQuery] Re: Masked Input Plugin 1.1.2

2007-11-29 Thread sawmac



On Nov 29, 6:32 pm, Josh Bush <[EMAIL PROTECTED]> wrote:
> I just released version 1.1.2 of my Masked Input Plugin for jQuery.

Josh, that's great. Very nice implementation with just the right
amount of information for users to quickly figure out what they need
to input. I'll definitely be trying this one out.

--dave


[jQuery] Re: slideUp submenu before loading a new page (it won't wait)

2007-11-29 Thread Karl Swedberg


Woops! My bad.

Should be this:

  $("dt a").click(function() {
var theLink = this;
  $("dd:visible").slideUp(600, function() {
   //putting this in the callback of the slideUp makes it  
wait until the slideUp finishes

   window.location = theLink.href;
  });
  return false;
  });

When I did window.location = this.href; before, "this" was the visible  
. So, we just needed to grab "this" when it still refers to the  
link.


Hope that makes sense. Sorry about the error last time.

Cheers,

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



On Nov 29, 2007, at 8:31 PM, Rob_ wrote:



I see the slideUp now, but it continues by going to a non-existing url
(can't find out which one so far)

Currently my pages are one folder deep. Could that be the cause and
would the this.href need tweaking?

www.site.com/myFolder/myPages.htm

Thanks again for your attention, Karl. This really is my last jQ
problem with this navigation... ;-)




[jQuery] Re: Newbie needs help on selector

2007-11-29 Thread Karl Swedberg





On Nov 29, 2007, at 8:00 PM, Dan M wrote:



All,

I don't know if this is the correct place to post this but here
goes...

I have form with many elements (textboxes, selects, textareas and
such). Each element has a label just before it. I'm trying to select
all of the labels in the form EXCEPT those that precede a checkbox.

Thanks in advance for any help.

Dan



Hi Dan,

You could start with the inputs and remove the checkboxes, and finally  
find all previous labels:


   $('input:not(:checkbox)').prev('label');

Or you could do it with a filter function:

  $('label').filter(function() {
return !$(this).next(':checkbox').length;
  });


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



[jQuery] Re: JQuery Form Plugin with multiple forms per page

2007-11-29 Thread Tom Duke

Hi,

This is the best I can do so far, the form is getting submitted but
the target id is still 'undefined'.Just to be clear what I am
trying to do.  I have forms in table cells as part of a CMS.  When the
form gets submitted I only want the contents of the cell updated (i.e.
the form code itself).  There can be up to 100 of these forms on a
page so I need a way of selecting the target as part of the javascript
code.

As ever any help greatly appreciated.
- Tom

//html



...





//Jquery Plugin code
$(document).ready(function() {

$('[EMAIL PROTECTED] form');

var formId = this.id;

$(this).ajaxForm({
target: formId,
url: 'siteminderAjax.tmpl',
beforeSubmit: function() {
alert(formId)
},
success: function() {
alert('Ajax call complete.')
}
});
});





On Nov 29, 4:44 pm, Tom Duke <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> New to the list and jquery. I am trying to bind the JQuery form plugin
> to multiple forms on a single page.  I can do this but I cannot figure
> out how to assign different options for each form.
>
> The form code is :-
>
> 
> ...
> 
>
> Where the rid is unique for each form.
>
> My JQuery code is :-
>
> $(document).ready(function() {
> var options = {
> target: '#td-active-[rid]',
> url: 'activeSnippet.tmpl'
> };
>$([EMAIL PROTECTED]).ajaxForm(options);
> });
>
> I cannot figure out how to set a unique target for each form where the
> [rid] in the target matches the [rid] in the form id.
>
> Any help greatly appreciated.
>
> Thanks
> - Tom


[jQuery] Re: slideUp submenu before loading a new page (it won't wait)

2007-11-29 Thread Rob_

The Referring URL on the error_404 page is the one of the page I was
on

1) very strange then that it gives error 404 ..., since it's just a
reload?

2) I need that Referring / new url to be the link of the "dt a" I
clicked.

The page has to go on to there. How do I add that?


[jQuery] Re: using jcarousel as image viewer - how to load large image onclick with loading animation

2007-11-29 Thread Brad Hile

Hi maddog

I had to change things a bit but did manage to get click events
working by using the jcarousel class assigned to each image

$(".jcarousel-item").click( function() {
// do stuff
return false;
});

Hope that helps you

Brad

On Nov 20, 11:09 pm, maddog <[EMAIL PROTECTED]> wrote:
> Did you find a solution? I would need a click-event on the jcarousel-
> images - so it's nearly the same problem...
> Thanks for any advice...
>
> Michael
>
> On 6 Okt., 06:39, aussiebob <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to use the excellentjcarouselplugin to create an image
> > viewer/slideshow for a friends site
>
> > I am a real newbie & my first post so go easy on me :)
>
> > Can someone point me in the right direction how to load an image on
> > demand with some sort of callback so a loading image can be displayed
> > and the image fade in when ready.
>
> > Currently I'm preloading all images which is so-so but definitely not
> > ideal and the fade doesn't work correctly if an image is not loaded
>
> > Is this heading in the right direction?
>
> > $(".jcarousel-item").click( function() {
> > s =$(this).children("a").attr("href");
> > a =$(this).children("a").attr("title");
>
> > // switch
> > $("#large").fadeout();
> > $("#loader").show();
>
> > //load and get some sort of return when loaded
> > // to turn off loading and fade in image
>
> > // psuedocode
> > loaded = function(){
> >   return $("#large").bind('load', function() {
> > if(s) this.src = s;
> > }).trigger('load');
>
> > }
>
> > // psuedocode
> > if(loaded) {
> > $("#large").attr({ alt: a});
> > $("#loader").hide();
> > $("#large").fadeIn("slow");
>
> > }
> > });
>
> > I'm trying to achieve:
> > a. When the user clicks on the thumbnail it gets the link href & title
> > and uses them to set the src & alt tag on the main image. (DONE)
> > b. Next image should fadein without flashing the same image (DONE not
> > very well)
> > currently using $("#large").hide().attr({ src: s, alt:
> > a}).fadeIn("slow"); // this only works if the image has totally loaded
> > otherwise the old image fades in then it switches
> > c. Preload the first x number of main images to match the initially
> > displayed thumbs with the remainder loading on demand and showing a
> > loading animation (NOT DONE)
>
> > Thanks very much for any and all help
> > Brad


[jQuery] Re: slideUp submenu before loading a new page (it won't wait)

2007-11-29 Thread Rob_

I see the slideUp now, but it continues by going to a non-existing url
(can't find out which one so far)

Currently my pages are one folder deep. Could that be the cause and
would the this.href need tweaking?

www.site.com/myFolder/myPages.htm

Thanks again for your attention, Karl. This really is my last jQ
problem with this navigation... ;-)


[jQuery] Re: quick question, selecting dynamic elements

2007-11-29 Thread Josh V

wow silly me, after all I am trying to target the ID, # would be
useful. :p ill give that a try tomorrow.

On Nov 29, 7:22 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> On Nov 29, 2007, at 6:04 PM, Josh V wrote:
>
>
>
>
>
> > on click  i am storing the ID of an the  i clicked.
>
> > i am then replacing characters in that string to get the desired
> > resulting string.
>
> > i am then trying to toggle a div whos ID is the resulting string.
>
> > heres what i got.
>
> >$("ul#specialsNav li a").click( function(){
> >var whichID = $(this).attr("id").replace(/_a_/, "");
> >var newSpecial = "div." + whichID;
> >$(newSpecial).toggle();
> >});
>
> > i have tried putting...
>
> > $("newSpecial").toggle();
>
> > but nothing
>
> Hi Josh,
>
> Is it because you're using "div." instead of "div#"? You shouldn't
> even need the "div" part at all. Try this instead:
>
> var newSpecial = "#" + whichID;
>
> Hope that helps.
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com


[jQuery] Re: Using animate within an IFrame

2007-11-29 Thread Luciano G. Panaro

I think what's going on is that you are trying to access a dom element
of the Iframe doc, and AFAIK you can't do that directly with jQuery
selectors. However I found a discussion where this is solved:
http://groups.google.com/group/jquery-en/browse_thread/thread/744ba7fdabd9066a/d060e3f85c3bdbd8

Hope it helps!

On Nov 29, 6:04 pm, t3k <[EMAIL PROTECTED]> wrote:
> I'm trying desperately to figure out a problem using animate, iframes,
> and jmedia.  It goes something like this:
> I have a piece of media (youtube video) displaying inside a definition list:
> 
> 
>
>  pluginspage="http://www.macromedia.com/go/getflashplayer"; 
> src="http://www.youtube.com/v/x2wgJdMoSDg&autoplay=1"; 
> type="application/x-shockwave-flash"/>
> 
> 
>
> I'm trying to call animate on "#myVideo" to resize it when the user
> clicks a button.  When the page is viewed normally, it works great, but
> when the page is viewed within an iframe the height doesn't seem to be
> change.  The animate code is:
>  $("#myVideo").animate({"width": "60px", "height": "45px"}, {duration:
> "slow"});
>
> To make things a little more complicated, I'm using jmedia to embed the
> video inside "#myDT".
>
> Has anyone else grappled with this issue?  It seems that there were a
> couple of questions in the past, but no solutions.
>
> Any help would be much appreciated!
>
> Thanks!
>
> Jason


[jQuery] Newbie needs help on selector

2007-11-29 Thread Dan M

All,

I don't know if this is the correct place to post this but here
goes...

I have form with many elements (textboxes, selects, textareas and
such). Each element has a label just before it. I'm trying to select
all of the labels in the form EXCEPT those that precede a checkbox.

Thanks in advance for any help.

Dan


[jQuery] Masked Input Plugin 1.1.2

2007-11-29 Thread Josh Bush

I just released version 1.1.2 of my Masked Input Plugin for jQuery.
Felix Geisendörfer helped me mash out a few things with this release.
He fixed the bug for Mac/Firefox with the backspace key and got me to
open up the caret positioning functions. Thanks Felix!

Here are the changes for this release

* Fixed a bug in Mac Firefox with backspacing.
* Fixed a bug where delete at end of mask produced an extra
placeholder character.
* Exposed the caret positioning and retrieval methods as a jQuery
function extension. You can now call $().caret() to get a caret
position and $().caret(start [,end]) to set a caret position.

Please go check out the latest version at 
http://digitalbush.com/projects/masked-input-plugin


[jQuery] jQuery Form Plugin - redirect after success

2007-11-29 Thread Web Specialist
Hi all.

I'm using jQuery Form Plugin(http://www.malsup.com/jquery/form/) to validate
a form with ajax.

This is js code:
.ajaxStart(function() {$(this).show();$('#divResposta').hide()})
.ajaxStop(function() {$(this).hide();})
$('#frm').ajaxForm({
target: '#divResposta',
dataType: 'json',
success: function(data) {
$('#confirmar').show();
$('#divResposta').html(data.saida).show();
}
});

User needs to inform a value in form field. After submit I need to check
that value in database. If exists, display related information in a
div(divResposta). User needs to validate that data and after resubmit that
form. Easy. The bottleneck is:

- after validate data I used a redirect ColdFusion(cflocation) function to
send that user to another page. Here IE and FF give me an error:

- in FF
[Exception... "Component is not available" nsresult: "0x80040111
(NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
file:///C:/Arquivos%20de%20programas/Mozilla%20Firefox/components/nsSessionStore.js
:: sss_saveState :: line 1749" data: no]
oState.session = { state: ((this._loadState == STATE_RUNNING) ?
STATE_RUNNIN...

(error in nsSessionStore.js line 1749).

My question: is it possible to redirect in the middle of an ajax call?

Cheers


[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-29 Thread Wizzud

For example ... ?

On Nov 29, 9:34 pm, Action <[EMAIL PROTECTED]> wrote:
> I have a PHP array of data I want to be able to append to the html
> using jquery and ajax. I want to be able to add different elements of
> the array to different parts of the page.
>
> How can I go about doing this?


[jQuery] Re: escaping . in div identifiers!

2007-11-29 Thread Wizzud

Example that works:

$(document).ready(function(){
  $('.clic').click(function(){
var s = '#b'+$(this).text().replace(/\./g,'\\.');
$(s).text(s);
  });
});

LX.E620Y.002



On Nov 29, 9:09 pm, jonnybravo <[EMAIL PROTECTED]> wrote:
> ps heres the important parts of the pastebin for your convenience:
>
> function addCart(code,session){
> $("#b\\[code\\]\\").html('');
> $.post("index.php?p=viewCart&add="+code,
>
> function(data){
> $('#cartbox').fadeOut( 'normal', function() {
> 
> $(this).load('includes/check_sum.box.php?jq=1').fadeIn('normal');
> $("#b\\[code\\]\\").html(' Added!
> ');
> });
>
> })
> return false;
> }
>
> 
>
>  href='index.php?p=viewCart&add=LX.E620Y.002'>
> 


[jQuery] Re: select element by id

2007-11-29 Thread Karl Swedberg



On Nov 29, 2007, at 4:44 PM, Goon wrote:



can you select elements with a partial id, something like this:

$("#my*")

instead of

$("#my_id")


Well, sort of. You'll have to do it by the ID attribute, using the  
attribute selector.


$('[id*=my_id'])

Warning: this can be a little slow if you have a really complex DOM.  
Using a tag name before the attribute selector will help. For example:


$('div[id*=my_id'])

Also, if you can limit the selector to a particular part within the  
page, that may help a bit more. Another example:


$('#wrapper div[id*=my_id'])



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



[jQuery] Re: slideUp submenu before loading a new page (it won't wait)

2007-11-29 Thread Karl Swedberg



On Nov 29, 2007, at 6:44 PM, Rob_ wrote:



Hi again  :-)


Hello again. :-)


$("dt a").click(function() {
 $("dd:visible").slideUp(600);
  });

If I want to quickly slideUp a submenu before I load a new page, there
is no visible slideUp and the page loads immediately...


You need to prevent the default action for the link that you're  
binding the click to.



How can I get it to wait and view the slideUp first, please?


Try this:

$("dt a").click(function() {
 $("dd:visible").slideUp(600, function() {
  //putting this in the callback of the slideUp makes it wait  
until the slideUp finishes

  window.location = this.href;
 });
 return false;
 });


Thanks!


You're welcome!

--Karl



[jQuery] Re: quick question, selecting dynamic elements

2007-11-29 Thread Karl Swedberg




On Nov 29, 2007, at 6:04 PM, Josh V wrote:



on click  i am storing the ID of an the  i clicked.

i am then replacing characters in that string to get the desired
resulting string.

i am then trying to toggle a div whos ID is the resulting string.

heres what i got.

$("ul#specialsNav li a").click( function(){
var whichID = $(this).attr("id").replace(/_a_/, "");
var newSpecial = "div." + whichID;
$(newSpecial).toggle();
});

i have tried putting...

$("newSpecial").toggle();

but nothing



Hi Josh,

Is it because you're using "div." instead of "div#"? You shouldn't  
even need the "div" part at all. Try this instead:


var newSpecial = "#" + whichID;

Hope that helps.

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



[jQuery] Re: jQuery.extend not working for function as target,is it a bug?

2007-11-29 Thread Wizzud

I think it may be down to the distinction between

function target(){ /*this one won't extend!*/ }

and

var target = function(){ /*this one will extend!*/ };

?

On Nov 29, 6:23 pm, polyrhythmic <[EMAIL PROTECTED]> wrote:
> Hello Jacky,
>
> I can't reproduce your error.  jQuery.extend should work for
> functions, this is how it works internally.  Perhaps there is an issue
> in your code I cannot see.  I ran the following through the Firebug
> console just now with these results:
> [  : my commands ]
>
> >>> var targetfn = function() { console.log('I am tgtfn'); };
> >>> targetfn();
> I am tgtfn
> >>> $.extend(targetfn, { childfn: function() { console.log('I am childfn'); } 
> >>> });
> function()
> >>> targetfn.childfn();
> I am childfn
> >>> alert(typeof targetfn.childfn);
>
> [alerted "function"]
>
> What browser are you testing in?  I know that there are issues with
> typeof not returning the proper value for functions, that's part of a
> long discussion on the jQuery-dev 
> list:http://groups.google.com/group/jquery-dev/browse_thread/thread/89cc50...
> Things are running right for me in Firefox 2.0.0.10 on XP.
>
> Charles
>
> On Nov 29, 4:15 am, Jacky <[EMAIL PROTECTED]> wrote:
>
> > /*
> >  * jQuery 1.2.1 - New Wave Javascript
> >  *
> >  * Copyright (c) 2007 John Resig (jquery.com)
> >  * Dual licensed under the MIT (MIT-LICENSE.txt)
> >  * and GPL (GPL-LICENSE.txt) licenses.
> >  *
> >  * $Date: 2007-11-29 07:53:54 +0800 (星期四, 29 十一月 2007) $
> >  * $Rev: 3973 $
> >  */
>
> > the jQuery reversion is #3973,function can't extend with
> > jQuery.extend.
>
> > function target(){
> > /**some code here*/
>
> > }
>
> > jQuery.extend(target,{
> > someMethod:function(){
> > /** some code here */
> > }
>
> > });
>
> > alert(typeof target.someMethod);// type of target.someMethod is
> > undefined


[jQuery] Multiple jCarousel 's on one page

2007-11-29 Thread Josh V

hi. i have a site where i need two different carousels on the same
page. each carousel has a different purpose with different items and
different controls. how can i go about getting this done? it seems to
me there would be a css conflict issue with the jquery.jcarousel.css
file. how do i specify 2 different css files for each carousel?


[jQuery] select element by id

2007-11-29 Thread Goon

can you select elements with a partial id, something like:

$("my*")

instead of

$("my_id")


[jQuery] Re: [ANNOUNCE] New plugin - HeatColor

2007-11-29 Thread Penner, Matthew

Wow, this is great!  I can't wait to use it on some of my apps.  Great
job!

Matt Penner

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Nathanson
Sent: Thursday, November 29, 2007 12:46 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] [ANNOUNCE] New plugin - HeatColor


HeatColor is a plugin that allows you to assign colors to elements,
based on 
a value derived from that element.  The derived value is compared to a
range 
of values, either determined automatically or passed in, and the element
is 
assigned a "heat" color based on its derived value's position within the

range.

It can be used in conjunction with the tablesorter plugin to bring your
data 
tables to life.

Other uses could be for a ratings display where higher values are
assigned 
"hot" colors dynamically.

Examples and downloads:
http://www.jnathanson.com/blog/client/jquery/heatcolor/heatcolor.html

Comments/suggestions welcome!

-- Josh 



[jQuery] quick question, selecting dynamic elements

2007-11-29 Thread Josh V

on click  i am storing the ID of an the  i clicked.

i am then replacing characters in that string to get the desired
resulting string.

i am then trying to toggle a div whos ID is the resulting string.

heres what i got.

$("ul#specialsNav li a").click( function(){
var whichID = $(this).attr("id").replace(/_a_/, "");
var newSpecial = "div." + whichID;
$(newSpecial).toggle();
});

i have tried putting...

$("newSpecial").toggle();

but nothing


[jQuery] slideUp submenu before loading a new page (it won't wait)

2007-11-29 Thread Rob_

Hi again  :-)

$("dt a").click(function() {
  $("dd:visible").slideUp(600);
   });

If I want to quickly slideUp a submenu before I load a new page, there
is no visible slideUp and the page loads immediately...

How can I get it to wait and view the slideUp first, please?

Thanks!


[jQuery] select element by id

2007-11-29 Thread Goon

can you select elements with a partial id, something like this:

$("#my*")

instead of

$("#my_id")


[jQuery] Validation Problem...

2007-11-29 Thread Rick Faircloth
Why would the same validation routine work well on one page
and then when applied to another site not return the validation?

The params are attached to the URL. it's not like that on the
first site where the validation is working.

Quick ideas, anyone, without first getting into all the code?

Thanks,

Rick


[jQuery] Re: Pretty Calendar Plugin

2007-11-29 Thread Karl Swedberg




On Nov 29, 2007, at 4:07 PM, Guy Fraser wrote:



Rey Bango wrote:
Mootools itself is not the best for interfaces. Mootool users,  
though,

appear to go to great length to style their apps nicely.



It's a pity there isn't more cross-pollination between jQuery and
Mootools. Both are great libraries, but I have a strong preference for
jQuery because it's conceptually perfect IMHO. It would be great if  
some
of the Mootools devs would make their work available as jQuery  
plugins.


Yeah, it's a shame that Mootools is the one library for which the core  
devs seem philosophically opposed to any such cross-pollination. I'm  
not holding my breath.


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



[jQuery] Re: [ANNOUNCE] New plugin - HeatColor

2007-11-29 Thread Josh Nathanson



That's really sweet! :D

I believe there was a plugin that could work out most-used words on a 
page and combined with this plugin it would be a superb heatmap of 
words. I can also see uses in all sorts of tag clouds as well :D


Awesome, I'm really looking forward to seeing how people use it!

I'll be posting it to the plugin wiki shortly.

-- Josh


[jQuery] Noob question: How to access a PHP variable and append it to the html?

2007-11-29 Thread Action

I have a PHP array of data I want to be able to append to the html
using jquery and ajax. I want to be able to add different elements of
the array to different parts of the page.

How can I go about doing this?


[jQuery] Re: Pretty Calendar Plugin

2007-11-29 Thread Guy Fraser

Rey Bango wrote:
> Mootools itself is not the best for interfaces. Mootool users, though, 
> appear to go to great length to style their apps nicely.


It's a pity there isn't more cross-pollination between jQuery and 
Mootools. Both are great libraries, but I have a strong preference for 
jQuery because it's conceptually perfect IMHO. It would be great if some 
of the Mootools devs would make their work available as jQuery plugins.


[jQuery] Re: escaping . in div identifiers!

2007-11-29 Thread jonnybravo

ps heres the important parts of the pastebin for your convenience:


function addCart(code,session){
$("#b\\[code\\]\\").html('');
$.post("index.php?p=viewCart&add="+code,

function(data){
$('#cartbox').fadeOut( 'normal', function() {

$(this).load('includes/check_sum.box.php?jq=1').fadeIn('normal');
$("#b\\[code\\]\\").html(' Added!
');
});
})
return false;
}








[jQuery] jQuery Cycle - scrollHorz

2007-11-29 Thread Anjing

Hi,
I am using the transition scrollHorz in the great Cycle plugin. I was
wondering if anyone knew how to make scrollHorz display a preview of
the incoming/next slide on the right side and then scroll with the
outgoing image when it comes in. This would only be present on the
right side, based off of the layout, but would work even when
scrolling to the right (the incoming slide would push the outgoing
slide to the right, but not out of view.

By default the upcoming slide is hidden until called...

Here is a link to an image of what I'm trying to accomplish:

http://balinesegamelan.org/jQuery/scrollHorz.html


Right now I just have this making the call:


$(function() {
$('#slideshow').cycle({
fx: 'scrollHorz',
prev:   '#prev',
next:   '#next',
timeout: 0 ,
after:   onAfter
});

});


Any Help is much appreciated, Thanks.


[jQuery] Re: Superfish, IE Problems

2007-11-29 Thread Beau Huber

Thanks for the suggestions, I'll give them a try!

--Beau

On Nov 28, 5:14 pm, cromeis <[EMAIL PROTECTED]> wrote:
> > Anyway, I've got the menus working the way I want in Firefox, but
> > can't get them to work quite as well in IE 6 & 7.  The two problems
> > I'm facing in IE 6/7 is that the third level menus are either too far
> > to the left or right.  Also in IE 7 the hover (darker green) extends
> > past the menus (too far to the right).
>
> Hi Beau,
>   I think it has to do with your padding on the below element.  IE
> calculates width and padding differently from other browsers, in your
> case firefox adds the padding to the overall width of this element
> where IE doesn't, resulting in different overall width and also
> effecting how far over you need to set your next level of navigation.
> You could try using an IE hack for the width ( *html .nav li li a
> {width: 180px;}) (though not the best option, I'll admit it) or maybe
> try using margin for the width instead... i wasn't able to try that so
> I'm not sure if it would work.  You also need to make sure that all of
> your left positioning is what you want, some of them are 160px and
> some are 180px...
>
> .nav li li a {
> float:none;
> font-size:12px;
> line-height:13px;
> padding:5px 10px;
> width:160px;
>
> }
>
> I hope this helps!
> - carleigh


[jQuery] Re: [ANNOUNCE] New plugin - HeatColor

2007-11-29 Thread Guy Fraser

Josh Nathanson wrote:
> Examples and downloads:
> http://www.jnathanson.com/blog/client/jquery/heatcolor/heatcolor.html
>
> Comments/suggestions welcome!

That's really sweet! :D

I believe there was a plugin that could work out most-used words on a 
page and combined with this plugin it would be a superb heatmap of 
words. I can also see uses in all sorts of tag clouds as well :D


[jQuery] Re: finding if a link exists, or what it's prepended with

2007-11-29 Thread Rob_

Thank you *s* much, Karl!  :-)
The first answer finally solved it straight away.
And I've learned from both.

It all seems so intuitive, until it's my turn... :-p


[jQuery] Using animate within an IFrame

2007-11-29 Thread t3k


I'm trying desperately to figure out a problem using animate, iframes, 
and jmedia.  It goes something like this:

I have a piece of media (youtube video) displaying inside a definition list:

   

http://www.macromedia.com/go/getflashplayer"; src="http://www.youtube.com/v/x2wgJdMoSDg&autoplay=1"; type="application/x-shockwave-flash"/>

   


I'm trying to call animate on "#myVideo" to resize it when the user 
clicks a button.  When the page is viewed normally, it works great, but 
when the page is viewed within an iframe the height doesn't seem to be 
change.  The animate code is:
$("#myVideo").animate({"width": "60px", "height": "45px"}, {duration: 
"slow"});


To make things a little more complicated, I'm using jmedia to embed the 
video inside "#myDT".


Has anyone else grappled with this issue?  It seems that there were a 
couple of questions in the past, but no solutions.


Any help would be much appreciated!

Thanks!

Jason


[jQuery] Re: [ANNOUNCE] New plugin - HeatColor

2007-11-29 Thread Andy Matthews

This is beautiful! I can see uses for this completely outside of data
presentation.

What about an interactive art map with invisible content. The user has no
clue what values are contained inside the cells, but sorting various columns
gives you a marvelous effect.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Nathanson
Sent: Thursday, November 29, 2007 2:46 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] [ANNOUNCE] New plugin - HeatColor


HeatColor is a plugin that allows you to assign colors to elements, based on
a value derived from that element.  The derived value is compared to a range
of values, either determined automatically or passed in, and the element is
assigned a "heat" color based on its derived value's position within the
range.

It can be used in conjunction with the tablesorter plugin to bring your data
tables to life.

Other uses could be for a ratings display where higher values are assigned
"hot" colors dynamically.

Examples and downloads:
http://www.jnathanson.com/blog/client/jquery/heatcolor/heatcolor.html

Comments/suggestions welcome!

-- Josh 




[jQuery] [ANNOUNCE] New plugin - HeatColor

2007-11-29 Thread Josh Nathanson


HeatColor is a plugin that allows you to assign colors to elements, based on 
a value derived from that element.  The derived value is compared to a range 
of values, either determined automatically or passed in, and the element is 
assigned a "heat" color based on its derived value's position within the 
range.


It can be used in conjunction with the tablesorter plugin to bring your data 
tables to life.


Other uses could be for a ratings display where higher values are assigned 
"hot" colors dynamically.


Examples and downloads:
http://www.jnathanson.com/blog/client/jquery/heatcolor/heatcolor.html

Comments/suggestions welcome!

-- Josh 



[jQuery] Re: DateJS: Robust Date manipulation library

2007-11-29 Thread Jörn Zaefferer


Nicolas Hoizey schrieb:

This came through my feed reader this morning, and I thought it looked
like the kind of thing jQuerians might enjoy:
http://www.datejs.com/
  


I really don't like the weird syntax they use.

This Date.today().next().thursday(); is not real chaining IMHO. Even
more (3).days().ago();

Chaining suppose you can remove last call and still get something.

What would (3).days(); mean?

jQuery like syntax would probably be more Date.today().next('thursday');
  

Good point. You should post that to their mailing list.

Jörn


[jQuery] escaping . in div identifiers!

2007-11-29 Thread jonnybravo

Hi guys, i'm having trouble escaping the . in my div identifers
(because i use unique ID's and cannot alter the . so have to make it
work!)

I've read: 
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F

and here is my code ( php & javascript )

http://pastebin.zentrack.net/119821

problem is the example html code doesn't work in the sense that,
the .html() does not change at all

any suggestions?


[jQuery] Re: Browser Exit Event

2007-11-29 Thread [EMAIL PROTECTED]

Thanks for all the replies! I had tried the unload event, but I had
the same doubts Klaus had about the reliability of that approach,
which is why I asked here to get some insight on the problems with
doing something like this. Of course, persisting the icons when they
are moved would be easier, but in this case the application using this
code will have several million hits per day, so a user scratching his
nose too hard has the potential to cripple the server farm-- the more
efficient solution is to persist only when necessary: page change,
logout, or browser exit. I just want to know whether the unload event
can handle that kind of pressure reliably, before I have to find out
the hard way that it doesn't.

So, I guess the next logical question is to Klaus: what are the
specific reasons for your doubts? Maybe we can work through those
systematically and come up with a solution that people can use in
general in similar circumstances!

Thanks again,
Pete

On Nov 16, 6:32 pm, Wizzud <[EMAIL PROTECTED]> wrote:
> I hesitate to suggest that a simpler approach may be to store the
> positions as they change, rather than wait until thebrowsersuddenly
> disappears, shuts down, moves to another page, or whatever?
>
> On Nov 15, 11:50 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > On Nov 15, 9:35 pm, Bil Corry <[EMAIL PROTECTED]> wrote:
>
> > > [EMAIL PROTECTED] wrote on 11/15/2007 8:12 AM:
>
> > > > I'd just like to know what the jQuery best practice for catching the
> > > >browserexiteventis?
>
> > > Probably just bind your code to the onunloadevent.  From the jQuery docs:
>
> > > $(window).unload( function () { alert("Bye now!"); } );
>
> > > More info here:
>
> > > 
>
> > > - Bil
>
> > I doubt persisting data via an Ajax call on the unloadeventwill work
> > crossbrowserif at all... but I'm not sure about this.
>
> > --Klaus


[jQuery] Re: IIS permission problem Re: Can $(document).ready() be put into a separate JS file?

2007-11-29 Thread Stephen

Thanks to everyone who replied to this thread in helping me debug the
problem.

--Stephen

On Nov 28, 4:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> hehe, permissions would have been my second choice.
>
> My coding mantra: If in doubt, check permissions!
>
> On Nov 28, 4:10 am, Stephen <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> > It looks like I had a very peculiar IIS permission problem just for
> > jquery.js.  Very weird.  I fixed the permissions on that file and the
> > file could be accessed again.
>
> > --Stephen
>
> > On Nov 27, 12:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > My gut feeling is that this is a caching issue on the browser that is
> > > failing.
>
> > > Try clearing the cache.
>
> > > On Nov 27, 3:36 pm, Stephen <[EMAIL PROTECTED]> wrote:
>
> > > > Ok, I have to examine the specifics of my computer set up.  I tried
> > > > the following code on two different machines with similar setups
> > > > (Windows XP, IE6, Firefox 2.0.0.9 vs. 2.0.0.6, jquery 1.2.1 unpacked).
>
> > > > --START  Test HTML file-
> > > > 
>
> > > > 
> > > > 
> > > > Test
> > > > 
> > > > 
> > > > 
>
> > > > 
>
> > > > 
> > > > 
> > > > -END
>
> > > > --START test.js ---
> > > > $(document).ready( function() {});
>
> > > > --- END --
>
> > > > On the first machine, it gave me the "$ is not defined" message.  On
> > > > the second machine, it works.  Based on Suni's remarks, I will look at
> > > > the first machine more closely.
>
> > > > I appreciate everyone throwing out ideas for me to examine.
>
> > > > --Stephen
>
> > > > On Nov 27, 3:04 am, Suni <[EMAIL PROTECTED]> wrote:
>
> > > > > There has to be some other problem. Are you absolutely sure that
> > > > > jquery.js gets loaded? Any chance the link pointing to jquery.js is
> > > > > wrong?
>
> > > > > I always use $(document).ready in other files and there haven't been
> > > > > any problems with it.
>
> > > > > Please post full HTML and JS of a simplified example if the problem
> > > > > persists.
>
> > > > > --
> > > > > Suni


[jQuery] Re: Explaining this or .this or .this()

2007-11-29 Thread Priest, James (NIH/NIEHS) [C]

I think you could do something like:

$("div").each(function() {
$(this).css('color', 'red');
}); 

Basically all this is doing is looping over each DIV on your page and at
each DIV (this) it's changing the color of that div.  

Here is another one I did for a recent project - I have a list of div's
each with a 'container' class:

Item 1
Item 2
Item 3
Item 4
Item 5

I wanted to highlight the background of each div as the user rolled
their mouse over them - this was basically a hack for IE6:

$('div.container').hover(function() {
$(this).addClass('pretty-hover');
}, function() {
$(this).removeClass('pretty-hover');
});

Again - this is just saying - when you hover your mouse over THIS
div.container - add a class.  When you move your mouse off of it -
remove the class.

I think if you tinker around with stuff like this a bit - it start to
click.

Jim

> -Original Message-
> From: FrankTudor [mailto:[EMAIL PROTECTED] 

> I can't 'write' or 'create' in the environment i working.  Could you
> maybe work the example so that it outputs to the screen.  I can make a
> sample file with 'div' tags point to my jquery.js file.  I have done
> jquery scripts without the 'this' part and I would attempt to change
> it but 'this' is a stumper for me.
> 


[jQuery] Re: Explaining this or .this or .this()

2007-11-29 Thread FrankTudor

I fell like I could get this concept.  I'm close.  I think I need to
create something, but i don't no 'this' so I don't know how to use it.

Does that example work that you posted...where does it log?  to the
current directory?

I can't 'write' or 'create' in the environment i working.  Could you
maybe work the example so that it outputs to the screen.  I can make a
sample file with 'div' tags point to my jquery.js file.  I have done
jquery scripts without the 'this' part and I would attempt to change
it but 'this' is a stumper for me.

Frank

On Nov 29, 1:42 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> > So then it pulls part of a function?
>
> > Is 'this' in the example you made pulls $("div") or $("div").each
>
> It doesn't pull part of a function...it pulls the object within which the
> function is executing.
>
> In my example, the function is "each", and the object within which it is
> executing is the jQuery object (which is an array of div elements) returned
> by $("div").  So, "this" would refer to the current div element which is
> being iterated.
>
> It's not easy to wrap your mind around it, it definitely takes some time and
> experimentation to see how it works.
>
> -- Josh
>
> - Original Message -
> From: "FrankTudor" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Thursday, November 29, 2007 11:32 AM
> Subject: [jQuery] Re: Explaining this or .this or .this()
>
> > Frank
>
> > On Nov 29, 12:38 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> >> I'll give it a shot...and please gurus correct any mistakes here..."this"
> >> refers to the object context within which it is referenced at runtime.
>
> >> So, if you have a bunch of divs:
>
> >> $("div").each(function() {
> >> console.log(this);
>
> >> });
>
> >> You will see in the console each of the divs as it loops over them.
>
> >> Every javascript function runs within the context of some object -- at
> >> the
> >> highest level this is the window (global) object.
>
> >> To understand context and scoping better, I highly recommend checking out
> >> John Resig's book "Advanced JavaScript Techniques," it cleared up a lot
> >> of
> >> confusion for me.
>
> >> -- Josh
>
> >> - Original Message -
> >> From: "FrankTudor" <[EMAIL PROTECTED]>
> >> To: "jQuery (English)" 
> >> Sent: Thursday, November 29, 2007 8:14 AM
> >> Subject: [jQuery] Explaining this or .this or .this()
>
> >> > There is a concept I am struggling with and I am not sure how to
> >> > approach it.  I am trying to understand:
>
> >> > .this
>
> >> > I don't know if an explanation or an example would be best. But I want
> >> > to understand it.
>
> >> > I have tried to read an explanation and it doesn't make sense.
>
> >> > Can someone help me?
>
> >> > Frank


[jQuery] Re: Explaining this or .this or .this()

2007-11-29 Thread Josh Nathanson



So then it pulls part of a function?

Is 'this' in the example you made pulls $("div") or $("div").each


It doesn't pull part of a function...it pulls the object within which the 
function is executing.


In my example, the function is "each", and the object within which it is 
executing is the jQuery object (which is an array of div elements) returned 
by $("div").  So, "this" would refer to the current div element which is 
being iterated.


It's not easy to wrap your mind around it, it definitely takes some time and 
experimentation to see how it works.


-- Josh

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

To: "jQuery (English)" 
Sent: Thursday, November 29, 2007 11:32 AM
Subject: [jQuery] Re: Explaining this or .this or .this()





Frank

On Nov 29, 12:38 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:

I'll give it a shot...and please gurus correct any mistakes here..."this"
refers to the object context within which it is referenced at runtime.

So, if you have a bunch of divs:

$("div").each(function() {
console.log(this);

});

You will see in the console each of the divs as it loops over them.

Every javascript function runs within the context of some object -- at 
the

highest level this is the window (global) object.

To understand context and scoping better, I highly recommend checking out
John Resig's book "Advanced JavaScript Techniques," it cleared up a lot 
of

confusion for me.

-- Josh

- Original Message -
From: "FrankTudor" <[EMAIL PROTECTED]>
To: "jQuery (English)" 
Sent: Thursday, November 29, 2007 8:14 AM
Subject: [jQuery] Explaining this or .this or .this()

> There is a concept I am struggling with and I am not sure how to
> approach it.  I am trying to understand:

> .this

> I don't know if an explanation or an example would be best. But I want
> to understand it.

> I have tried to read an explanation and it doesn't make sense.

> Can someone help me?

> Frank 




[jQuery] Re: Explaining this or .this or .this()

2007-11-29 Thread FrankTudor

So then it pulls part of a function?

Is 'this' in the example you made pulls $("div") or $("div").each

Frank

On Nov 29, 12:38 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> I'll give it a shot...and please gurus correct any mistakes here..."this"
> refers to the object context within which it is referenced at runtime.
>
> So, if you have a bunch of divs:
>
> $("div").each(function() {
> console.log(this);
>
> });
>
> You will see in the console each of the divs as it loops over them.
>
> Every javascript function runs within the context of some object -- at the
> highest level this is the window (global) object.
>
> To understand context and scoping better, I highly recommend checking out
> John Resig's book "Advanced JavaScript Techniques," it cleared up a lot of
> confusion for me.
>
> -- Josh
>
> - Original Message -
> From: "FrankTudor" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Thursday, November 29, 2007 8:14 AM
> Subject: [jQuery] Explaining this or .this or .this()
>
> > There is a concept I am struggling with and I am not sure how to
> > approach it.  I am trying to understand:
>
> > .this
>
> > I don't know if an explanation or an example would be best. But I want
> > to understand it.
>
> > I have tried to read an explanation and it doesn't make sense.
>
> > Can someone help me?
>
> > Frank


[jQuery] Re: Explaining this or .this or .this()

2007-11-29 Thread Josh Nathanson


I'll give it a shot...and please gurus correct any mistakes here..."this" 
refers to the object context within which it is referenced at runtime.


So, if you have a bunch of divs:

$("div").each(function() {
   console.log(this);
});

You will see in the console each of the divs as it loops over them.

Every javascript function runs within the context of some object -- at the 
highest level this is the window (global) object.


To understand context and scoping better, I highly recommend checking out 
John Resig's book "Advanced JavaScript Techniques," it cleared up a lot of 
confusion for me.


-- Josh




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

To: "jQuery (English)" 
Sent: Thursday, November 29, 2007 8:14 AM
Subject: [jQuery] Explaining this or .this or .this()




There is a concept I am struggling with and I am not sure how to
approach it.  I am trying to understand:

.this

I don't know if an explanation or an example would be best. But I want
to understand it.

I have tried to read an explanation and it doesn't make sense.

Can someone help me?

Frank 




[jQuery] Re: jQuery.extend not working for function as target,is it a bug?

2007-11-29 Thread polyrhythmic

Hello Jacky,

I can't reproduce your error.  jQuery.extend should work for
functions, this is how it works internally.  Perhaps there is an issue
in your code I cannot see.  I ran the following through the Firebug
console just now with these results:
[  : my commands ]

>>> var targetfn = function() { console.log('I am tgtfn'); };
>>> targetfn();
I am tgtfn
>>> $.extend(targetfn, { childfn: function() { console.log('I am childfn'); } 
>>> });
function()
>>> targetfn.childfn();
I am childfn
>>> alert(typeof targetfn.childfn);
[alerted "function"]

What browser are you testing in?  I know that there are issues with
typeof not returning the proper value for functions, that's part of a
long discussion on the jQuery-dev list:
http://groups.google.com/group/jquery-dev/browse_thread/thread/89cc50c9e936feb6?hl=en
Things are running right for me in Firefox 2.0.0.10 on XP.

Charles

On Nov 29, 4:15 am, Jacky <[EMAIL PROTECTED]> wrote:
> /*
>  * jQuery 1.2.1 - New Wave Javascript
>  *
>  * Copyright (c) 2007 John Resig (jquery.com)
>  * Dual licensed under the MIT (MIT-LICENSE.txt)
>  * and GPL (GPL-LICENSE.txt) licenses.
>  *
>  * $Date: 2007-11-29 07:53:54 +0800 (星期四, 29 十一月 2007) $
>  * $Rev: 3973 $
>  */
>
> the jQuery reversion is #3973,function can't extend with
> jQuery.extend.
>
> function target(){
> /**some code here*/
>
> }
>
> jQuery.extend(target,{
> someMethod:function(){
> /** some code here */
> }
>
> });
>
> alert(typeof target.someMethod);// type of target.someMethod is
> undefined


[jQuery] Re: Pretty Calendar Plugin

2007-11-29 Thread 1Marc

Weepy, those datepicker skins are very nice!  I've seen great skins
for jQuery UI Datepicker as well, but unfortunately they were
proprietary and could not be released to the public.

Pretty datepicker skins are certainly on my task list for UI
Datepicker, and until then it is easy to make skins so if you are a
designer the process is fairly simple.

Marc Grabanski
http://marcgrabanski.com

On Nov 29, 11:16 am, Jean <[EMAIL PROTECTED]> wrote:
> And they are very good in this uhn =p
> Let jqueryfy them \o/
>
> On Nov 29, 2007 2:59 PM, Rey Bango <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Mootools itself is not the best for interfaces. Mootool users, though,
> > appear to go to great length to style their apps nicely.
>
> > Rey
>
> > Jean wrote:
> > > Mootools always the best for interface =/
>
> > > On Nov 29, 2007 2:37 PM, weepy <[EMAIL PROTECTED]> wrote:
> > >>http://www.electricprism.com/aeron/calendar/
>
> > >> Unfortunately it's in MooTools - would it be difficult to port ?
>
> --
>
> []´s Jeanwww.suissa.info
>
>Ethereal Agencywww.etherealagency.com


[jQuery] Re: Pretty Calendar Plugin

2007-11-29 Thread Jean

And they are very good in this uhn =p
Let jqueryfy them \o/

On Nov 29, 2007 2:59 PM, Rey Bango <[EMAIL PROTECTED]> wrote:
>
> Mootools itself is not the best for interfaces. Mootool users, though,
> appear to go to great length to style their apps nicely.
>
> Rey
>
>
> Jean wrote:
> > Mootools always the best for interface =/
> >
> > On Nov 29, 2007 2:37 PM, weepy <[EMAIL PROTECTED]> wrote:
> >> http://www.electricprism.com/aeron/calendar/
> >>
> >> Unfortunately it's in MooTools - would it be difficult to port ?
> >>
> >>
> >
> >
> >
>



-- 

[]´s Jean
www.suissa.info

   Ethereal Agency
www.etherealagency.com


[jQuery] Re: CSS JS Library - is there a jQuery equivalent?

2007-11-29 Thread sawmac



On Nov 29, 5:16 am, Guy Fraser <[EMAIL PROTECTED]> wrote:
> Another sweet thing found on 
> Ajaxian:http://feeds.feedburner.com/~r/ajaxian/~3/192351009/new-css-javascrip...
>
> There was recently a thread regarding a jQuery plugin which dealt with
> CSS but I can't find it now.

Maybe you're thinking about the Rule plugin:
http://jquery.com/plugins/project/Rule

--dave


[jQuery] JQuery Form Plugin with multiple forms per page

2007-11-29 Thread Tom Duke

Hi all,

New to the list and jquery. I am trying to bind the JQuery form plugin
to multiple forms on a single page.  I can do this but I cannot figure
out how to assign different options for each form.

The form code is :-


...


Where the rid is unique for each form.

My JQuery code is :-

$(document).ready(function() {
var options = {
target: '#td-active-[rid]',
url: 'activeSnippet.tmpl'
};
   $([EMAIL PROTECTED]).ajaxForm(options);
});

I cannot figure out how to set a unique target for each form where the
[rid] in the target matches the [rid] in the form id.

Any help greatly appreciated.

Thanks
- Tom



[jQuery] Cluetip insertionafter

2007-11-29 Thread Merlin

Hi there,

I am having trouble with cluetip plugin regarding the
insertionElement.

Basicly my code looks like this:











Problem is, that the cluetipp always shows up on the same spot, not
next to the link I click.
I believe that this is because of the insertionelement:
 $.cluetip.setup({insertionType: 'insertAfter', insertionElement:
'div:first'});

If I comment that out, the box will not show up at all. Unless I move
the invoking element out of the other div containers.

Any ideas?

Thank you for your help,

Merlin


[jQuery] Re: Pretty Calendar Plugin

2007-11-29 Thread Rey Bango


Mootools itself is not the best for interfaces. Mootool users, though, 
appear to go to great length to style their apps nicely.


Rey

Jean wrote:

Mootools always the best for interface =/

On Nov 29, 2007 2:37 PM, weepy <[EMAIL PROTECTED]> wrote:

http://www.electricprism.com/aeron/calendar/

Unfortunately it's in MooTools - would it be difficult to port ?








[jQuery] Re: Pretty Calendar Plugin

2007-11-29 Thread Jean

Mootools always the best for interface =/

On Nov 29, 2007 2:37 PM, weepy <[EMAIL PROTECTED]> wrote:
>
> http://www.electricprism.com/aeron/calendar/
>
> Unfortunately it's in MooTools - would it be difficult to port ?
>
>



-- 

[]´s Jean
www.suissa.info

   Ethereal Agency
www.etherealagency.com


[jQuery] Re: [SITE SUBMISSION] Genfavicon.com

2007-11-29 Thread Andy Matthews

VERY nice! 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rey Bango
Sent: Thursday, November 29, 2007 8:17 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] [SITE SUBMISSION] Genfavicon.com


You can read about here: 
http://ajaxian.com/archives/genfavicon-a-favicon-generator

and see it in action here:

http://www.genfavicon.com/

It takes any pic and generates a favicon for it.

Rey




[jQuery] Pretty Calendar Plugin

2007-11-29 Thread weepy

http://www.electricprism.com/aeron/calendar/

Unfortunately it's in MooTools - would it be difficult to port ?



[jQuery] Re: SITE: Genfavicon

2007-11-29 Thread Rey Bango


Beat ya to it Guy! :)

LOL! Thanks for posting.

Rey...

Guy Fraser wrote:
Nothing to do with me but spotted this via Ajaxian - it uses jQuery for 
it's DOM and Ajax work:


http://www.genfavicon.com/

Original Ajaxian article:

http://feeds.feedburner.com/~r/ajaxian/~3/192329297/genfavicon-a-favicon-generator



[jQuery] Explaining this or .this or .this()

2007-11-29 Thread FrankTudor

There is a concept I am struggling with and I am not sure how to
approach it.  I am trying to understand:

.this

I don't know if an explanation or an example would be best. But I want
to understand it.

I have tried to read an explanation and it doesn't make sense.

Can someone help me?

Frank


[jQuery] Re: Question regarding JQuery tabs UI

2007-11-29 Thread cjiang

Thank you for the message. I tried your suggestion and it didn't work.
I am thinking that the reason might be because of the way of Jquery to
evaluate the included Javascript in the repsonse page. When I am using
livequery plugin like

 $('#categories').livequery(function(){$(this).tabs(2,
{remote:true}))

in the main page (get rid of the include javascript in the response
page), the initilization tab gets loaded once in both Firefox and IE.
But the problem with this solution is that the livequery doesn't
perform well in the sense that the tabs will appear as list for some
time before the tabs really get tabified.

Thanks,
Changsu

On Nov 29, 5:46 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> On 29 Nov., 05:54, cjiang <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
>
> > I am working on an application in which I use JQuery Tabs plugin. The
> > basic layout of the page is that there is a tree structure on the left
> > side of the page. When the user clicks on any node of the tree,  it
> > fires an Ajax call and the server returns a fragment of html which
> > includes tabs. The problem I encountered is that in IE, when the tabs
> > get loaded, the initialized tab will be loaded once, while in Firefox,
> > when the tabs loaded, the initialized tab gets loaded twice ( 2 Ajax
> > calls to the server). Does anyone know what the problem is?
>
> > The tabs returned by clicking on the tree node is as follows:
>
> > 
> >
> > 
> > 
> >   Tab1
> >
> >  
> >  
> >
> >   Tab2
> >
> >  
> >  
> > 
> >   Tab3
> >
> >  
> >  
> > 
> >   Tab4
> >
> >  
> >   
> > 
> > 
> >(function(){
> > $('#categories').tabs(2, {remote:true}) ;
> >})();
> > 
>
> > The problem is in Firefox, when this page returned from the Server
> > through Ajax call, the Tab 2 gets loaded twice.
>
> > Thank you for any suggestions.
>
> > Changsu Jiang
>
> Is this Tabs 2 you're using. If yes, could you give UI Tabs (Tabs 3) a
> try?
>
> --Klaus- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Tabs 3 Update tab content

2007-11-29 Thread Richard W

Ah, I see your example shows how i can bind the tabs event to the link
in the ajaxed content. Would this work?
I'm going to test this evening and let you know how i come along..

On Nov 29, 3:44 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> On 29 Nov., 10:39, Richard W <[EMAIL PROTECTED]> wrote:
>
> > Awesome, that is exactly what i'm looking for. Thank you Klaus, and
> > thank you for an excellent plugin!
>
> I'm confused. So I can disregard your former post? In any case, here's
> how I would do it (untested):
>
> var $tabs = $(...).tabs({
> load: function(tab, panel) { // callback passes in the loaded tab/
> panel
> $('a.reload').click(function() {
> $tabs.tabsLoad( $('a', $tabs).index(tab) + 1 );
> return false;
> });
> }
>
> });
>
> I assumed in this example that the links that should reload a tab
> panel belong to the class "reload".
>
> --Klaus


[jQuery] Re: Tabs 3 Update tab content

2007-11-29 Thread Richard W

Sorry, I posted my shoddy code after you had replied to my post. I
don't get these delayed messages..

In any case, the tabLoad method works perfectly for me, thank you for
your help!


On Nov 29, 3:44 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> On 29 Nov., 10:39, Richard W <[EMAIL PROTECTED]> wrote:
>
> > Awesome, that is exactly what i'm looking for. Thank you Klaus, and
> > thank you for an excellent plugin!
>
> I'm confused. So I can disregard your former post? In any case, here's
> how I would do it (untested):
>
> var $tabs = $(...).tabs({
> load: function(tab, panel) { // callback passes in the loaded tab/
> panel
> $('a.reload').click(function() {
> $tabs.tabsLoad( $('a', $tabs).index(tab) + 1 );
> return false;
> });
> }
>
> });
>
> I assumed in this example that the links that should reload a tab
> panel belong to the class "reload".
>
> --Klaus


[jQuery] Form target out of jquery plugin cluetip

2007-11-29 Thread Merlin

Hello everybody,

I am relativly new to Jquery so forgive me if this is a bit basic.

I am opening a form with cluetip that where user can submit. Now if I
hit the submit button
the parent window gets affected, not the iframe. I believe from forum
readings that I have to add a target
into that form:


But what is the target name? I can not find it anywhere. Can somebody
please help?

Thank you for any hint.

Merlin


[jQuery] Problem with classes

2007-11-29 Thread Merlin

Hi everybody,

it seems that I am doing something wrong concerning CSS classes with
JQuery.

I am using the plugin cluetip to open a new iframe tip. Now that works
perfectly, just it does not if I have the invoking 
.. come code

test

Example not working:

.. come code
test


That is really strange. Can somebody please shed some light on it?

Thank you in advance,

Merlin


[jQuery] SITE: Genfavicon

2007-11-29 Thread Guy Fraser
Nothing to do with me but spotted this via Ajaxian - it uses jQuery for 
it's DOM and Ajax work:

http://www.genfavicon.com/

Original Ajaxian article:

http://feeds.feedburner.com/~r/ajaxian/~3/192329297/genfavicon-a-favicon-generator


[jQuery] CSS JS Library - is there a jQuery equivalent?

2007-11-29 Thread Guy Fraser
Another sweet thing found on Ajaxian: 
http://feeds.feedburner.com/~r/ajaxian/~3/192351009/new-css-javascript-library

There was recently a thread regarding a jQuery plugin which dealt with 
CSS but I can't find it now. Anyway, would it be possible to get 
something like that library in to jQuery as a plugin? I don't want to 
add Mootools to my UI :o

Guy


[jQuery] Re: return true/false

2007-11-29 Thread KidsKilla .grin! wuz here
> "return true" part doesn't work
on LI element? and what you expected?

and try this

  flag =  !($(this).children("ul").length);
  $(this).css("background-color",(flag ?"red" : "black");
  return flag;

instead of

  if ( $(this).children("ul").length ) {
  $(this).css("background-color","black");
  return false;
  } else {
  $(this).css("background-color","red");
  return true;
  }

2007/11/29, bytte <[EMAIL PROTECTED]>:
>
> I have the following jquery code
>
> $('.menu li').click(function() {
> $(this).children("ul").slideDown("fast");
> $(this).siblings("li").children("ul").slideUp("fast");
> if ( $(this).children("ul").length ) {
> $(this).css("background-color","black");
> return false;
> } else {
> $(this).css("background-color","red");
> return true;
> }
> });
>
> Everything works as expected. However, the "return true" part doesn't
> work. Is this wrong syntax?
>


-- 
Максим Игоревич Гришаев,
AstroStar.ru


[jQuery] jQuery.extend not working for function as target,is it a bug?

2007-11-29 Thread Jacky

/*
 * jQuery 1.2.1 - New Wave Javascript
 *
 * Copyright (c) 2007 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2007-11-29 07:53:54 +0800 (星期四, 29 十一月 2007) $
 * $Rev: 3973 $
 */

the jQuery reversion is #3973,function can't extend with
jQuery.extend.

function target(){
/**some code here*/
}

jQuery.extend(target,{
someMethod:function(){
/** some code here */
}
});

alert(typeof target.someMethod);// type of target.someMethod is
undefined



[jQuery] Re: Jquery call strips away "

2007-11-29 Thread Jean

For that i use
 $.ajax({
   type: "GET",
   url: "view/agenda/agenda.js",
   dataType: "script"
 });
inside my $(document).ready
On Nov 26, 2007 7:26 PM, Ramon Quiusky <[EMAIL PROTECTED]> wrote:
>
> Yes there is...I'm using the linked select jquery plugin that returns 
> javascript/jquery code but it gets stripped away! Thanks!
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of John 
> Resig
> Sent: Monday, November 26, 2007 10:57 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Jquery call strips away "

[jQuery] Re: Only number

2007-11-29 Thread Gonzo

You can use the validation plugin (http://jquery.com/plugins/project/
validate).  There is a number validation already (actually, there's
number, digits only, and range), but I believe you'll need to create
your own validation for only alpha characters.  You can easily add
your own validation rules to the validation plugin.

You could also use the web forms plugin (http://jquery.com/plugins/
project/webforms), which mimics the HTML5 validation system.

The web forms plugin is useful if you want to use what will become the
HTML standard.  If you want more flexibility and extensibility, you
should use the validation plugin (which will also support HTML5 style
validation soon).


On Nov 28, 12:11 pm, "Lourenço" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> i'm working in a automatic validation for forms. Ok, but the problem
> is how can i allow only numbers in a input?
> or, numbers and "."? or only alpha caracters, you know?
>
> i need allow and deny what i want!
> i found a plugin, called jQuery AlphaNumeric, but it doesn't allow
> "delete", ctrl + v or arrows.
>
> Please, help me!
>
> sorry my english!
>
> thanks!
>
> Lourenço


[jQuery] [SITE SUBMISSION] Genfavicon.com

2007-11-29 Thread Rey Bango


You can read about here: 
http://ajaxian.com/archives/genfavicon-a-favicon-generator


and see it in action here:

http://www.genfavicon.com/

It takes any pic and generates a favicon for it.

Rey


[jQuery] Re: Scroll effect

2007-11-29 Thread Flesler

This won't be enough by itself, but might save you some time
http://jquery.com/plugins/project/ScrollTo

Ariel Flesler

On 29 nov, 07:59, GianCarlo Mingati <[EMAIL PROTECTED]>
wrote:
> no.
> this is not that easy, even with jquery
> ;-P
> GC
>
> On Nov 28, 4:59 pm, Gerson Goulart <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hey there,
>
> > Someone know how to do this mouseover scroll efect (in playlist) using
> > jQuery:
>
> >http://www.flashloaded.com/flashcomponents/flvplayerpro/example1.html
>
> > Thanks!
> > Gerson.- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -


[jQuery] Re: finding if a link exists, or what it's prepended with

2007-11-29 Thread Karl Swedberg


On Nov 28, 2007, at 11:56 PM, Rob_ wrote:



Hi all :-)


Hi Rob. :-)


jQ newbie here who's finding it much less intuitive than I anticipated
to figure things out...
Wish the examples were a bit more diverse, because I'm having to try
20 variations of every little thing before it works.

Anyway... At the moment, I have just one thing I still need to find.


I'll try to help.


Let's say:

var page = location.pathname.substring(1)  //  current page, e.g.
"home.htm"

I have a navigation menu with submenus. The 'page' link will be in
either a  tag or a  tag.


Category-1
 

 Item 1
 Item 2

 
[etc.]


I now need to know either one of these...

1) how do I say...

if ( " 

To check for its presence, you can do this:
if ( $('li.current a[href=' + page + ']').length ) {
  // do something
}

To do something to it, you can just add an event handler or effect or  
whatever after the selector. For example:


$('li.current a[href=' + page + ']').addClass('ohmy');


or...

2) if ( " )  // [ instead of
prepended by  ]


I'll skip this one, since #1 is easier and more intuitive.


or... (less optimal)

3) if I can count how many times  class="current"  appears on the
page?


$('.current').length: // number of times anything with class="current"  
appears.
$('a.current').length; // number of times a link with class="current"  
appears.



Thanks in advance!


You're welcome after the fact. ;-)

Cheers,

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



[jQuery] Re: Question regarding JQuery tabs UI

2007-11-29 Thread Klaus Hartl

On 29 Nov., 05:54, cjiang <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am working on an application in which I use JQuery Tabs plugin. The
> basic layout of the page is that there is a tree structure on the left
> side of the page. When the user clicks on any node of the tree,  it
> fires an Ajax call and the server returns a fragment of html which
> includes tabs. The problem I encountered is that in IE, when the tabs
> get loaded, the initialized tab will be loaded once, while in Firefox,
> when the tabs loaded, the initialized tab gets loaded twice ( 2 Ajax
> calls to the server). Does anyone know what the problem is?
>
> The tabs returned by clicking on the tree node is as follows:
>
> 
>
> 
> 
>   Tab1
>
>  
>  
>
>   Tab2
>
>  
>  
> 
>   Tab3
>
>  
>  
> 
>   Tab4
>
>  
>   
> 
> 
>(function(){
> $('#categories').tabs(2, {remote:true}) ;
>})();
> 
>
> The problem is in Firefox, when this page returned from the Server
> through Ajax call, the Tab 2 gets loaded twice.
>
> Thank you for any suggestions.
>
> Changsu Jiang

Is this Tabs 2 you're using. If yes, could you give UI Tabs (Tabs 3) a
try?


--Klaus


[jQuery] Re: Tabs 3 Update tab content

2007-11-29 Thread Klaus Hartl

On 29 Nov., 10:39, Richard W <[EMAIL PROTECTED]> wrote:
> Awesome, that is exactly what i'm looking for. Thank you Klaus, and
> thank you for an excellent plugin!

I'm confused. So I can disregard your former post? In any case, here's
how I would do it (untested):

var $tabs = $(...).tabs({
load: function(tab, panel) { // callback passes in the loaded tab/
panel
$('a.reload').click(function() {
$tabs.tabsLoad( $('a', $tabs).index(tab) + 1 );
return false;
});
}
});

I assumed in this example that the links that should reload a tab
panel belong to the class "reload".


--Klaus


[jQuery] Re: Duplicate values in form fields

2007-11-29 Thread Michael Price


Hi Wizzud,
I'll give that a try - thanks! :)

Regards,
Michael Price



[jQuery] Re: Tabs 3 Update tab content

2007-11-29 Thread Richard W

Awesome, that is exactly what i'm looking for. Thank you Klaus, and
thank you for an excellent plugin!

On Nov 29, 9:29 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> On 28 Nov., 20:06, Richard W <[EMAIL PROTECTED]> wrote:
>
> > Hi There
> > I'm realling ejoying using tabs, especially the ajax content. I would
> > like to know if there is painless way of updating the current tabs
> > content via ajax without using the tabs. For example you view the
> > content of a tab, click on a link within the tab, and the current tabs
> > content updates dynamically, without changing the order of the current
> > selected tab?
> > Any suggestions would be greatly apprecated.
>
> The tabsLoad method should do the 
> job:http://docs.jquery.com/UI/Tabs/tabsLoad#positionurl
>
> --Klaus


[jQuery] Re: Tablesorter and event handlers on table rows

2007-11-29 Thread pambuk

Don't take this the wrong way, but I love you man, everything works
great, thanks a lot :)

On Nov 29, 9:10 am, "Christian Bach" <[EMAIL PROTECTED]>
wrote:
> Hi Guys,
>
> This issue has been resolved in the latest tablesorter release.
>
> Get it from:http://tablesorter.com/
>
> /Christian
>
> 2007/11/29, pambuk <[EMAIL PROTECTED]>:
>
>
>
> > Hi,
>
> > I have the exact same problem and frankly, I'm out of ideas.
> > Last thing I tried was writing a widget, to rebind events, but clicks
> > are fired n+1 number of sortings.
>
> > I'm a JS (and jQuery) noob, but I'd really appreciate a solution /
> > workaround / hack / whatever.
>
> > I guess I'll sort the table through ajax or even reload the page :/,
> > too bad, because I really liked the idea of using tablesorter.
>
> > Raymond, could you please describe your workaround?
>
> > On Nov 8, 3:20 pm, Raymond78 <[EMAIL PROTECTED]> wrote:
> > > Hi,
>
> > > First, a big thanks for creating this great plugin! Very nice.
>
> > > I am using TableSorter 2.0 on a table which contains rows on which I
> > > have added some event handlers (using jquery; the events have nothing
> > > to do with sorting, they're for highlighting and processing clicks).
>
> > > These event handlers work fine, until I click on a column heading to
> > > sort the table. The sorting works fine, but the event handlers don't
> > > work anymore. After having a look at the sourcecode, it seems to me
> > > that TableSorter effectively removes any event handlers because of the
> > > way it sorts the table. I studied all documentation and examples, but
> > > I couldn't find anything to do this. (There is something to trigger
> > > sorting, but that is the other way around.)
>
> > > My question is, is this correct, or am I overlooking something here?
> > > Is there is any way to preserve the row event handlers?
>
> > > For now, I have created a small workaround by passing an extra
> > > parameter that contains a function call, which is called after the
> > > sorting is finished; but if there is already a way to do this I'd like
> > > to know.
>
> > > I hope someone can help me out. Thanks in advance.
>
> > > Kind regards,
>
> > > Raymond


[jQuery] Re: Tabs 3 Update tab content

2007-11-29 Thread Richard W

OK i've been playing around, and come with the following code, which
is executed without a binded event, as the link would be retrieved via
ajax, therefore I cannot see how I can bind an event to the link.
EG:
Load Content

And here is the innerload function:

 innerload: function(url) {

  a = '.ui-tabs-selected';
  position = $(a + " a").attr("href");
  $span = $('span', a);
  t = $span.html();

  url += '/ajax';

  // load message
  $span.html('' + 'loading..' + '');

  var finish = function() {
$span.html(t);
  };

  $('.ui-tabs-selected').addClass('ui-tabs-loading');

  setTimeout(function() { // timeout is again required in IE,
"wait" for id being restored
$(position).load(url, function(){finish();});
  }, 0);
}


I do not know how to access certain attributes from the tabs class,
mainly the options.
If i knew how to retrieve the options of the current initialiated tabs
class, this function would be a lot cleaner, and I would be able to
manage content through the $.ajax method, and I would be able to use
to set class names etc etc.

This is a very rough example of what I am trying to achieve, does
anyone know of a better way to achieve this?

Regards
Richard

On Nov 28, 9:06 pm, Richard W <[EMAIL PROTECTED]> wrote:
> Hi There
> I'm realling ejoying using tabs, especially the ajax content. I would
> like to know if there is painless way of updating the current tabs
> content via ajax without using the tabs. For example you view the
> content of a tab, click on a link within the tab, and the current tabs
> content updates dynamically, without changing the order of the current
> selected tab?
> Any suggestions would be greatly apprecated.


[jQuery] return true/false

2007-11-29 Thread bytte

I have the following jquery code

$('.menu li').click(function() {
$(this).children("ul").slideDown("fast");
$(this).siblings("li").children("ul").slideUp("fast");
if ( $(this).children("ul").length ) {
$(this).css("background-color","black");
return false;
} else {
$(this).css("background-color","red");
return true;
}
});

Everything works as expected. However, the "return true" part doesn't
work. Is this wrong syntax?


[jQuery] Re: Scroll effect

2007-11-29 Thread GianCarlo Mingati

no.
this is not that easy, even with jquery
;-P
GC

On Nov 28, 4:59 pm, Gerson Goulart <[EMAIL PROTECTED]> wrote:
> Hey there,
>
> Someone know how to do this mouseover scroll efect (in playlist) using
> jQuery:
>
> http://www.flashloaded.com/flashcomponents/flvplayerpro/example1.html
>
> Thanks!
> Gerson.


[jQuery] Re: jquery draggables() not working

2007-11-29 Thread Richard D. Worth
The ui folder was moved in svn to /trunk/ui:

http://dev.jquery.com/view/trunk/ui/current/ui.draggable.js

You'll have to clear your browser cache for the demo to show the change and
work.

- Richard

On Nov 26, 2007 4:59 PM, savil <[EMAIL PROTECTED]> wrote:

>
> Hi
>
> I was wondering why the draggables demo on the documentation site is
> not working.
> It also seems the draggables javascript file:
> "http://dev.jquery.com/view/trunk/plugins/ui/ui.draggable.js";
>
> is inaccessible.
>
>


[jQuery] Re: Duplicate values in form fields

2007-11-29 Thread Wizzud

Example:

var uniqueCodes = {} , duplicateCode = false;
$('input.bbi').each(function(){
var code = $(this).val();
if(code){ // not empty...
  // you may want to convert to upper or lower case
  // here, so the abcDE matches AbCdE, for example
  // code = code.toUpperCase();
  if(uniqueCodes[code]){ it's a duplicate!...
duplicateCode = true;
// do something to the field?, eg...
// $(this).css({borderColor:'#ff'});
  }else{ // it's unique, add to list...
uniqueCodes[code] = 1; // could hold field name or element?
  }
}
  });
// uniqueCodes now holds a list of all codes entered
// duplicateCode is true if one or more duplicate code found
if(duplicateCode){
  // process for invalid form...
}

On Nov 29, 9:24 am, Michael Price <[EMAIL PROTECTED]> wrote:
> Hi all,
> Need a little help turning theory into code!
>
> I have a series of text boxes in a form - there could be hundreds of
> them, all of which have the class "bbi". Most of them are disabled, but
> can be enabled by clicking a tickbox (basically it's a list of
> advertisers and if the tick is ticked, the box opens up to put a
> reference code in).
>
> I need to write some code that, when the form is submitted, checks all
> the filled in .bbi boxes to ensure there are no duplicate values in
> them. But I keep getting into an infinite loop :(
>
> I don't have my work in progress code to show anyone as I dimwittedly
> removed it so I could get the form up. If anyone has an example of how
> they've done something similar (or if there's a plugin kicking about)
> I'd appreciate the help. Thanks!
>
> Regards,
> Michael Price


[jQuery] Question regarding JQuery tabs UI

2007-11-29 Thread cjiang

Hi,

I am working on an application in which I use JQuery Tabs plugin. The
basic layout of the page is that there is a tree structure on the left
side of the page. When the user clicks on any node of the tree,  it
fires an Ajax call and the server returns a fragment of html which
includes tabs. The problem I encountered is that in IE, when the tabs
get loaded, the initialized tab will be loaded once, while in Firefox,
when the tabs loaded, the initialized tab gets loaded twice ( 2 Ajax
calls to the server). Does anyone know what the problem is?

The tabs returned by clicking on the tree node is as follows:


   


  Tab1
   
 
 
   
  Tab2
   
 
 

  Tab3
   
 
 

  Tab4
   
 
  


   (function(){
$('#categories').tabs(2, {remote:true}) ;
   })();



The problem is in Firefox, when this page returned from the Server
through Ajax call, the Tab 2 gets loaded twice.


Thank you for any suggestions.

Changsu Jiang


[jQuery] Re: DateJS: Robust Date manipulation library

2007-11-29 Thread Nicolas Hoizey

> > This came through my feed reader this morning, and I thought it looked
> > like the kind of thing jQuerians might enjoy:
> > http://www.datejs.com/

I really don't like the weird syntax they use.

This Date.today().next().thursday(); is not real chaining IMHO. Even
more (3).days().ago();

Chaining suppose you can remove last call and still get something.

What would (3).days(); mean?

jQuery like syntax would probably be more Date.today().next('thursday');


-Nicolas

-- 
Nicolas "Brush" HOIZEY
Clever Age   : http://www.clever-age.com/
Gastero Prod : http://www.gasteroprod.com/
Photos : http://www.flickr.com/gp/[EMAIL PROTECTED]/M1c002


[jQuery] Re: Adding jQuery Libary to JSEclipse

2007-11-29 Thread dehneg

Oups
Now the last Aptana update include the last jQuery version. Anyway the
update came more than one month after new jQuery release.


On 29 nov, 00:30, dehneg <[EMAIL PROTECTED]> wrote:
> Aptana is a good plugin for Eclipse. But, as jQuery do not support
> scriptdoc format documentation any more, you can not have completion
> for jQuery older than 1.1.2.
>
> Have a look at this thread 
> :http://groups.google.com/group/jquery-en/browse_thread/thread/24f40cf...
>
> Alex
>
> On Nov 28, 10:24 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
> wrote:
>
> > Chris,
>
> > >thanks, ill look in to that, but for the time being, i develop in java
> > >with eclipse, and i'd like to just keep using that. any other ideas?
>
> > Aptana *is* a plug-in for Eclipse--which is why I suggested it.
>
> > -Dan


[jQuery] finding if a link exists, or what it's prepended with

2007-11-29 Thread Rob_

Hi all :-)

jQ newbie here who's finding it much less intuitive than I anticipated
to figure things out...
Wish the examples were a bit more diverse, because I'm having to try
20 variations of every little thing before it works.

Anyway... At the moment, I have just one thing I still need to find.

Let's say:

var page = location.pathname.substring(1)  //  current page, e.g.
"home.htm"

I have a navigation menu with submenus. The 'page' link will be in
either a  tag or a  tag.


Category-1
  
 
  Item 1
  Item 2
 
  
[etc.]


I now need to know either one of these...

1) how do I say...

if ( "  )  // [ instead of
prepended by  ]

or... (less optimal)

3) if I can count how many times  class="current"  appears on the
page?


Thanks in advance!


[jQuery] Duplicate values in form fields

2007-11-29 Thread Michael Price


Hi all,
Need a little help turning theory into code!

I have a series of text boxes in a form - there could be hundreds of 
them, all of which have the class "bbi". Most of them are disabled, but 
can be enabled by clicking a tickbox (basically it's a list of 
advertisers and if the tick is ticked, the box opens up to put a 
reference code in).


I need to write some code that, when the form is submitted, checks all 
the filled in .bbi boxes to ensure there are no duplicate values in 
them. But I keep getting into an infinite loop :(


I don't have my work in progress code to show anyone as I dimwittedly 
removed it so I could get the form up. If anyone has an example of how 
they've done something similar (or if there's a plugin kicking about) 
I'd appreciate the help. Thanks!


Regards,
Michael Price



[jQuery] Re: Tablesorter and event handlers on table rows

2007-11-29 Thread Christian Bach
Hi Guys,

This issue has been resolved in the latest tablesorter release.

Get it from: http://tablesorter.com/

/Christian

2007/11/29, pambuk <[EMAIL PROTECTED]>:
>
>
> Hi,
>
> I have the exact same problem and frankly, I'm out of ideas.
> Last thing I tried was writing a widget, to rebind events, but clicks
> are fired n+1 number of sortings.
>
> I'm a JS (and jQuery) noob, but I'd really appreciate a solution /
> workaround / hack / whatever.
>
> I guess I'll sort the table through ajax or even reload the page :/,
> too bad, because I really liked the idea of using tablesorter.
>
> Raymond, could you please describe your workaround?
>
>
> On Nov 8, 3:20 pm, Raymond78 <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > First, a big thanks for creating this great plugin! Very nice.
> >
> > I am using TableSorter 2.0 on a table which contains rows on which I
> > have added some event handlers (using jquery; the events have nothing
> > to do with sorting, they're for highlighting and processing clicks).
> >
> > These event handlers work fine, until I click on a column heading to
> > sort the table. The sorting works fine, but the event handlers don't
> > work anymore. After having a look at the sourcecode, it seems to me
> > that TableSorter effectively removes any event handlers because of the
> > way it sorts the table. I studied all documentation and examples, but
> > I couldn't find anything to do this. (There is something to trigger
> > sorting, but that is the other way around.)
> >
> > My question is, is this correct, or am I overlooking something here?
> > Is there is any way to preserve the row event handlers?
> >
> > For now, I have created a small workaround by passing an extra
> > parameter that contains a function call, which is called after the
> > sorting is finished; but if there is already a way to do this I'd like
> > to know.
> >
> > I hope someone can help me out. Thanks in advance.
> >
> > Kind regards,
> >
> > Raymond
>