[jQuery] Re: When to use LiveQuery plugin

2009-01-21 Thread Rics

Karl,

There is a bug somewhere between JQuery 1.3 and LiveQuery Plugin.
I just can't put LiveQuery Plugin to work with JQuery 1.3. It's odd.

I will use previous JQuery version until they implement all the
events. Untill there I need to use LiveQuery...

=(((

On 19 jan, 14:43, Karl Swedberg k...@englishrules.com wrote:
 If you need to bind events that .live() currently doesn't handle, such  
 as mouseenter, mouseleave, focus, blur, and change, you should keep  
 Live Query around. In subsequent versions, .live() is supposed to  
 handle these, but for now it doesn't.


[jQuery] Re: Call a function just before the window close

2008-02-23 Thread rics

Can't put it to work... :(

I found an example, but it doesn't work too. Maybe because I'm in
firefox, on linux.. don't know.

I'm trying the .unload() jquery event now...




On Feb 22, 6:27 pm, MorningZ [EMAIL PROTECTED] wrote:
 there is an onbeforeunload event you can use

 http://www.google.com/search?q=javascript+onbeforeunloadie=utf-8oe=...


[jQuery] Call a function just before the window close

2008-02-22 Thread rics

Hello folks,

Probably this is a dumb question, but I'm not a javascript developer
(yet), so be patience with me! :P

How can I call a function just before the window close? When the user
click the close button of the window I want to execute some tasks.

Can I do that?


[jQuery] A problem I can't figure out alone

2008-02-18 Thread rics

I don't even know where the problem is exactly. Please, if you could
show me some way to go...

I want to check the checkbox that have the specifc ID. Here is my
code:


if (sgconfs.default_domain != '') { $
(#+sgconfs.default_domain).attr(checked, checked); }


Ok. The sgconfs is an object. The value of is sgconfs.default_domain
correct. This come from a MySQL database, via JSON, etc.

When the value in database is dom_89, for example, it works fine.
The checkbox is checked as expected. The other value I have is
exatati.intranet. Well, when this is what I have in mysql the code
don't work. The checkbox isn't checked...

I look the W3C specification and the value of an id can contain the
period.

wierd!

What that could be? How can I solve this issue? Any thoughts?


[jQuery] Re: Using Literal Objects in Javascript with JQuery

2008-02-07 Thread rics

Object Literal is a specification of EcmaScript... The most usefull
example of it is JSON. JSON is basicaly an implementation of OL...

Well, I'm not the best teacher for this... I'm learning it too.



On Feb 6, 2:06 pm, J Moore [EMAIL PROTECTED] wrote:
 Yes, great screencast. (I think i learned a little portuguese too.)

 A question about literal objects - is it fundamentally different than
 using prototype?

 //
 // example 1: literal obj
 //
 var Counter = {
   container = $('#counter');
   start: 1,
   init: function() { container.val(start); }

 }

 $(document).ready(function() {
   Counter.init();

 });

 //
 // example 2: prototype obj
 //
 function Counter() {
   var start = 1;
   var container = $('#counter');

 };

 Counter.prototype.init = function(obj) {
   this.container.val(this.start);

 };

 var c = new Counter();
 c.init();

 certainly the object literal method looks a bit cleaner. It is
 possible to create multiple instances? Any other advantages?

 -j

 On Feb 6, 9:59 am, rics [EMAIL PROTECTED] wrote:

  Hello,

  Here is a great screencast tutorial on how to better organize your js
  code with Literal Objects and JQuery. The author is brazilian and he
  talks portuguese, but you can follow and understand the tutorial
  without any sound, just seeing what he do on screen.

 http://www.tuliofaria.net/arquivos/videotutoriais/jsobjetoliteral/

  Good luck!
  rics


[jQuery] Using Literal Objects in Javascript with JQuery

2008-02-06 Thread rics

Hello,

Here is a great screencast tutorial on how to better organize your js
code with Literal Objects and JQuery. The author is brazilian and he
talks portuguese, but you can follow and understand the tutorial
without any sound, just seeing what he do on screen.

http://www.tuliofaria.net/arquivos/videotutoriais/jsobjetoliteral/

Good luck!
rics


[jQuery] Re: Loading animation when waiting JQuery.post() to return

2008-01-08 Thread rics

I will try both. I want to do it from zero at least once, to
learn... :D
Thanks!
rics


On Jan 7, 8:15 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
  I think what you might be after are ajaxStart and ajaxStop:

 http://docs.jquery.com/Ajax/ajaxStart#callback
 http://docs.jquery.com/Ajax/ajaxStop#callback

  That could start and then stop something like an animated gif that
  would overlay the page until the ajax request was finished. Getting
  the animation, styling it, etc. is all just css and usual hide/show,
  etc.

 There is a plugin called BlockUI that does this very thing quite nicely.

 -- Josh


[jQuery] How to set up a callback on a function I've made?

2008-01-08 Thread rics

Hello people,

How can I force some code to run only when the execution of other
function finish? Look my code:


function loading() {
$(#ajaxContent).slideToggle(normal, function() {
$(#ajaxLoader).toggle();
});
}


$(#searchBar  button).click(function() {
loading();
$.get(ajax/list.php, function(data){
$(#ajaxContent).html(data);
loading();
});
});


In the second block of code I want the $.get to execute only when the
function loading(), that was coded by me, finish to execute. I mean,
when the #ajaxLoader is show up.

How can I do something like that?


[jQuery] Re: How to set up a callback on a function I've made?

2008-01-08 Thread rics

I did it using ajaxStart() and ajaxStop(), but I still want to know if
I can set a callback to a custom function, for learning reasons. If
you can help, thanks.

:D

Here is the final code...


$(#ajaxContent).ajaxStart(function(){
$(this).slideToggle(normal);
$(#ajaxLoader).toggle();
});

$(#ajaxContent).ajaxStop(function(){
$(this).slideToggle(normal, function(){
$(#ajaxLoader).toggle();
});
});

$(#searchBar  button).click(function() {
$.get(ajax/list.php, function(data){
$(#ajaxContent).html(data);
});
});




On Jan 8, 1:38 pm, rics [EMAIL PROTECTED] wrote:
 Hello people,

 How can I force some code to run only when the execution of other
 function finish? Look my code:

 function loading() {
 $(#ajaxContent).slideToggle(normal, function() {
 $(#ajaxLoader).toggle();
 });
 }

 $(#searchBar  button).click(function() {
 loading();
 $.get(ajax/list.php, function(data){
 $(#ajaxContent).html(data);
 loading();
 });
 });

 In the second block of code I want the $.get to execute only when the
 function loading(), that was coded by me, finish to execute. I mean,
 when the #ajaxLoader is show up.

 How can I do something like that?


[jQuery] Using JQuery with PHP Frameworks

2008-01-07 Thread rics

Hello,

I wish to start usign some PHP framework soon and was wondering wich
one works better with JQuery. I will use Zend Framework or CakePHP.
Not decided yet.

Do you have any experience with one of them? How can I use JQuery with
them? Any article or tutorial I can read?

Thanks,
rics




[jQuery] Re: Using JQuery with PHP Frameworks

2008-01-07 Thread rics

Nope. Just looking some framework that can help me develop faster and
better. But I just learned JQuery and the things I can do with it are
amazing. I don't want to stop using it just because I can't put it to
work with the new framework.

:D


On Jan 7, 8:08 am, Mike Schinkel [EMAIL PROTECTED] wrote:
 rics wrote:
  I wish to start usign some PHP framework soon and was
  wondering wich one works better with JQuery. I will use Zend
  Framework or CakePHP.
  Not decided yet.

 Are you looking for a framework for creating RESTful web services for use
 with jQuery, or something else?

 -Mike


[jQuery] Loading animation when waiting JQuery.post() to return

2008-01-07 Thread rics

Hello,

How can I set an animation to play when the page is waiting for a
return from ajax function such as .get() or .post()??? Didn't find
examples in docs.

Thanks,
rics





[jQuery] Re: jQuery.ScrollTo 1.3 released

2008-01-05 Thread rics

Great job!!!

It works fine on Linux, usign Firefox 2.0.010.

rics



On Jan 3, 6:08 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
 There, now it shows an example of code when a link is clicked.
 I'd appreciate it, if some people could try it on different browser
 versions and platforms.

 Thanks

 Ariel Flesler


[jQuery] Re: Beginner help with highlight effect

2007-12-28 Thread rics

You are right! It works.

I don't know what I was doing. Maybe some char missing on the
selector...

Thanks you all people.

I'm doing amazing things with JQuery!!! :D
It Rocks!!!



On Dec 27, 11:06 am, Strija [EMAIL PROTECTED] wrote:
 You must be doing something wrong, because this works great:
 $(#admperm).show().css({backgroundColor:
 '#ff0'}).animate({backgroundColor: '#fff'}, 1000);

 On Dec 27, 11:24 am, rics [EMAIL PROTECTED] wrote:

  I can't put it to work without the setTimeOut(). The solution I have
  found was to use setTimeOut without the time part. It works fine
  now... Look what I've done:

  $(#admperm).show();

  setTimeout( function() {
  $('#admperm').css({backgroundColor: '#ff0'});
  $('#admperm').animate({backgroundColor: '#fff'}, 1000);

  });

  This work. But I was trying to do something like this before:

  $(#admperm).show();
  $('#admperm').css({backgroundColor: '#ff0'});
  $('#admperm').animate({backgroundColor: '#fff'}, 1000);

  This did'nt work. Don't know why... The code only works inside
  setTimeOut() function.

  I will read your article. I'm loving learning JQuery. It's simply
  SUPER FUN to develop with it. =)

  Thanks,
  rics

  On Dec 26, 1:54 pm, Karl Swedberg [EMAIL PROTECTED] wrote:

   Hi Rics,

   Glad it works for you. I used setTimeout() in the code that I sent to
   you, so I'm not sure why you're mentioning that you must use it. Are
   you using it somewhere other than the place where I'm using it? I put
   it in the callback of the fadeIn() method so that the element would
   stay yellow for 3 seconds before it starts fading out.

   setTimeout() is a method of the window object, and it's native
   JavaScript. It is not exclusive to jQuery at all. That's probably why
   you couldn't find anything in the jQuery docs. Actually, I wrote about
   a little gimmick that you could use instead of setTimeout() if you
   just want to chain some jQuery methods together:

  http://www.learningjquery.com/2007/01/effect-delay-trick

   Your English is fine. :-)

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

   On Dec 26, 2007, at 7:07 AM, rics wrote:

Yess :

Now it works. But I must use setTimeOut(). Without it the effect
didn't work. You know why? I couldn't find anything in JQuery docs
about it and the plugin even have any docs.

Oh, and by the way, my english is understandable? I'm brazilian and
not very good with the english language! :D

Merry Christmas,
rics

On Dec 25, 1:31 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
On Dec 24, 2007, at 11:35 AM, rics wrote:

Hello,

I'm a PHP developer, but all this javascript thing is new to me.
It's
the first time I try to do something with javascript and I'm using
JQuery to help me do things fast (and best).

I wish to make some highlight effect, but can't figure it out by
myself. Can you help me?

I wish to click a checkbox and then flash a div using yellow
background. I think I have to paint the div background with yellow
and
then fade to transparent again. Am I thinking correct? How can I do
that?

Thanks,
rics, from Brazil.

Hi Rics,

You can use the color plugin to animate a color from yellow to white
(or to some other color, but not to transparent).

   http://plugins.jquery.com/project/color

Then you could write a script like this (you'll need to change the
selectors someCheckBox and #flash to suit your situation):

$(document).ready(function() {
  $('someCheckBox').click(function() { // on clicking some
checkbox ...
$('#flash').css({backgroundColor: '#ff0'}); // ... set
background color to yellow.
setTimeout(function() {
  $('#flash').animate({backgroundColor: '#fff'}, 1000); //
Then, animate bg color to white, but first ...
},
3000); // ... wait 3 seconds
  });
});

Hope that helps.

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


[jQuery] Re: Beginner help with highlight effect

2007-12-27 Thread rics

I can't put it to work without the setTimeOut(). The solution I have
found was to use setTimeOut without the time part. It works fine
now... Look what I've done:


$(#admperm).show();

setTimeout( function() {
$('#admperm').css({backgroundColor: '#ff0'});
$('#admperm').animate({backgroundColor: '#fff'}, 1000);
});


This work. But I was trying to do something like this before:


$(#admperm).show();
$('#admperm').css({backgroundColor: '#ff0'});
$('#admperm').animate({backgroundColor: '#fff'}, 1000);


This did'nt work. Don't know why... The code only works inside
setTimeOut() function.

I will read your article. I'm loving learning JQuery. It's simply
SUPER FUN to develop with it. =)

Thanks,
rics




On Dec 26, 1:54 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 Hi Rics,

 Glad it works for you. I used setTimeout() in the code that I sent to
 you, so I'm not sure why you're mentioning that you must use it. Are
 you using it somewhere other than the place where I'm using it? I put
 it in the callback of the fadeIn() method so that the element would
 stay yellow for 3 seconds before it starts fading out.

 setTimeout() is a method of the window object, and it's native
 JavaScript. It is not exclusive to jQuery at all. That's probably why
 you couldn't find anything in the jQuery docs. Actually, I wrote about
 a little gimmick that you could use instead of setTimeout() if you
 just want to chain some jQuery methods together:

 http://www.learningjquery.com/2007/01/effect-delay-trick

 Your English is fine. :-)

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

 On Dec 26, 2007, at 7:07 AM, rics wrote:



  Yess :

  Now it works. But I must use setTimeOut(). Without it the effect
  didn't work. You know why? I couldn't find anything in JQuery docs
  about it and the plugin even have any docs.

  Oh, and by the way, my english is understandable? I'm brazilian and
  not very good with the english language! :D

  Merry Christmas,
  rics

  On Dec 25, 1:31 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
  On Dec 24, 2007, at 11:35 AM, rics wrote:

  Hello,

  I'm a PHP developer, but all this javascript thing is new to me.
  It's
  the first time I try to do something with javascript and I'm using
  JQuery to help me do things fast (and best).

  I wish to make some highlight effect, but can't figure it out by
  myself. Can you help me?

  I wish to click a checkbox and then flash a div using yellow
  background. I think I have to paint the div background with yellow
  and
  then fade to transparent again. Am I thinking correct? How can I do
  that?

  Thanks,
  rics, from Brazil.

  Hi Rics,

  You can use the color plugin to animate a color from yellow to white
  (or to some other color, but not to transparent).

 http://plugins.jquery.com/project/color

  Then you could write a script like this (you'll need to change the
  selectors someCheckBox and #flash to suit your situation):

  $(document).ready(function() {
$('someCheckBox').click(function() { // on clicking some
  checkbox ...
  $('#flash').css({backgroundColor: '#ff0'}); // ... set
  background color to yellow.
  setTimeout(function() {
$('#flash').animate({backgroundColor: '#fff'}, 1000); //
  Then, animate bg color to white, but first ...
  },
  3000); // ... wait 3 seconds
});
  });

  Hope that helps.

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


[jQuery] Re: Need input on best approach to this type of menu feature

2007-12-26 Thread rics

I think that with some show() or slide() functions you can make
something like that.

Make divs or the expandable area and hide them all. Then you can
show() and/or slide() them in mouseover, or something like that.

This is a beginning...

rics




On Dec 26, 12:20 am, Rick Faircloth [EMAIL PROTECTED]
wrote:
 Hi, all.

 I'd like to request some suggestions as to what core jQuery
 functions and plug-in(s) might best be used to create a
 menu feature such as the one used on this site:

 www.AtlantaFalcons.com

 You'll see an expanded area appear beneath the menu when you
 mouseover the main menu items at the top of the page;.

 I thought about using the Yahoo enhanced search approach
 which involves sliding the page content down to make room
 for the new search area, but I think I would rather use
 the approach on the Falcon's site, and overlay the menu.

 The Yahoo approach would be simpler, just using a slide-and-hide
 approach, but the Falcon's approach would be a little
 more complex.

 Involving, perhaps, absolutely positioned div's and z-index
 for positioning the additional menu area?

 Thoughts and suggestions?

 Thanks for any input.

 Rick


[jQuery] Re: Beginner help with highlight effect

2007-12-26 Thread rics

Yess :

Now it works. But I must use setTimeOut(). Without it the effect
didn't work. You know why? I couldn't find anything in JQuery docs
about it and the plugin even have any docs.

Oh, and by the way, my english is understandable? I'm brazilian and
not very good with the english language! :D

Merry Christmas,
rics





On Dec 25, 1:31 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 On Dec 24, 2007, at 11:35 AM, rics wrote:





  Hello,

  I'm a PHP developer, but all this javascript thing is new to me. It's
  the first time I try to do something with javascript and I'm using
  JQuery to help me do things fast (and best).

  I wish to make some highlight effect, but can't figure it out by
  myself. Can you help me?

  I wish to click a checkbox and then flash a div using yellow
  background. I think I have to paint the div background with yellow and
  then fade to transparent again. Am I thinking correct? How can I do
  that?

  Thanks,
  rics, from Brazil.

 Hi Rics,

 You can use the color plugin to animate a color from yellow to white
 (or to some other color, but not to transparent).

 http://plugins.jquery.com/project/color

 Then you could write a script like this (you'll need to change the
 selectors someCheckBox and #flash to suit your situation):

  $(document).ready(function() {
$('someCheckBox').click(function() { // on clicking some
 checkbox ...
  $('#flash').css({backgroundColor: '#ff0'}); // ... set
 background color to yellow.
  setTimeout(function() {
$('#flash').animate({backgroundColor: '#fff'}, 1000); //
 Then, animate bg color to white, but first ...
  },
  3000); // ... wait 3 seconds
});
  });

 Hope that helps.

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


[jQuery] Re: Beginner help with highlight effect

2007-12-26 Thread rics

From there:

Only properties that take numeric values are supported (e.g.
backgroundColor is not supported by animate()).

But thanks anyway... Your tip helped me with a lot of other issues! :D

Thanks!!!
rics



On Dec 24, 10:43 pm, Glen Lipka [EMAIL PROTECTED] wrote:
 Check out this page in the docs.http://docs.jquery.com/Effects/animate

 I am in the airport in Phoenix on public wifi, so I cant make a demo right
 this sec.  But that page should help.

 Glen

 On Dec 24, 2007 8:35 AM, rics [EMAIL PROTECTED] wrote:



  Hello,

  I'm a PHP developer, but all this javascript thing is new to me. It's
  the first time I try to do something with javascript and I'm using
  JQuery to help me do things fast (and best).

  I wish to make some highlight effect, but can't figure it out by
  myself. Can you help me?

  I wish to click a checkbox and then flash a div using yellow
  background. I think I have to paint the div background with yellow and
  then fade to transparent again. Am I thinking correct? How can I do
  that?

  Thanks,
  rics, from Brazil.


[jQuery] Beginner help with highlight effect

2007-12-24 Thread rics

Hello,

I'm a PHP developer, but all this javascript thing is new to me. It's
the first time I try to do something with javascript and I'm using
JQuery to help me do things fast (and best).

I wish to make some highlight effect, but can't figure it out by
myself. Can you help me?

I wish to click a checkbox and then flash a div using yellow
background. I think I have to paint the div background with yellow and
then fade to transparent again. Am I thinking correct? How can I do
that?

Thanks,
rics, from Brazil.