[jQuery] Make sub menu delay before disapper

2009-12-18 Thread Marco Barbosa
Hi all!

So I have this simple sub menu with Jquery.

The problem is that the child menu is like 2px below the parent, so
when the submenu appears I have to be very fast to mouseover it or
else it will disapper.

The sub menu is absolute positioned and I can't change that right now.

So how can I make the sub menu, once activated, stay like 1 second
before disappearing?

Here's the code:
(#community is the id of the li with a second level ul)

$(#community).mouseover( function() {

$(this).children(ul).css(display,block).animate({opacity:
1.0}, 3000);
}).mouseout( function() {

$(this).children(ul).animate({opacity: 1.0}, 3000).css
(display,none);
});

Note that I tried to use the animate for this but with no success.

Any ideas? Please any help is appreciated.


[jQuery] Re: setTimeout

2009-12-17 Thread Marco Barbosa
Hi!

Sorry to hop in this topic but it's always easier than creating a new
one :)

My problem is that I have a dropdown list, but the child list (li 
ul) is not exactly below the parent.
So when I leave the parent to hover the child, it disappears before I
have the chance.
This is not something I can change since this menu requires
position:absolute (at least for now)

So I though I could use setTimeout ?
before hiding setTimeout so the user has the chance to go to the
dropdown menu

This is my script:
$(#community).mouseover( function() {

$(this).children(ul).css(display,block).animate({opacity:
1.0}, 2000);
}).mouseout( function() {

$(this).children(ul).animate({opacity: 1.0}, 2000).css
(display,none);
});

Note that I was trying to use animate to achieve this. Stay there 2
seconds after showing up and before hiding it.

I already tried setTimeout with no success either:

$(#community).mouseover( function() {

$(this).children(ul).css(display,block);
}).mouseout( function() {
$(this).children(ul).setTimeout( 
function() {
 
$(this).children(ul).css(display,none);

},
1000 );css(display,none);
});

Could you point me in the right direction Michael ?

Do you think setTimeout could work?


[jQuery] Re: sliding previous/next content

2009-11-11 Thread Marco Barbosa
Hello again!

I've found this plugin that does exactly what I needed:
Cycle plugin - http://www.malsup.com/jquery/cycle/

You just set a container with a fixed size and overflow hidden.
The plugin does all the rest, pretty neat!

Just in case someone else runs into this post.

Thanks for your slide() clarification :)

~ Marco Barbosa

On 10 Nov, 20:04, Marco Barbosa marco.barbos...@gmail.com wrote:
 Hi Michel!

 Thanks for the reply!

 Not sure if there are plugins to simply slide up/down.

 I already tried with positioning instead of display:none , but using
 slideUp and slideDown.
 It almost worked but I couldn't figure it out what was missing. The
 last ul wouldn't show up.

 I'll give a try again using animate instead.

 Will post my result here later.

 On Nov 10, 6:22 pm, Michel Belleville michel.bellevi...@gmail.com
 wrote:

  Sorry for previous mail, I misclicked on send before finishing it.

  So :
  First try the examples for
  .slideUp()http://docs.jquery.com/Effects/slideUpand
  .slideDown() http://docs.jquery.com/Effects/slideDown. You'll notice
  slideUp() is a way to make an element disappear as if it was sliding up,
  and slideDown() is a way to make an element appear as if it was sliding
  down, as explained in the doc. That's not exactly what you're looking for
  apparently. What you are looking for is a way to move all the uls at once up
  or down.

  Now if I wanted to do that, I'd do it this way :

     - in the div#calendar, put another div.slider that'll actually be moving
     wrapping the uls
     - through css give div#calendar a relative positionning so it'll be the
     offset parent for div.slider, give div.sider a relative positionning too 
  so
     it'll also be an offset parent for the uls, make div#calendar overflow
     hidden so it'll act as a content window rather than get bigger to fit 
  around
     the uls
     - on click on previous / next, detect current ul, get the previous / next
     ul, read it's position using
  .position()http://docs.jquery.com/CSS/positionto determine how much
  sliding is needed for div.slider to slide it just
     right, then use .animate() http://docs.jquery.com/Effects/animate to
     trigger the slide

  Though there may very well already be plugins that do just what you need so
  check wether you will be re-inventing the wheel here.

  Michel Belleville

  2009/11/10 Michel Belleville michel.bellevi...@gmail.com

   First try the examples for 
   .slideUp()http://docs.jquery.com/Effects/slideUpand
   .slideDown() http://docs.jquery.com/Effects/slideDown. You'll notice
   slideUp() is a way to make an element disappear as if it was sliding up,
   and slideDown() is a way to make an element appear as if it was sliding
   down,

   Michel Belleville

   2009/11/10 Marco Barbosa marco.barbos...@gmail.com

   Hi all!

   So what I'm trying to do is so simple but it's not working..
   All I want to do is to slide up/down to the next/previous content.

   Here's the code:
   id=calendar
     a href=# class=arrowUpPrevious/a
     h3Calendar/h3
     ul class=events current
       liContent1/li
       liContent2/li
       liContent3/li
     /ul
     ul class=events
       liContent4/li
       liContent5/li
       liContent6/li
     /ul
     ul class=events
       liContent7/li
       liContent8/li
       liContent9/li
     /ul
     a href=# class=arrowDownNext/a
   /div

   Clicking arrow up down should bring up Content4, 5 and 6 and so on.

   Here's how I'm trying to do it:
   $('.arrowUp').click(function(){
      $('.events.current').removeClass(current).previous().slideDown
   (slow).addClass(current);
   });
   $('.arrowDown').click(function(){
      $('.events.current').removeClass(current).next().slideUp
   (slow).addClass(current);
   });

   the .events has display:none;
   and .events.current has display:block;

   What am I doing wrong?
   Is there a easier way to do this?


[jQuery] sliding previous/next content

2009-11-10 Thread Marco Barbosa
Hi all!

So what I'm trying to do is so simple but it's not working..
All I want to do is to slide up/down to the next/previous content.

Here's the code:
id=calendar
   a href=# class=arrowUpPrevious/a
   h3Calendar/h3
   ul class=events current
 liContent1/li
 liContent2/li
 liContent3/li
   /ul
   ul class=events
 liContent4/li
 liContent5/li
 liContent6/li
   /ul
   ul class=events
 liContent7/li
 liContent8/li
 liContent9/li
   /ul
   a href=# class=arrowDownNext/a
/div

Clicking arrow up down should bring up Content4, 5 and 6 and so on.

Here's how I'm trying to do it:
$('.arrowUp').click(function(){
$('.events.current').removeClass(current).previous().slideDown
(slow).addClass(current);
});
$('.arrowDown').click(function(){
$('.events.current').removeClass(current).next().slideUp
(slow).addClass(current);
});

the .events has display:none;
and .events.current has display:block;

What am I doing wrong?
Is there a easier way to do this?


[jQuery] Re: sliding previous/next content

2009-11-10 Thread Marco Barbosa
Hi Michel!

Thanks for the reply!

Not sure if there are plugins to simply slide up/down.

I already tried with positioning instead of display:none , but using
slideUp and slideDown.
It almost worked but I couldn't figure it out what was missing. The
last ul wouldn't show up.

I'll give a try again using animate instead.

Will post my result here later.


On Nov 10, 6:22 pm, Michel Belleville michel.bellevi...@gmail.com
wrote:
 Sorry for previous mail, I misclicked on send before finishing it.

 So :
 First try the examples for
 .slideUp()http://docs.jquery.com/Effects/slideUpand
 .slideDown() http://docs.jquery.com/Effects/slideDown. You'll notice
 slideUp() is a way to make an element disappear as if it was sliding up,
 and slideDown() is a way to make an element appear as if it was sliding
 down, as explained in the doc. That's not exactly what you're looking for
 apparently. What you are looking for is a way to move all the uls at once up
 or down.

 Now if I wanted to do that, I'd do it this way :

    - in the div#calendar, put another div.slider that'll actually be moving
    wrapping the uls
    - through css give div#calendar a relative positionning so it'll be the
    offset parent for div.slider, give div.sider a relative positionning too so
    it'll also be an offset parent for the uls, make div#calendar overflow
    hidden so it'll act as a content window rather than get bigger to fit 
 around
    the uls
    - on click on previous / next, detect current ul, get the previous / next
    ul, read it's position using
 .position()http://docs.jquery.com/CSS/positionto determine how much
 sliding is needed for div.slider to slide it just
    right, then use .animate() http://docs.jquery.com/Effects/animate to
    trigger the slide

 Though there may very well already be plugins that do just what you need so
 check wether you will be re-inventing the wheel here.

 Michel Belleville

 2009/11/10 Michel Belleville michel.bellevi...@gmail.com



  First try the examples for 
  .slideUp()http://docs.jquery.com/Effects/slideUpand
  .slideDown() http://docs.jquery.com/Effects/slideDown. You'll notice
  slideUp() is a way to make an element disappear as if it was sliding up,
  and slideDown() is a way to make an element appear as if it was sliding
  down,

  Michel Belleville

  2009/11/10 Marco Barbosa marco.barbos...@gmail.com

  Hi all!

  So what I'm trying to do is so simple but it's not working..
  All I want to do is to slide up/down to the next/previous content.

  Here's the code:
  id=calendar
    a href=# class=arrowUpPrevious/a
    h3Calendar/h3
    ul class=events current
      liContent1/li
      liContent2/li
      liContent3/li
    /ul
    ul class=events
      liContent4/li
      liContent5/li
      liContent6/li
    /ul
    ul class=events
      liContent7/li
      liContent8/li
      liContent9/li
    /ul
    a href=# class=arrowDownNext/a
  /div

  Clicking arrow up down should bring up Content4, 5 and 6 and so on.

  Here's how I'm trying to do it:
  $('.arrowUp').click(function(){
     $('.events.current').removeClass(current).previous().slideDown
  (slow).addClass(current);
  });
  $('.arrowDown').click(function(){
     $('.events.current').removeClass(current).next().slideUp
  (slow).addClass(current);
  });

  the .events has display:none;
  and .events.current has display:block;

  What am I doing wrong?
  Is there a easier way to do this?


[jQuery] Re: password initial value without masking ****

2009-10-20 Thread Marco Barbosa

Hmmm. This is more complicated than I thought.

waseem, having 2 input fields doesn't seem correct. Thought it might
work I will have to pass that solution for this specific site.

Liam, Your code didn't work either, I don't know why.

Jörn, this watermark plugin is interesting but I don't want to use
jquery ui on this site.
That's because I'm already using that cleanField function and it would
be redundant to have a plugin just for the login form.
Also I gave it a try and the label didn't stay inside the input. So If
i have to manually position it there, then it's another reason I will
pass this solution as well.

I though a simple jquery would do this.
I think I will leave it masked and use a tooltip or something.

Thanks guys!

On Oct 19, 5:54 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Instead of replacing the input, display a label above it. 
 Seehttp://wiki.jqueryui.com/Watermark

 Jörn

 On Mon, Oct 19, 2009 at 4:17 PM, Liam Potter radioactiv...@gmail.comwrote:





  Here is how I do it. Just markup the form like normal (I use a definition
  list to lay out my forms)

    $(input:password).each(function(){
        var $currentPass = $(this)
        $currentPass.css({opacity:0});
              $currentPass.before('input type=text value=Password
  class=removeit style=position:absolute;z-index:10; /');
              var $visiblePassword = $(.removeit);
              $visiblePassword.focus(function () {
            $(this).css({opacity:0});
            $currentPass.focus().css({opacity:1});
        });
                  $currentPass.blur( function () {
            if ( $currentPass.attr(value) ==  ){
                $currentPass.css({opacity:0});
                $visiblePassword.css({opacity:1}).attr(value,Password);
            }
        });
    });

  waseem sabjee wrote:

  ah yes i forgot.

  you would get access denied when tried to change an input type property

  the best way is to have two input types and just hide one and show the
  other

  but i have a solution for you
  the html

         !-- The following html of two input types - we gonna switch
  between them--
         input type=text class=textinput value=Passowrd /
         input type=password class=passinput value= /

  the css

         style type=text/css
             /*    first we need to hide the password input*/
             .passinput {
                 display:none;
             }
         /style

  the js

         script type=text/javascript
             $(function() {
                 // declare your input types
                 var textinput = $(.textinput);
                 var passinput = $(.passinput);
                 // on text input focus - hide text input and show and focus
  on password input
                 textinput.focus() {
                     textinput.blur();
                     textinput.hide();
                     passinput.show();
                     passinput.focus();
                 });
                 // on password input blud hide password input and show and
  focus on text input
                 passinput.blur(function() {
                     passinput.blur();
                     passinput.hide();
                     textinput.show();
                     textinput.focus();
                 });
             });
         /script

  On Mon, Oct 19, 2009 at 2:51 PM, Marco Barbosa 
  marco.barbos...@gmail.commailto:
  marco.barbos...@gmail.com wrote:

     Hi waseem!

     Thanks for your reply.

     Something's wrong with this line:
     $(#password).attr({type:'text'});

     I tried changing to:
     $(#password).attr('type','text'});

     but still no go.
     I have to comment out to get the other JS stuff on the site working.

     The rest of the code seems Ok. What could it be?

     I like your solution, pretty simple :)

     I was wondering if we could put this inside the cleanField function
     but I guess it's not necessary.

     ~Marco

     On Oct 19, 2:32 pm, waseem sabjee waseemsab...@gmail.com
     mailto:waseemsab...@gmail.com wrote:
      // set the initial type to text
      $(.mypasswordfield).attr({
        type:'text'

      });

      // on user focus - change type to password
      $(.mypasswordfield).focus(function() {
       $(.mypasswordfield).attr({
         type:'password'
       });

      });

      // on user blur - change type to back to text
      $(.mypasswordfield).blur(function() {
       $(.mypasswordfield).attr({
         type:'text'
       });

      });

      since text is an attribute we can change it.
      all im doing is changing the type between password and text on
     click and on
      blur
      let me know if this worked for you :)

      On Mon, Oct 19, 2009 at 11:21 AM, Marco Barbosa
      marco.barbos...@gmail.com mailto:marco.barbos...@gmail.comwrote:

       Hi!

       I'm trying to achieve something like the Facebook first page (when
       you're not logged in).

       I'm using this simple function/plugin

[jQuery] Re: password initial value without masking ****

2009-10-20 Thread Marco Barbosa

You were right Waseem.
Specially after Bi Jing confirmed. I think that is the best way.

If it doesn't work I wil go for background like Rupak suggested.

Thank you all for your help!

On Oct 20, 1:55 pm, rupak mandal rupakn...@gmail.com wrote:
 either you ca maintain two input element (like facebook), or make an image
 of passwordand  set the image to textbox background, on focus or click
 just remove the background-image.



 On Tue, Oct 20, 2009 at 2:09 PM, Bi Jing beco...@gmail.com wrote:
  For now, our project use two input elements to implement this, we still can
  not get easier way.
  Actually, not only password, but also text element, you need two inputs,
  one hidden one shown.

  Becoder.

  On Tue, Oct 20, 2009 at 4:08 PM, waseem sabjee 
  waseemsab...@gmail.comwrote:

  ok,why not absolutely position some text on a password box and hide that
  text on password box focus ?

  On Tue, Oct 20, 2009 at 10:05 AM, Marco Barbosa 
  marco.barbos...@gmail.com wrote:

  Hmmm. This is more complicated than I thought.

  waseem, having 2 input fields doesn't seem correct. Thought it might
  work I will have to pass that solution for this specific site.

  Liam, Your code didn't work either, I don't know why.

  Jörn, this watermark plugin is interesting but I don't want to use
  jquery ui on this site.
  That's because I'm already using that cleanField function and it would
  be redundant to have a plugin just for the login form.
  Also I gave it a try and the label didn't stay inside the input. So If
  i have to manually position it there, then it's another reason I will
  pass this solution as well.

  I though a simple jquery would do this.
  I think I will leave it masked and use a tooltip or something.

  Thanks guys!

  On Oct 19, 5:54 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
  wrote:
   Instead of replacing the input, display a label above it. Seehttp://
  wiki.jqueryui.com/Watermark

   Jörn

   On Mon, Oct 19, 2009 at 4:17 PM, Liam Potter radioactiv...@gmail.com
  wrote:

Here is how I do it. Just markup the form like normal (I use a
  definition
list to lay out my forms)

  $(input:password).each(function(){
      var $currentPass = $(this)
      $currentPass.css({opacity:0});
            $currentPass.before('input type=text value=Password
class=removeit style=position:absolute;z-index:10; /');
            var $visiblePassword = $(.removeit);
            $visiblePassword.focus(function () {
          $(this).css({opacity:0});
          $currentPass.focus().css({opacity:1});
      });
                $currentPass.blur( function () {
          if ( $currentPass.attr(value) ==  ){
              $currentPass.css({opacity:0});

  $visiblePassword.css({opacity:1}).attr(value,Password);
          }
      });
  });

waseem sabjee wrote:

ah yes i forgot.

you would get access denied when tried to change an input type
  property

the best way is to have two input types and just hide one and show
  the
other

but i have a solution for you
the html

       !-- The following html of two input types - we gonna switch
between them--
       input type=text class=textinput value=Passowrd /
       input type=password class=passinput value= /

the css

       style type=text/css
           /*    first we need to hide the password input*/
           .passinput {
               display:none;
           }
       /style

the js

       script type=text/javascript
           $(function() {
               // declare your input types
               var textinput = $(.textinput);
               var passinput = $(.passinput);
               // on text input focus - hide text input and show and
  focus
on password input
               textinput.focus() {
                   textinput.blur();
                   textinput.hide();
                   passinput.show();
                   passinput.focus();
               });
               // on password input blud hide password input and
  show and
focus on text input
               passinput.blur(function() {
                   passinput.blur();
                   passinput.hide();
                   textinput.show();
                   textinput.focus();
               });
           });
       /script

On Mon, Oct 19, 2009 at 2:51 PM, Marco Barbosa 
  marco.barbos...@gmail.commailto:
marco.barbos...@gmail.com wrote:

   Hi waseem!

   Thanks for your reply.

   Something's wrong with this line:
   $(#password).attr({type:'text'});

   I tried changing to:
   $(#password).attr('type','text'});

   but still no go.
   I have to comment out to get the other JS stuff on the site
  working.

   The rest of the code seems Ok. What could it be?

   I like your solution, pretty simple

[jQuery] password initial value without masking ****

2009-10-19 Thread Marco Barbosa

Hi!

I'm trying to achieve something like the Facebook first page (when
you're not logged in).

I'm using this simple function/plugin to clean the fields once you
click them:
$.fn.cleanField = function() {
return this.focus(function() {
if( this.value == this.defaultValue ) {
this.value = ;
}
}).blur(function() {
if( !this.value.length ) {
this.value = this.defaultValue;
}
});
};
// clean the fields
$(#login).cleanField();
$(#password).cleanField();

So If I click Login or Password, it will clean and the user can type
the new value.
It works good but there's a little usability problem here.

I want to display the Password field like: Your password here
instead of ***
But when the user types his/her password, it has to go back to 

So Initially it should be: Your login Your Password
And when the user clicks and starts typing it goes: My login
***

It's just the password field that masks the initial value by default.

If you check Facebook they managed to do that somehow.

Any ideas of how can I achieve this?


[jQuery] Re: password initial value without masking ****

2009-10-19 Thread Marco Barbosa

Hi waseem!

Thanks for your reply.

Something's wrong with this line:
$(#password).attr({type:'text'});

I tried changing to:
$(#password).attr('type','text'});

but still no go.
I have to comment out to get the other JS stuff on the site working.

The rest of the code seems Ok. What could it be?

I like your solution, pretty simple :)

I was wondering if we could put this inside the cleanField function
but I guess it's not necessary.

~Marco


On Oct 19, 2:32 pm, waseem sabjee waseemsab...@gmail.com wrote:
 // set the initial type to text
 $(.mypasswordfield).attr({
   type:'text'

 });

 // on user focus - change type to password
 $(.mypasswordfield).focus(function() {
  $(.mypasswordfield).attr({
    type:'password'
  });

 });

 // on user blur - change type to back to text
 $(.mypasswordfield).blur(function() {
  $(.mypasswordfield).attr({
    type:'text'
  });

 });

 since text is an attribute we can change it.
 all im doing is changing the type between password and text on click and on
 blur
 let me know if this worked for you :)

 On Mon, Oct 19, 2009 at 11:21 AM, Marco Barbosa
 marco.barbos...@gmail.comwrote:





  Hi!

  I'm trying to achieve something like the Facebook first page (when
  you're not logged in).

  I'm using this simple function/plugin to clean the fields once you
  click them:
  $.fn.cleanField = function() {
         return this.focus(function() {
                 if( this.value == this.defaultValue ) {
                         this.value = ;
                 }
         }).blur(function() {
                 if( !this.value.length ) {
                         this.value = this.defaultValue;
                 }
         });
  };
  // clean the fields
  $(#login).cleanField();
  $(#password).cleanField();

  So If I click Login or Password, it will clean and the user can type
  the new value.
  It works good but there's a little usability problem here.

  I want to display the Password field like: Your password here
  instead of ***
  But when the user types his/her password, it has to go back to 

  So Initially it should be: Your login Your Password
  And when the user clicks and starts typing it goes: My login
  ***

  It's just the password field that masks the initial value by default.

  If you check Facebook they managed to do that somehow.

  Any ideas of how can I achieve this?


[jQuery] update input value onblur

2009-09-05 Thread Marco

I'm learning JQuery and building a page with a table.
The table contains multiple tr's andd the tr's contains multiple td's.
The td's contain a input element.

The first td of a row contains a select element and the others a
text element.

Now I want to fire a AJAX when the onblur event is fired on the second
input text element to fill the fourth(4) element.
When its fire i want a loading span is visible for the user.

the following works for me when i have 2 input element with unique
id's.


 script type=text/JavaScript
jQuery(document).ready(function() {
jQuery('#voorraadcheckLoading').hide();
jQuery('#txt_product').blur(function(){
  jQuery('#txt_voorraad_status').val();
  jQuery('#voorraadcheckLoading').show();
  jQuery.post(ajax.php?page=voorraad_status, {
prod_id: jQuery('#txt_product').val()
  }, function(response){
jQuery('#voorraadstatusResult').fadeOut();
setTimeout(finishAjax('txt_voorraad_status', '+escape
(response)+'), 400);
  });
return false;
});
});

function finishAjax(id, response) {
  jQuery('#voorraadcheckLoading').hide();
  jQuery('#'+id).val(unescape(response));
} //finishAjax

/script


Now my form contains multiple tr's and td's with multiple input
element (array's) and I don't know how to fire the script on the 2
text input element and let it putt a value in de fourth(4) text
element.

I hope somebody can help me.

a screenshot is here
http://home.frijmann.nl/images/jquery-ajax-onblur.png



[jQuery] Problem Jquery Multiple Uploads

2009-08-24 Thread marco souza

Anybody know if there is any way to return a list of files


[jQuery] Re: retrieving DOM element with specific CSS class

2009-03-28 Thread Marco Elisio Oliveira Jardim
The jQuery('some_selector') method will retrieve an array of objects, no
matter how many items exists with that selector.

In your case you should use something like this:

jQuery('#slider.navigation a.selected')[0].id;
^^ (you
missed the array position of the element)


_
Lois Griffin: I’m a naughty girl and I need a spanking!
Peter Griffin: And I'm a paladin with 18 charisma and 97 hit-points, I can
use my helm of disintegration and do 1d4 damage as my half-mage elf wields
his +5 holy avenger.
Lois Griffin: Wait a minute, paladins can’t use the helm of disentegration!
Peter Griffin: oh — In that case then I’m a black guy.



On Sat, Mar 28, 2009 at 22:46, macsig sigbac...@gmail.com wrote:


 Hello guys, I'm trying to make some changes to the coda slider effect
 on jqueryfordesigners.com
 Basically what I want is changing the buttons every time I move from a
 panel to an other one.


 I have the code below:

 div id=slider
  ul class=navigation
lia href=#1 id=firstFIRST/a/li
lia href=#2 id=secondSECOND/a/li
lia href=#3 id=thirdTHIRD/a/li
  /ul
 ...
 /div

 and the link to the current panel have the class 'selected'

 Here the question: how can I retrieve the id of the link with the
 class 'selected'?

 I guess it should be something like:  $('#slider .navigation').find
 ('a').XXX('selected').id but I don't know how to put in place of XXX.


 Thanks


 Sig






[jQuery] Re: number of elements with a specific CSS class

2009-03-28 Thread Marco Elisio Oliveira Jardim
A simple

$('#slider .navigation li').length;

will make it. ;)


_
Lois Griffin: I’m a naughty girl and I need a spanking!
Peter Griffin: And I'm a paladin with 18 charisma and 97 hit-points, I can
use my helm of disintegration and do 1d4 damage as my half-mage elf wields
his +5 holy avenger.
Lois Griffin: Wait a minute, paladins can’t use the helm of disentegration!
Peter Griffin: oh — In that case then I’m a black guy.



On Sun, Mar 29, 2009 at 02:24, macsig sigbac...@gmail.com wrote:


 Hello guys,
 is there a way to know how many element have a specific CSS class?
 I have a list and I need to know how many items it contains.
 I guess it should be omething like:  $('#slider .navigation li'). ...
 Thanks


[jQuery] Re: Do you figure out how to do this?

2009-03-20 Thread Marco Elisio Oliveira Jardim
You need a JSONP callback for this:

http://docs.jquery.com/Getjson

But the other web app must support it...


_
Lois Griffin: I’m a naughty girl and I need a spanking!
Peter Griffin: And I'm a paladin with 18 charisma and 97 hit-points, I can
use my helm of disintegration and do 1d4 damage as my half-mage elf wields
his +5 holy avenger.
Lois Griffin: Wait a minute, paladins can’t use the helm of disentegration!
Peter Griffin: oh — In that case then I’m a black guy.


On Fri, Mar 20, 2009 at 00:24, James james.gp@gmail.com wrote:


 No, I believe that calling example1.mydomain.com from
 example2.mydomain.com will still not work. That is also considered a
 separate domain.

 On Mar 19, 4:47 am, Adrian Grigoras adrianc.grigo...@gmail.com
 wrote:
  If the call in in the same domain, but on another machine, it will
  work?
 
  For example, call example1.mydomain.com from example2.mydomain.com
 
  Thanks
 
  On Mar 19, 3:36 pm, MorningZ morni...@gmail.com wrote:
 
   I'm not sure who you are replying to, but regardless, the $.ajax code
   cannot call another domain
 
   you'll have to use an iframe tag or work out something on your
   server side code to call the remote domain and then call that code
   from your javascript  (pretty much using your server/code as a proxy)
 
   On Mar 19, 5:46 am, Adrian Grigoras adrianc.grigo...@gmail.com
   wrote:
 
I have the same question. I want to load some external file, for
example:http://www.google.com.
 
This is my code:
html
head
titlejQuery - Ajax dynamic content loading/title
script src=http://code.jquery.com/jquery-latest.js;
 type=text/
javascript/script
script type=text/javascript
function loadContent(id) {
$.ajax({
url: http://www.google.com;,
cache: false,
success: function(html){
$(#contentArea).append(html);
  }});
 
}
/script
/head
body onLoad=loadContent();
 
div id=contentArea style=margin: 20px 0px 10px 10px;
 border: 1px
solid #CCC; width: 780px; height: 250px; float: left;
nbsp;
/div
 
/body
/html



[jQuery] Re: submenu position: left or right

2008-12-01 Thread marco

i renewal my question.


[jQuery] [superfish] submenu position: left or right

2008-11-28 Thread marco

hi! i got a menu with many nested sub-menus. some sub-menus get out of
the page width because they are all open on the right of the parent.
can superfish open menus on the left if there is not enough space on
the right?

thanks
marco


[jQuery] Re: updated variable not pass to remote method

2008-07-07 Thread Marco

Hi,
I found this solution:

var token = 'somerandomstring';
$(.myform).validate({
submitHandler: function(form) {
ris = checkCaptcha();
if( ris == 1 )
{
form.submit();
} else
{
var validator = $(.myform).validate();
validator.showErrors({captcha: captcha is not correct.});
}
},
onkeyup: false,
onblur: false
});

function checkCaptcha()
{
var ris;
captcha = $(#captcha).val();
$.ajax({
type: GET,
async: false,
dataType: json,
url: captcha.php,
data: token=+token+captcha=+captcha,
success: function( data ){
ris = data.ris;
}
});
return ris;
}


[jQuery] [validate] updated variable not pass to remote method

2008-07-06 Thread Marco

Hi,
I use captcha to prevent spam in this way (token is a random string
needed to validate user input field)

var token = 'somerandomstring';
$(.myform).validate({
rules: {
captcha: {
required: true,
remote: /captcha.php?
t=+token
}
}

});

Now i need to refresh che captcha code, so I call this function:

function newCaptcha()
{
$.getJSON(/newCaptcha.php, function(data){
token = data.t;
   // some stuff
});

}

Why the validator doesn't pass the new token?


[jQuery] Re: Validate + Captcha + Remote

2008-07-04 Thread Marco

up


[jQuery] Re: [OT] twitter

2008-05-21 Thread marco

I'm also using Digsby since a few months and it's really a great
software. My only wish is that it would be more open to let people
create plugins themselves

On May 21, 8:42 am, Alexandre Plennevaux [EMAIL PROTECTED]
wrote:
 just found out digsby can be a twitter client. Great! Digsby manages now my
 msn, gtalk, facebook and twitter.

 thanks a lot for the feedback guys!



 On Wed, May 21, 2008 at 1:02 AM, Ariel Flesler [EMAIL PROTECTED] wrote:

  +1 for Gtalk

  --
  Ariel Flesler
 http://flesler.blogspot.com

  On 20 mayo, 16:54, Marcelo Wolfgang [EMAIL PROTECTED] wrote:
   I use Snitter with is a client that runs over Adobe AIR ( and you can
   try others, there are at least 3 different clients) or you can use only
   the website, subscribe to the jquery user and recieve updates by sms (
   if you are able to)

   Marcelo Wolfgang

   Alexandre Plennevaux wrote:
hi friends,

now that jquery uses twitter, i might give twitter a chance. Can you
recommend a good way to use it? A twitter client? Which?
i'm a bit afraid of the distraction it brings. but using it in my
Greader is not very satisfactory. Any clue, welcomed !

Thanks,

--
Alexandre Plennevaux
LAb[au]

   http://www.lab-au.com-Ocultar texto de la cita -

   - Mostrar texto de la cita -

 --
 Alexandre Plennevaux
 LAb[au]

 http://www.lab-au.com


[jQuery] Get body from an XHTML document loaded using an HTTP request

2008-05-06 Thread Marco

Hi!

This code seems not to work:

$.get(pag, function (data) {
 alert( $(body, data).html() );
});

Could someone Please help me?

The page I am trying to manipulating is the following:

=

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;

html xmlns=http://www.w3.org/1999/xhtml;

head

 meta http-equiv=Content-Type content=text/html; charset=UTF-8 /

 titleFAQ/title



link rel=stylesheet href=css/all.css media=all /

/head

body

!-- FAQ --

div id=faq

h1a name=faqFAQ/a/h1



pSome more text.../p


/div

!-- Fine FAQ --

/body

/html

=


[jQuery] Re: Rounded corners-canvas and ie6

2007-11-21 Thread marco

Yes, I ran into the same issue myself. I have not found a solution for
this myself.
I wonder how they did it on the demo site. (there the issue does not
appear)

marco

On Nov 21, 1:00 pm, polyrhythmic [EMAIL PROTECTED] wrote:
 I believe curvycorners supports borders, I'm not sure that there's a
 transparent corner jQuery plugin that also supports borders besides
 the canvas corners.  Weird bug, but such is IE.  I would also be
 interested in a solution.

 Charles

 On Nov 21, 7:21 am, caruso_g [EMAIL PROTECTED] wrote:



  I am still here,
  I was not able to find a solution on the net.
  Any Idea?

  Thanks again in advance for the help.

  On 20 Nov, 18:20, caruso_g [EMAIL PROTECTED] wrote:

   Hi guys,
   I implemented a rounded-corner-canvas into this project. I used it
   since its support to borders and a good anti-alias effect.
   But on IE6 I am having a strange issues I don't know how to solve:
   right and bottom right to the parent node of the rounded divs,
   canvases are not positioned to the 0/0 px coordinates but a pixel
   before, showing the border/background of the div beneath.
   Any idea?

   You can find the page at this 
   address:http://www.bonsai-studio.net/live_preview/miniblog3/
   While you can find a screenshot of the bug (?) 
   here:http://www.bonsai-studio.net/images/corners-issue.png

   Eventually, which plugin to round borders without images can I use
   which supports borders?

   Thanks in advace to anyone.- Hide quoted text -

 - Show quoted text -