[jQuery] Re: :contains - a bit more specific?

2007-06-11 Thread Jean Nascimento


and that way?
$("div.commentfooter > span").contains('test').append('class');

On 6/11/07, MrNase <[EMAIL PROTECTED]> wrote:


I have some layers, each of this layers has a span tag with a
username. Now, I want to append some code to each layer that has a
span which contains 'test'.

The code I tried is:

$("div.commentfooter[span:contains('test')]").append('class');


But that also appends 'class' to layers that have a span tag
containing 'testman' or 'tester'.

What do I need to change to only select those layers that have a span
tag that contains the word 'test' and only this word?

$("div.commentfooter[span:is('test')]").append('class');

doesn't work. :-(


---dominik





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Why does my ajax function kill drag/drop?

2007-06-05 Thread Jean Nascimento


i think all ajax calls kill drag, i have troubles with that and a
friend mine too


On 6/4/07, dennis <[EMAIL PROTECTED]> wrote:


I have Interface 1.2 Drag/Drop working. I can drag images (hardcoded)
from div id=theSearchResultImages to my dropable area just fine.

But when I try to add my ajax 'Search Photos By Tags' form which
populates images into div id=theSearchResultImages, I can no longer
drag and drop the images. Here's my form and ajax call:


 



Help will be greatly appreciated.

/dennis





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: $().load() not working in Opera?

2007-06-01 Thread Jean Nascimento


Well in my opinion i dont like the buttons of menu, the top, the
buttons and the footer =p
And u can use the RED better, try use a combination of tons
apply a sweet border in buttons, some shadow or inner light

try make your menu more like an a accordion ;D

On 5/31/07, warlock24 <[EMAIL PROTECTED]> wrote:


On 30 Maj, 16:26, "Jean Nascimento" <[EMAIL PROTECTED]> wrote:
> but u can do better with the design no? =P
>

and what is wrong with it? :)





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Using close images

2007-05-30 Thread Jean Nascimento


Thanks dude.

On 5/30/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:

Hi Jean,

Try switching the "=" and the "^" around. So, the selector expression should
look like this:
$('[EMAIL PROTECTED]')

That is, if you selecting all images that have a id that starts with
"fechar".




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





On May 30, 2007, at 10:22 AM, Jean Nascimento wrote:


I´m trying do that
$("[EMAIL PROTECTED]").click(function() {
alert('u can do it!');
 $(this).parent("div").hide();
 });
fechar = close

Even with a alert do nothing, where is wrong??

--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com




--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Using close images

2007-05-30 Thread Jean Nascimento


I have other question, with this code i´m trying catch the 1st parent
div of img OK
but when this img is in a TD the parent returns undefined
then dont hides the div, how can i get the parent div with this?

$('[EMAIL PROTECTED]').click(function() {
alert($(this).parent("div").attr("id"));
  $(this).parent("div").hide();
  });
the begin of code


 
   
   
   Ordem de Serviço 
   
   







On 5/30/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:

Hi Jean,

Try switching the "=" and the "^" around. So, the selector expression should
look like this:
$('[EMAIL PROTECTED]')

That is, if you selecting all images that have a id that starts with
"fechar".




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





On May 30, 2007, at 10:22 AM, Jean Nascimento wrote:


I´m trying do that
$("[EMAIL PROTECTED]").click(function() {
alert('u can do it!');
 $(this).parent("div").hide();
 });
fechar = close

Even with a alert do nothing, where is wrong??

--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com




--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Using close images

2007-05-30 Thread Jean Nascimento


I´m trying do that
$("[EMAIL PROTECTED]").click(function() {
alert('u can do it!');
$(this).parent("div").hide(); 
});
fechar = close

Even with a alert do nothing, where is wrong??

--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: $().load() not working in Opera?

2007-05-30 Thread Jean Nascimento


Here is working, but u can do better with the design no? =P

On 5/30/07, warlock24 <[EMAIL PROTECTED]> wrote:


Could someone could tell me why my page menu (http://
warlock24.googlepages.com/index.html#) not working in Opera?  I use $
().load() to load subpages into DIV.

:(





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Autocomplete error

2007-05-28 Thread Jean Nascimento


sorry for my ignorance
i test quickly in my job.

me and my stupidies

On 5/28/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:


Diego A. wrote:
> Sounds like you haven't included the dimensions plugin.
> 
http://www.google.co.uk/search?sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-14,GGGL:en&q=jquery+dimensions
>
Yep. Dependencies are all listed on the plugin page:
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/


  Dependencies

* jQuery 
* bgiframe plugin
  

* dimensions plugin
  
,
  only offset method is used

--
Jörn Zaefferer

http://bassistance.de





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Autocomplete error

2007-05-28 Thread Jean Nascimento


Anyone have problems with the autocomplete plugin from bassistance?

jQuery(input).offset is not a function
[Break on this error] var offset = jQuery(input).offset({scroll:
false, border: false});

In this line: var offset = jQuery(input).offset({scroll: false, border: false});




After the first key pressed.

$("#months").autocomplete(months, {
minChars: 0,
max: 12,
autoFill: true
});

the months is only for test
--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Jorn Form Validation help - how to know when a select field is selected

2007-05-28 Thread Jean Nascimento


input:selected is the pseudo class for this ;D
and input:checked is for the radio box


On 5/28/07, Web Specialist <[EMAIL PROTECTED]> wrote:

Hi all

I have a dependent validation routine with Jorn Validation Form plugin.
Works like a charm. But I need to validate dependent fields when a select
field option is "selected".

Looks like

 wife:{required: function() {return
$("[EMAIL PROTECTED]'maried_single']").filter('[EMAIL PROTECTED]').val()
== "1";}},

But doesn't work. How to get the selected field option?





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Problem with maskedinput + load

2007-05-28 Thread Jean Nascimento


I´m passing a input value with load function and this ionput with mask
dont send any value but without works normal, who know why??
and i already tried with #id of input

//mask na consulta de os
$("#os_id").maskedinput("", " ");
//consulta OS
$("#Consultar").click(function(){ 
//$("#container_formulario").hide();  
$("#loader").load("listar_os.php",
{
acao: "consultar",
os_id: $("[EMAIL 
PROTECTED]").val()
},
 function(){
alert($("#os_id").val());
$("#loader").show();
 }
);
$.ajaxTimeout(5000); //milisegundosk
$("#consulta").ajaxStop(function(){ 
  
$("#consulta").show();
});
});
--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: function are getting called twice

2007-05-28 Thread Jean Nascimento


i dont have problems with that, how u call the website2?? Try dont use
the same id for the elements or something like that.

On 5/28/07, bingo <[EMAIL PROTECTED]> wrote:


hi..

I tried some debugging and found that IE7 is not having any problem
with it..the problem is with firefoxthis definitely shows that
there is some bug in Jquery itself

Regards,
bingo

On May 27, 8:25 pm, bingo <[EMAIL PROTECTED]> wrote:
> hi,
>
> I have a webpage (say webpage1) that include another webpage (say
> webpage2). Both the pages have $(document).ready(..to attach
> jquery function to elements of their page. However, since webpage2 is
> included within webpage1, the functions within webpage2 are getting
> called twice. Is there a way to avoid calling a function twice
>
> I want to keep $(document).ready in both the pages as, sometime the
> webpage2 can be directly called..
>
> Please help me with this
>
> Regards,
> bingo





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: CSS3 support

2007-05-28 Thread Jean Nascimento


I thinks is only the selectors by now, couze want the jquery implement
CSS3 declarations if the browsers dont support??


On 5/28/07, pd <[EMAIL PROTECTED]> wrote:


Hi All

I know I'm dreaming and it's probably not realistic but on the front
of the jQuery site is the following proclamation:

"CSS3 Compliant
· Supports CSS 1-3 and basic XPath"

Should that proclamation really say "CSS3 Compliant (selectors)
because AFAIK jQuery doesn't appear to support any CSS3 declarations
like border-radius for example.

I understand there are a thousand and one whacky ways for JS to
manipulate the DOM into presenting rounded corners and this is
generally a bad thing in terms of separation of content and style. Has
jQuery ever considered implementing one of these or are they just
really too evil?





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Loading before teh DOM is ready

2007-05-25 Thread Jean Nascimento

And with window.load is better for me becouse i need all images too


document.write("<style type='text/css'>#content { display: none }
#loading { display: block } <\/style>");
$(window).load(function() {
$("#loading").hide();
$("#content").show();
}); 



Tkz dude!


On 5/25/07, Jean Nascimento <[EMAIL PROTECTED]> wrote:

Owww pretty good! Thanks. Now I begin to undertand the things what can
we do for the poor people who disable js huauhahuahuhuahua

On 5/25/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
> how 'bout
>
> 
> 
> My page
> 
> #content { display: block }
>  #loading { display: none }
> 
> 
> document.write("<style type='text/css'>#content { display: none }
> #loading { display: block } <\/style>");
> $( function() {
>   $("#loading").hide();
>   $("#content").show();
> });
> 
> 
> 
> Loading...
> 
> .. content here
> 
> 
> 
>
>
> On 5/24/07, Sam Collett <[EMAIL PROTECTED] > wrote:
> >
> > How about:
> >
> > 
> > 
> > My page
> > 
> > document.write("<style type='text/css'>#content { display: none }
> > #loading { display: block } <\/style>");
> > $( function() {
> >   $("#loading").hide();
> >   $("#content").show();
> > });
> > 
> > 
> > 
> > Loading...
> > 
> > .. content here
> > 
> > 
> > 
> >
> > On May 24, 7:45 pm, "Jean Nascimento" <[EMAIL PROTECTED]> wrote:
> > >   I´ve tried add some code before the $(document).ready but its dont
> > > work, so i wanna know how the best way to show some Loading div before
> > > all docuemnt be ready?
> > >
> > > --
> > >
> > > []´s Jeanwww.suissa.info
> > >
> > >Ethereal Agencywww.etherealagency.com
> >
> >
>
>
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


--

[]´s Jean
www.suissa.info

   Ethereal Agency
www.etherealagency.com




--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Loading before teh DOM is ready

2007-05-25 Thread Jean Nascimento

Owww pretty good! Thanks. Now I begin to undertand the things what can
we do for the poor people who disable js huauhahuahuhuahua

On 5/25/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:

how 'bout



My page

#content { display: block }
 #loading { display: none }


document.write("<style type='text/css'>#content { display: none }
#loading { display: block } <\/style>");
$( function() {
  $("#loading").hide();
  $("#content").show();
});



Loading...

.. content here





On 5/24/07, Sam Collett <[EMAIL PROTECTED] > wrote:
>
> How about:
>
> 
> 
> My page
> 
> document.write("<style type='text/css'>#content { display: none }
> #loading { display: block } <\/style>");
> $( function() {
>   $("#loading").hide();
>   $("#content").show();
> });
> 
> 
> 
> Loading...
> 
> .. content here
> 
> 
> 
>
> On May 24, 7:45 pm, "Jean Nascimento" <[EMAIL PROTECTED]> wrote:
> >   I´ve tried add some code before the $(document).ready but its dont
> > work, so i wanna know how the best way to show some Loading div before
> > all docuemnt be ready?
> >
> > --
> >
> > []´s Jeanwww.suissa.info
> >
> >Ethereal Agencywww.etherealagency.com
>
>



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



--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Auto-focus next box

2007-05-25 Thread Jean Nascimento


if u change all the ids for 1 class isnt better??

On 5/25/07, Michael Price <[EMAIL PROTECTED]> wrote:


Michael Price wrote:
> I've got five text boxes representing the four (or five for longer ones)
> parts of a credit card number. They all follow one another in the DOM
> without any other elements in between.
>
> What I want to do is when 4 digits have been typed into one box,
> auto-focus the next one. I could do this:
>
> $("#box1").keyup(function() {
> // IF LENGTH IS 4 FOCUS BOX2
> });
>
> $("#box2").keyup(function() {
> // IF LENGTH IS 4 FOCUS BOX3
> });
>
> $("#box3").keyup(function() {
> // IF LENGTH IS 4 FOCUS BOX4
> });
>
> $("#box4").keyup(function() {
> // IF LENGTH IS 4 FOCUS BOX5
> });

Typical, two minutes after posting I come up with this:
$("#CN1, #CN2, #CN3, #CN4, #CN5").keyup(function() {
if ($(this).val().length == 4) {
$(this).next("input,select").focus();
}
});

Anyone got any advance on this?

Regards,
Michael Price





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Loading before teh DOM is ready

2007-05-25 Thread Jean Nascimento


In really this is an example for future use, couse now the page of
report i´m loading by .load function wich put the entire page so i
dont need to this technique for now =p

On 5/25/07, Jean Nascimento <[EMAIL PROTECTED]> wrote:

I thin i dont understand, i want to show only when the body are beeing
creating and not after or ataching this to an element

this is for the intranet system for my job, they are all with JS enable lol
i want to know if really exists someone who wants to have all the
capabilities from the sites and disable JS, exist???


On 5/25/07, Alexandre Plennevaux <[EMAIL PROTECTED]> wrote:
>
> Please note that in this implementation, users without javascript enabled
> will not be able to see your comment. The #content and #loading parts should
> be respectively ON and OFF in your css stylesheet.
> javascript should control  the entire sequence and not only the end of it.
>
>
> The way i did it is by creating a show / hide functions taking care of
> creating the loading div html code, and toggling the visibility of the two,
> and then attaching to each A and BUTTON element the behaviour to launch the
> function.
>
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jean Nascimento
> Sent: vendredi 25 mai 2007 8:20
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Loading before teh DOM is ready
>
>
> Thankss! I used this for test =D
>
> 
> 
> My page
> 
> #content {
> display: none
> }
> #loading {
> background-color: #66;
> color: #FF;
> display: block;
> font-family: Verdana, Helvetica, sans-serif;
> font-size: 0.95em;
> font-weight: bold;
> padding: 3px 3px;
> width: 200px;
> }
> 
>
>   type="text/javascript">
>
> $(document).ready(
> function() {
> $("#loading").hide();
> $("#content").show();
> });
> 
> 
> 
> Loading...
> 
> .. content here
>  for($i=0;$i<10;$i++){
> echo $i." ushohdoy3809yh!";
> }
> ?>
> 
> 
> 
>
> On 5/25/07, Sam Collett <[EMAIL PROTECTED]> wrote:
> >
> > How about:
> >
> > 
> > 
> > My page
> > 
> > document.write("<style type='text/css'>#content { display: none }
> > #loading { display: block } <\/style>"); $( function() {
> >   $("#loading").hide();
> >   $("#content").show();
> > });
> > 
> > 
> > 
> > Loading...
> > 
> > .. content here
> > 
> > 
> > 
> >
> > On May 24, 7:45 pm, "Jean Nascimento" <[EMAIL PROTECTED]> wrote:
> > >   I´ve tried add some code before the $(document).ready but its dont
> > > work, so i wanna know how the best way to show some Loading div
> > > before all docuemnt be ready?
> > >
> > > --
> > >
> > > []´s Jeanwww.suissa.info
> > >
> > >Ethereal Agencywww.etherealagency.com
> >
> >
>
>
> --
>
> []´s Jean
> www.suissa.info
>
>Ethereal Agency
> www.etherealagency.com
>
> Ce message Envoi est certifié sans virus connu.
> Analyse effectuée par AVG.
> Version: 7.5.467 / Base de données virus: 269.8.0/817 - Date: 24/05/2007
> 16:01
>
>
>


--

[]´s Jean
www.suissa.info

   Ethereal Agency
www.etherealagency.com




--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Loading before teh DOM is ready

2007-05-25 Thread Jean Nascimento


I thin i dont understand, i want to show only when the body are beeing
creating and not after or ataching this to an element

this is for the intranet system for my job, they are all with JS enable lol
i want to know if really exists someone who wants to have all the
capabilities from the sites and disable JS, exist???


On 5/25/07, Alexandre Plennevaux <[EMAIL PROTECTED]> wrote:


Please note that in this implementation, users without javascript enabled
will not be able to see your comment. The #content and #loading parts should
be respectively ON and OFF in your css stylesheet.
javascript should control  the entire sequence and not only the end of it.


The way i did it is by creating a show / hide functions taking care of
creating the loading div html code, and toggling the visibility of the two,
and then attaching to each A and BUTTON element the behaviour to launch the
function.



-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jean Nascimento
Sent: vendredi 25 mai 2007 8:20
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Loading before teh DOM is ready


Thankss! I used this for test =D



My page

#content {
display: none
}
#loading {
background-color: #66;
color: #FF;
display: block;
font-family: Verdana, Helvetica, sans-serif;
font-size: 0.95em;
font-weight: bold;
padding: 3px 3px;
width: 200px;
}


 

$(document).ready(
function() {
$("#loading").hide();
$("#content").show();
});



Loading...

.. content here
";
}
?>




On 5/25/07, Sam Collett <[EMAIL PROTECTED]> wrote:
>
> How about:
>
> 
> 
> My page
> 
> document.write("<style type='text/css'>#content { display: none }
> #loading { display: block } <\/style>"); $( function() {
>   $("#loading").hide();
>   $("#content").show();
> });
> 
> 
> 
> Loading...
> 
> .. content here
> 
> 
> 
>
> On May 24, 7:45 pm, "Jean Nascimento" <[EMAIL PROTECTED]> wrote:
> >   I´ve tried add some code before the $(document).ready but its dont
> > work, so i wanna know how the best way to show some Loading div
> > before all docuemnt be ready?
> >
> > --
> >
> > []´s Jeanwww.suissa.info
> >
> >Ethereal Agencywww.etherealagency.com
>
>


--

[]´s Jean
www.suissa.info

   Ethereal Agency
www.etherealagency.com

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.467 / Base de données virus: 269.8.0/817 - Date: 24/05/2007
16:01






--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Loading before teh DOM is ready

2007-05-25 Thread Jean Nascimento


Thankss! I used this for test =D



My page

#content {
display: none
}
#loading {
background-color: #66;
color: #FF;
display: block;
font-family: Verdana, Helvetica, sans-serif;
font-size: 0.95em;
font-weight: bold;
padding: 3px 3px;
width: 200px;
}





$(document).ready(
function() {
$("#loading").hide();
$("#content").show();
});



Loading...

.. content here
";
}
?>




On 5/25/07, Sam Collett <[EMAIL PROTECTED]> wrote:


How about:



My page

document.write("<style type='text/css'>#content { display: none }
#loading { display: block } <\/style>");
$( function() {
  $("#loading").hide();
  $("#content").show();
});



Loading...

.. content here




On May 24, 7:45 pm, "Jean Nascimento" <[EMAIL PROTECTED]> wrote:
>   I´ve tried add some code before the $(document).ready but its dont
> work, so i wanna know how the best way to show some Loading div before
> all docuemnt be ready?
>
> --
>
> []´s Jeanwww.suissa.info
>
>Ethereal Agencywww.etherealagency.com





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Finding a parent list item.

2007-05-25 Thread Jean Nascimento


i think is that

$(function()
{
  $("fieldset").find("input,select,textarea,option").focus
  (function()
  {
  this.parent().addClass("on");
  }
  )
  .blur
  (function()
  {
  this.parent().removeClass();
  }
  );
});


On 5/25/07, fambizzari <[EMAIL PROTECTED]> wrote:


Hi everyone,

Imagine the following HTML scenario:


Title



Message











How could i modify the following jquery code so that it effects the
parent  and and not the parent node:

$(function()
{
$("fieldset").find("input,select,textarea,option").focus
(function()
{
this.parentNode.className = "on";
}
)
.blur
(function()
{
this.parentNode.className = "";
}
);
});

I hope that makes sense.





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Keypress on a div

2007-05-24 Thread Jean Nascimento


Really, is much more clean, Thanks for the tip!

On 5/24/07, Erik Beeson <[EMAIL PROTECTED]> wrote:


Seems like this comes up fairly often. A FAQ page about it might be nice...

Under the hood, they work the same way. The click/mousover/etc
versions are actually just shortcuts to bind('click', ...), etc.

I think which you use is just a personal preference. I think the
click() way was the original way, and the more generic bind() is
newer. I prefer the bind() version because I think the API is more
consistent. If you check out this page: http://docs.jquery.com/Events
You'll see there are three functions: bind, unbind, and one. The
similar syntax of bind and unbind make it pretty clear what's going
on. I think bind('click', function() {...}); unbind('click'); is much
more clear than click(function() {...}); unbind('click');
Similarly, 'bind' and 'one' have the same syntax. Again, I think
sometimes using click(...) and other times using one('click',...)
isn't as clear as using bind('click',...)/one('click',...).

Anyways, off my soap box now. In the long run, I don't think it really
matters. I know a bunch of the click/mouseover/etc type functions were
removed in version 1.1 (like oneclick and unclick and things like
that), so my thinking was the rest of the name based versions might
disappear in a future release and I'm trying to future proof. But I
don't know about that.

Again, this is mainly my opinion and shouldn't be interpreted as any
kind of official statement from the jQuery dev team.

--Erik


On 5/24/07, Jean Nascimento <[EMAIL PROTECTED]> wrote:
>
> But which is better and faster? bind or the click,mouseover, etc
>
> On 5/24/07, Erik Beeson <[EMAIL PROTECTED]> wrote:
> > Because the API for it is more consistent. Functionally it's the same as
> > what you had.
> >
> >
> > --Erik
> >
> >
> > On 5/24/07, zio budda < [EMAIL PROTECTED]> wrote:
> > > bind. Why bind ?
> > >
> > > M.
> > > --
> > > Michel 'ZioBudda' Morelli   [EMAIL PROTECTED]
> > > Consulenza sistemistica in ambito OpenSource.
> > > Sviluppo applicazioni web dinamiche (LAMP+Ajax)
> > > Telefono: +39-3939890025 --  Fax: +39-0291390660
> > >
> > > http://www.ziobudda.net ICQ: 58351764
> > > http://www.ziobuddalabs.it   Skype: zio_budda
> > > http://www.ajaxblog.it  MSN:
> > [EMAIL PROTECTED]
> > >
> > >
> > > 2007/5/24, Erik Beeson <[EMAIL PROTECTED]>:
> > >
> > > > At least on FF, the mousedown event has a boolean property called
> > ctrlKey:
> > > >
> > > > $(...).bind('mousedown', function(event) {
> > > >   if(event.ctrlKey) {
> > > > /* ctrl was down */
> > > >   } else {
> > > > /* ctrl wasn't down */
> > > >   }
> > > > });
> > > >
> > > > Not sure if that's cross browser or not. Be careful about using the ctrl
> > key as CTRL-clicking on stuff can already have special meaning (like opening
> > in a new tab in FF/Win or showing the right-click menu on OS X).
> > > >
> > > > --Erik
> > > >
> > > >
> > > >
> > > >
> > > > On 5/24/07, zio budda < [EMAIL PROTECTED]> wrote:
> > > > > Hi all. I'm newbie about jquery so sorry for the stupid question.
> > > > >
> > > > > I have this code:
> > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > <script>
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > var _mousedown = -1;
> > > > > var last = -1;
> > > > > var lastlast = -1;
> > > > > var now = -1;
> > > > > var first = -1;
> > > > > var shift = -1;
> > > > > $(document).ready( function() {
> > > > > $('div.interno').hover(
> > > > > //IN
> > > > > function() {
> > > > > if (_mousedown == 0) {
> > > > > $(this).css('background','#99');
> 

[jQuery] Re: Blur event

2007-05-24 Thread Jean Nascimento


Oww understood

really the jQuery bring us some hope with js LOL
after i thinked this is thing of Devil but now i know the IE is the HELL 4 us

On 5/24/07, Glen Lipka <[EMAIL PROTECTED]> wrote:

A closure!  Actually, I don't even know what the heck a closure is.  I mean,
I understand intellectually, but ask me to write one or explain it back and
I will fail.
But apparently this is one.

The reason to use this technique (and I agree, it should be used wisely) is
when you have a field called "choose username" and when you blur from it, it
erases your choice, and gives a little red error saying, "Sorry that
username is taken, try again." and focuses back on the field.  I have a case
for no value which lets blur happen normally.

Man, programming is hard.  Thank god I have jQuery so I can avoid it most of
the time.

Feature request for jQuery:
Blur should have a callback function.  Like slideUp.
Why doesn't everything have a callback?

Glen





On 5/24/07, Karl Rudd <[EMAIL PROTECTED]> wrote:
>
> If you're wanting the text field to retain focus no matter what then
> you should probably reconsider. It's not a very good thing from a UI
> design perspective. It is possible but it pretty much "locks up" the
> entire browser.
>
> Having given you the "don't shoot yourself or the user in the foot"
> warning, here's code to do it:
>
> $('input#MyTextInput').blur( function() {
> var input = this;
> setTimeout( function() {
> input.focus();
> }, 0);
> });
>
> Tested and working in IE and Firefox.
>
> Karl Rudd
>
> On 5/25/07, Glen Lipka <[EMAIL PROTECTED] > wrote:
> > Code sample:
> > $("input#MyTextInput").blur(
> >   function() {
> > setTimeout("$('#MyTextInput').focus()",0);
> >}
> > );
> >
> >  That works in FF.
> > --
> > $("input#MyTextInput").blur(
> >function() {
> >  $('#MyTextInput').focus();
> >}
> >  );
> >
> > That does not work in FF.
> > -
> >
> > Trying to re-focus back on an input after a blur event.
> > IE works in more circumstances, but FF does not.
> >
> > Is there an easier way?
> >
> > Glen
> >
>





--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Loading before teh DOM is ready

2007-05-24 Thread Jean Nascimento


some like that?

script language="JavaScript" type="text/javascript">
$("body").hide();
$("#loading").show();
$(document).ready(
function()
{
$("#loading").hide();

$(".calendario").datePicker({startDate:'01/01/2007', 
endDate:'31/12/2007'});  

//cria o menu
$('#list').clickMenu({arrowSrc:'imgs/arrow_right.gif', 
fadeTime:
100, subDelay: 100, mainDelay: 500});

$("body").show();
});


i´m creating the #loading by PHP
this works when nothing is submit, but when submit the form dont show
de #loading
only hides the body

and i tried before body too
only works in 1st time

On 5/24/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:


try adding the javascript right after the  tag.

 [jQuery stuff] 

~Sean




--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Blur event

2007-05-24 Thread Jean Nascimento


This is for what?? U wanna set the input always with focus???

On 5/24/07, Karl Rudd <[EMAIL PROTECTED]> wrote:


If you're wanting the text field to retain focus no matter what then
you should probably reconsider. It's not a very good thing from a UI
design perspective. It is possible but it pretty much "locks up" the
entire browser.

Having given you the "don't shoot yourself or the user in the foot"
warning, here's code to do it:

$('input#MyTextInput').blur( function() {
   var input = this;
   setTimeout( function() {
   input.focus();
   }, 0);
});

Tested and working in IE and Firefox.

Karl Rudd

On 5/25/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
> Code sample:
> $("input#MyTextInput").blur(
>   function() {
> setTimeout("$('#MyTextInput').focus()",0);
>}
> );
>
>  That works in FF.
> --
> $("input#MyTextInput").blur(
>function() {
>  $('#MyTextInput').focus();
>}
>  );
>
> That does not work in FF.
> -
>
> Trying to re-focus back on an input after a blur event.
> IE works in more circumstances, but FF does not.
>
> Is there an easier way?
>
> Glen
>




--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Weirdness in IE

2007-05-24 Thread Jean Nascimento


try u use append?

On 5/24/07, Joel Taylor <[EMAIL PROTECTED]> wrote:

nope, that didnt help either (seriously, I'm not normally that sloppy with
my code!) - I changed it back to the original, see what it does now.


On 5/24/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
>
> > $(document).ready(function(){
> > /*$("h1").after("");*/
> > $("h1").after(" > });
>
> You forgot to end you span tag:
> $(function(){
> $("h1").after("");
> });
>
>
> ~Sean
>
>
>




--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Performance tip

2007-05-24 Thread Jean Nascimento


Sorry I´m in dependency on Analysis of Algorithm for second time LOL
ps: is true.

On 5/24/07, Rob Desbois <[EMAIL PROTECTED]> wrote:

No, because then people might think it was just because of jQuery that a
looped function call is slow.
The avoidance of repeated unnecessary function calling inside loops is
something that any programmer in any language should look at and immediately
say "Yuck!" :-D

--rob



On 5/24/07, Jean Nascimento <[EMAIL PROTECTED]> wrote:
>
> I´m a javascript nooba, so thanks for the tip :D
>
> On 5/23/07, Gordon <[EMAIL PROTECTED]> wrote:
> >
> > It is one of those blindingly obvious things but also easy to forget.
> > I suppose the tip should be "if you find $ in a loop, find a way to
> > cache it".
> >
> > On May 23, 4:43 pm, "Rob Desbois" <[EMAIL PROTECTED] > wrote:
> > > Absolutely, no loop should call a determinate function with the same
> > > argument(s) on every iteration.
> > > In other words, if a function is called in a loop and it will return
the
> > > same value for each iteration take it OUT of the loop.
> > >
> > > Also Gordon, remember that no more memory is used here - in the slow
version
> > > the result from .children() has to be cached somewhere in a temporary
> > > variable internally (I would guess, my knowledge of JS internals is
> > > minimal). Making the temporary variable explicit will use no
additional
> > > memory.
> > >
> > > --rob
> > >
> > > On 5/23/07, Gordon <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > >
> > >
> > > > This one's probably blindingly obvious to anyone with any
significant
> > > > programming experience in javascript, but it's an easy one to forget
> > > > too.
> > >
> > > > Consider this code:
> > >
> > > > function fast ()
> > > > {
> > > > var myDivItems = $('#myDiv').children();
> > > > for (x = 0; x < 1000; x++)
> > > > {
> > > > myDivItems.length;
> > > > }
> > > > }
> > > > function slow ()
> > > > {
> > > > for (x = 0; x < 1000; x++)
> > > > {
> > > > $('#myDiv').children().length;
> > > > }
> > > > }
> > >
> > > > Both are functionally identical, but try profiling their run times
in
> > > > Firebug!
> > >
> > > > Here's the average run times I got from running each function 5
times
> > >
> > > > fast: 3.125ms
> > > > slow: 3146.875ms
> > >
> > > > One more line of code, a bit more memory used, but huge win in
loops.
> > >
> > > --
> > > Rob Desbois
> > > Eml: [EMAIL PROTECTED]
> > > Tel: 01452 760631
> > > Mob: 07946 705987
> > > "There's a whale there's a whale there's a whale fish" he cried, and
the
> > > whale was in full view.
> > > ...Then ooh welcome. Ahhh. Ooh mug welcome.
> >
> >
>
>
> --
>
> []´s Jean
> www.suissa.info
>
>Ethereal Agency
> www.etherealagency.com
>



--
Rob Desbois
Eml: [EMAIL PROTECTED]

Tel: 01452 760631
Mob: 07946 705987
"There's a whale there's a whale there's a whale fish" he cried, and the
whale was in full view.
...Then ooh welcome. Ahhh. Ooh mug welcome.



--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com


[jQuery] Re: Keypress on a div

2007-05-24 Thread Jean Nascimento


But which is better and faster? bind or the click,mouseover, etc

On 5/24/07, Erik Beeson <[EMAIL PROTECTED]> wrote:

Because the API for it is more consistent. Functionally it's the same as
what you had.


--Erik


On 5/24/07, zio budda < [EMAIL PROTECTED]> wrote:
> bind. Why bind ?
>
> M.
> --
> Michel 'ZioBudda' Morelli   [EMAIL PROTECTED]
> Consulenza sistemistica in ambito OpenSource.
> Sviluppo applicazioni web dinamiche (LAMP+Ajax)
> Telefono: +39-3939890025 --  Fax: +39-0291390660
>
> http://www.ziobudda.net ICQ: 58351764
> http://www.ziobuddalabs.it   Skype: zio_budda
> http://www.ajaxblog.it  MSN:
[EMAIL PROTECTED]
>
>
> 2007/5/24, Erik Beeson <[EMAIL PROTECTED]>:
>
> > At least on FF, the mousedown event has a boolean property called
ctrlKey:
> >
> > $(...).bind('mousedown', function(event) {
> >   if(event.ctrlKey) {
> > /* ctrl was down */
> >   } else {
> > /* ctrl wasn't down */
> >   }
> > });
> >
> > Not sure if that's cross browser or not. Be careful about using the ctrl
key as CTRL-clicking on stuff can already have special meaning (like opening
in a new tab in FF/Win or showing the right-click menu on OS X).
> >
> > --Erik
> >
> >
> >
> >
> > On 5/24/07, zio budda < [EMAIL PROTECTED]> wrote:
> > > Hi all. I'm newbie about jquery so sorry for the stupid question.
> > >
> > > I have this code:
> > >
> > > 
> > > 
> > > 
> > >