[jQuery] Re: simple lightbox

2009-09-25 Thread Scott Haneda


This is a quick and dirty way to show you the basics of how you may  
want to approach it.  I wrote this off the top of my head, and will  
leave positioning up to you, but the basic concepts should be there: http://dl.getdropbox.com/u/340087/Drops/09.25.09/lightbox-617a096a-225212.html

--
Scott * If you contact me off list replace talklists@ with scott@ *

On Sep 25, 2009, at 9:37 PM, runrunforest wrote:


I want a really simple hard coded lightbox.

Can some one teach me how to trigger a div in the center of page, if i
click the close button inside, it will close back up and if i click
somewhere outside the div, it will also close. I guess just that
simple as that.




[jQuery] simple lightbox

2009-09-25 Thread runrunforest

Hi,

I want a really simple hard coded lightbox.

Can some one teach me how to trigger a div in the center of page, if i
click the close button inside, it will close back up and if i click
somewhere outside the div, it will also close. I guess just that
simple as that.


[jQuery] Re: getJSON callback not firing?

2009-09-25 Thread Rick Faircloth

Well...I'm a "self-taught", "learn-it-as-I-go", programmer.
So there are a lot of fundamentals that I probably don't know
that would be in the programming 101 class.

I was just speaking from the limited experience of changing a "post"
which was being used to just "get" some info from a query, to a "get" method
to see if the results were the same.  They were, so I just commented on
the face that the performance of that query with either method was the same.

I'll have to study up on "get" vs "post" so I can consider myself at
least a well-versed, basic programmer.



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MorningZ
Sent: Friday, September 25, 2009 11:19 PM
To: jQuery (English)
Subject: [jQuery] Re: getJSON callback not firing?


"the method as "post", occasionally venturing to use "get" when just
retrieving data,  just to see what might happen.nothing different. "

Wow, really?  knowing the difference between GET an POST are pretty
fundamental things to know as a programmer

http://www.google.com/search?q=get+vs+post

It's very important to understand the difference as browsers (mainly
IE) have issues with GET in some cases, and all browsers handle
caching differently between the two

On Sep 25, 6:28 pm, "Rick Faircloth"  wrote:
> Hang in there, Charlie!
>
> My head was very bloody from banging it against the wall when I first
> started
>
> down the AJAX road.  Now I'm finally getting some work done with it!  I
> almost
>
> gave up several times.
>
> fwiw, I have always used the $.ajax method without any problems and
> typically specify
>
> the method as "post", occasionally venturing to use "get" when just
> retrieving data,
>
> just to see what might happen.nothing different.
>
> (and actually, I recognized that censored expression, having been there!
:o)
>
> Rick
>
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Charlie Griefer
> Sent: Friday, September 25, 2009 2:06 PM
> To: jQuery (English)
> Subject: [jQuery] getJSON callback not firing?
>
> Hey all:
>
> I've read the docs and googled the heck out of this, but not seeing what
the
> problem is.
>
> I'm trying to get some data from the server via the getJSON() method.  I
do
> see a response in firebug and I've validated the response data at
> JSONLint.com.  However, the callback function simply will not fire.  I've
> tried to simplify things as much as possible.  The CFC returning the data
is
> in the same directory as the calling page.  The callback function, for
now,
> should only alert a simple text string (which has evolved from "hi" to
"foo"
> to a censored version below as the hours have passed).
>
> $(document).ready(function() {
>     $('a.players').click(function() {
>         $.getJSON(
>
>
'data.cfc?method=getPlayerByID&returnformat=JSON&queryformat=column&playerID
> =' + this.id,
>             function(data) {
>                 alert('i %!%##%* hate you');
>             });
>         return false;
>     });
>
> });
>
> Here's the response I receive:
>
>
{"ROWCOUNT":1,"COLUMNS":["PLAYERID","PLAYERNAME","PLAYERNUMBER","PLAYERPOSIT
>
ION","PLAYERIMG","PLAYERCOLLEGE"],"DATA":{"PlayerID":[1],"PlayerName":["Bard
> en,
>
Ramses"],"PlayerNumber":[13],"PlayerPosition":["WR"],"PlayerImg":["http:\/\/
>
assets.giants.com\/uploads\/players\/2FE2D3BDF4FB443D949D1D39B69ADC03.gif"],
> "PlayerCollege":["Cal Poly"]}}
>
> ...which when pasted into JSONLint returns valid.
>
> If anyone has any ideas, or if there's any additional information that I
can
> provide, I'm all ears.
>
> Thanks!
> Charlie
>
> --
> Charlie Grieferhttp://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.




[jQuery] Re: getJSON callback not firing?

2009-09-25 Thread MorningZ

"the method as "post", occasionally venturing to use "get" when just
retrieving data,  just to see what might happen.nothing different. "

Wow, really?  knowing the difference between GET an POST are pretty
fundamental things to know as a programmer

http://www.google.com/search?q=get+vs+post

It's very important to understand the difference as browsers (mainly
IE) have issues with GET in some cases, and all browsers handle
caching differently between the two

On Sep 25, 6:28 pm, "Rick Faircloth"  wrote:
> Hang in there, Charlie!
>
> My head was very bloody from banging it against the wall when I first
> started
>
> down the AJAX road.  Now I'm finally getting some work done with it!  I
> almost
>
> gave up several times.
>
> fwiw, I have always used the $.ajax method without any problems and
> typically specify
>
> the method as "post", occasionally venturing to use "get" when just
> retrieving data,
>
> just to see what might happen.nothing different.
>
> (and actually, I recognized that censored expression, having been there! :o)
>
> Rick
>
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Charlie Griefer
> Sent: Friday, September 25, 2009 2:06 PM
> To: jQuery (English)
> Subject: [jQuery] getJSON callback not firing?
>
> Hey all:
>
> I've read the docs and googled the heck out of this, but not seeing what the
> problem is.
>
> I'm trying to get some data from the server via the getJSON() method.  I do
> see a response in firebug and I've validated the response data at
> JSONLint.com.  However, the callback function simply will not fire.  I've
> tried to simplify things as much as possible.  The CFC returning the data is
> in the same directory as the calling page.  The callback function, for now,
> should only alert a simple text string (which has evolved from "hi" to "foo"
> to a censored version below as the hours have passed).
>
> $(document).ready(function() {
>     $('a.players').click(function() {
>         $.getJSON(
>
> 'data.cfc?method=getPlayerByID&returnformat=JSON&queryformat=column&playerID
> =' + this.id,
>             function(data) {
>                 alert('i %!%##%* hate you');
>             });
>         return false;
>     });
>
> });
>
> Here's the response I receive:
>
> {"ROWCOUNT":1,"COLUMNS":["PLAYERID","PLAYERNAME","PLAYERNUMBER","PLAYERPOSIT
> ION","PLAYERIMG","PLAYERCOLLEGE"],"DATA":{"PlayerID":[1],"PlayerName":["Bard
> en,
> Ramses"],"PlayerNumber":[13],"PlayerPosition":["WR"],"PlayerImg":["http:\/\/
> assets.giants.com\/uploads\/players\/2FE2D3BDF4FB443D949D1D39B69ADC03.gif"],
> "PlayerCollege":["Cal Poly"]}}
>
> ...which when pasted into JSONLint returns valid.
>
> If anyone has any ideas, or if there's any additional information that I can
> provide, I'm all ears.
>
> Thanks!
> Charlie
>
> --
> Charlie Grieferhttp://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.


[jQuery] Re: Trying to use fadein and fade out with mouseover and mouseout functions.

2009-09-25 Thread Aaron

Hi,  what I want is  to use a IF statement on the mouseout function.

So based on the conditions it will  use the fade out function when the
mouseout effect occures according to those conditions.

That means that  the conditions are  that  if the mouse moved off the
menus background  then as long it's not over a image link on the menu
background then fade out.

If the mouse is over a image link that is on the menu background then
don't fade out.

That is what I want.

The problem is that  currently  when the mouse goes over  the image
links that are on the menu background  the menu and image links would
fade out as if the mouse moved off the menu background.  I don't want
them I want the users to be able to put the mouse over image links
without the menu fading out .


[jQuery] Re: Prevent jagged text in IE

2009-09-25 Thread James

What happens if you set a solid background-color to the element that
holds the text?

On Sep 25, 3:08 pm, "Dave Maharaj :: WidePixels.com"
 wrote:
> Thanks,
>
> Will give it a shot.
>
> Dave
>
>   _  
>
> From: Rick Faircloth [mailto:r...@whitestonemedia.com]
> Sent: September-25-09 9:48 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Prevent jagged text in IE
>
> I include a reference to a file with this jQuery code in every page to solve
> that problem, Dave.
>
> Best solution I've found so far. I got it from someone, somewhere, but don't
> remember who.
>
> Rick
>
>               jQuery.fn.fadeIn = function(speed, callback) {
>
>               return this.animate({opacity: 'show'}, "750", function() {
>
>                      if (jQuery.browser.msie)  
>
>                      this.style.removeAttribute('filter');  
>
>                      if (jQuery.isFunction(callback))
>
>                      callback();  
>
>               });
>
>               };
>
>               jQuery.fn.fadeOut = function(speed, callback) {
>
>               return this.animate({opacity: 'hide'}, "750", function() {
>
>                      if (jQuery.browser.msie)  
>
>                      this.style.removeAttribute('filter');  
>
>                      if (jQuery.isFunction(callback))
>
>                      callback();  
>
>               });
>
>               };
>
>               jQuery.fn.fadeTo = function(speed,to,callback) {
>
>               return this.animate({opacity: to}, "750", function() {
>
>                      if (to == 1 && jQuery.browser.msie)  
>
>                      this.style.removeAttribute('filter');  
>
>                      if (jQuery.isFunction(callback))
>
>                      callback();  
>
>               });
>
>               };
>
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Michael Geary
> Sent: Friday, September 25, 2009 8:07 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Prevent jagged text in IE
>
> Make sure the text opacity is 100%. Don't fade it in. IE renders
> non-antialiased text when opacity is less than 100%.
>
> If that's not it, post a link to a test page.
>
> -Mike
>
> On Fri, Sep 25, 2009 at 4:56 PM, Dave Maharaj :: WidePixels.com
>
>  wrote:
>
> I have content that loads into a div and in every browser except IE it
> renders fine. In the wonderful IE it comes in jagged...sometimes it "snaps"
> after and looks normal but for the most part its all jagged. The page is a
> white bg with text rendering into of it. Howcan I fix this so it looks
> normal?
>
> Not using a crazy font, just font-family:Helvetica, Arial, sans-serif; 1em
>
> Ideas? Suggestions?
>
> Thanks
>
> Dave


[jQuery] Re: Elements with similar names

2009-09-25 Thread comslash.com

wow way to many of us jumped on that post at the same time

On Sep 25, 10:19 pm, "comslash.com"  wrote:
> try
>
> $('input[name^=tx_qtde]')
>
> try this page for reference on selectorshttp://docs.jquery.com/Selectors
>
> Chris
>
> On Sep 25, 10:12 pm, Carlos Santos  wrote:
>
> > I have in one form, many, many text fields with similar names such
> > as:
>
> > tx_qtde1
> > tx_qtde2
> > tx_qtde3
>
> > how i can select all this text fields without using a class, something
> > like:
>
> > $("tx_qtde * ")
>
> > where the * is the numbers.
>
> > Thanks for your time.
> > Carlos Santos


[jQuery] Re: Elements with similar names

2009-09-25 Thread comslash.com

try

$('input[name^=tx_qtde]')

try this page for reference on selectors http://docs.jquery.com/Selectors

Chris

On Sep 25, 10:12 pm, Carlos Santos  wrote:
> I have in one form, many, many text fields with similar names such
> as:
>
> tx_qtde1
> tx_qtde2
> tx_qtde3
>
> how i can select all this text fields without using a class, something
> like:
>
> $("tx_qtde * ")
>
> where the * is the numbers.
>
> Thanks for your time.
> Carlos Santos


[jQuery] Re: Elements with similar names

2009-09-25 Thread Charlie Griefer
$('input[name^=tx_qtde]')

See "Attribute Filters" at http://docs.jquery.com/Selectors

On Fri, Sep 25, 2009 at 7:12 PM, Carlos Santos wrote:

>
> I have in one form, many, many text fields with similar names such
> as:
>
> tx_qtde1
> tx_qtde2
> tx_qtde3
>
> how i can select all this text fields without using a class, something
> like:
>
> $("tx_qtde * ")
>
> where the * is the numbers.
>
> Thanks for your time.
> Carlos Santos




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: Elements with similar names

2009-09-25 Thread James

http://docs.jquery.com/Selectors
Look at the Attribute filters.

Assuming they're all INPUT fields:
$("input[name^=tx_qtde]")
which means all input fields with NAME that begins with 'tx_qtde'

Otherwise you can just drop the 'input'
$("[name^=tx_qtde]")
but it'll look through all element types.

On Sep 25, 4:12 pm, Carlos Santos  wrote:
> I have in one form, many, many text fields with similar names such
> as:
>
> tx_qtde1
> tx_qtde2
> tx_qtde3
>
> how i can select all this text fields without using a class, something
> like:
>
> $("tx_qtde * ")
>
> where the * is the numbers.
>
> Thanks for your time.
> Carlos Santos


[jQuery] Re: Ajax load function - different php each time?

2009-09-25 Thread James

Pass in certain GET or POST data based on the request.

$("#DIV1...").load(some.php?id=dothis);
$("#DIV2...").load(some.php?id=dothat);
$("#DIV3...").load(some.php?id=monkeyseemonkeydo);

On Sep 25, 4:04 am, thodoris  wrote:
> I am developing a webpage that is jquery powered. Many div-hotspots in
> the page is ajax powered and they should update dynamically. For
> example
> number of ratings
> average rating
> number that a video is favoured
>
> Now i am doing this:
> $("#DIV1...").load(some1.php);
> $("#DIV2...").load(some2.php);
> $("#DIV3...").load(some3.php);
>
> But the number of .php files are increasing too much. Is there another
> idea except to have one .php with
> many IF ELSE inside?
>
> thanks


[jQuery] Elements with similar names

2009-09-25 Thread Carlos Santos

I have in one form, many, many text fields with similar names such
as:

tx_qtde1
tx_qtde2
tx_qtde3

how i can select all this text fields without using a class, something
like:

$("tx_qtde * ")

where the * is the numbers.

Thanks for your time.
Carlos Santos


[jQuery] Re: marking a link as visited

2009-09-25 Thread James

The CSS visited is triggered by whether it's in the browser history.
Since they're not really adding an entry to the history, you'll
probably need a workaround. Perhaps saving the link ID (or session ID
to data elsewhere) in a persistent cookie, and changing the style of
the link based on whether it's stored in the user's cookie or not.

If there is a user login, they you can probably store the all info in
a database.

On Sep 25, 8:03 am, RealMason  wrote:
> I'm using jquery.embedquicktime.js to play an mp3. Sometimes I have a
> dozen different mp3s on a page. When a user clicks on the graphical
> play button, the button is replaced with the Quicktime controller bar.
> This is all expected behavior.
>
> Since the link doesn't actually go anywhere, the link doesn't ever get
> "visited" and so when a user comes back to the page, they have no
> visual clues as to what mp3s they have already listed to. I'm very
> familiar with controlling this behavior with the css pseudo classes
> (link, visted, hover, active). But since jquery is just doing a
> "replace", the link is truly never visited.
>
> Any ideas of how to mark that link as visited?


[jQuery] Re: How to rename cloned element id (increase by one)?

2009-09-25 Thread comslash.com

I haven't test this but its modified from another set of code i have
that is working to do this

var idNumber = 1;

function addElement(id){
if($('#span1').html()){
$('#span1').append($('#' + id + idNumber).clone());

$('#span1 #' + id + idNumber).attr('id', '#' + id + (idNumber + 
1));

idNumber++;
}
}

Here is my original code ...

// form effects
function addRequest(){

$('#genList').append($('#genItem.template').clone());

genNumber++;

$('#genList #genItem.template').removeClass('template').attr('id',
'genItem_' + genNumber).fadeIn('slow').find('input,select').each
(function(){
$(this).attr('name', $(this).attr('name') + '[' + genNumber + 
']');
});

}

Chris

On Sep 25, 6:31 pm, jan1979  wrote:
> Hello.
>
> I have following code:
>
>   function addElement(id) {    
>     $(document).ready(function(){  
>         if ( $("#span1") ) {
>            $(id).clone().prependTo("#span1");
>         }      
>     });  
>
>   }
>
> How can I rename cloned element? Should be fine to increase its name by one,
> e.g.: original id1 into cloned id2 and so on.
> --
> View this message in 
> context:http://www.nabble.com/How-to-rename-cloned-element-id-%28increase-by-...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Prevent jagged text in IE

2009-09-25 Thread Dave Maharaj :: WidePixels.com
Thanks,
 
Will give it a shot.
 
Dave

  _  

From: Rick Faircloth [mailto:r...@whitestonemedia.com] 
Sent: September-25-09 9:48 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Prevent jagged text in IE



I include a reference to a file with this jQuery code in every page to solve
that problem, Dave.

Best solution I've found so far. I got it from someone, somewhere, but don't
remember who.

 

Rick

 

  jQuery.fn.fadeIn = function(speed, callback) { 

  return this.animate({opacity: 'show'}, "750", function() { 

 if (jQuery.browser.msie)  

 this.style.removeAttribute('filter');  

 if (jQuery.isFunction(callback)) 

 callback();  

  }); 

  }; 

 

  jQuery.fn.fadeOut = function(speed, callback) { 

  return this.animate({opacity: 'hide'}, "750", function() { 

 if (jQuery.browser.msie)  

 this.style.removeAttribute('filter');  

 if (jQuery.isFunction(callback)) 

 callback();  

  }); 

  }; 

 

  jQuery.fn.fadeTo = function(speed,to,callback) { 

  return this.animate({opacity: to}, "750", function() { 

 if (to == 1 && jQuery.browser.msie)  

 this.style.removeAttribute('filter');  

 if (jQuery.isFunction(callback)) 

 callback();  

  }); 

  };

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Michael Geary
Sent: Friday, September 25, 2009 8:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Prevent jagged text in IE

 

Make sure the text opacity is 100%. Don't fade it in. IE renders
non-antialiased text when opacity is less than 100%.

If that's not it, post a link to a test page.

-Mike

On Fri, Sep 25, 2009 at 4:56 PM, Dave Maharaj :: WidePixels.com
 wrote:

I have content that loads into a div and in every browser except IE it
renders fine. In the wonderful IE it comes in jagged...sometimes it "snaps"
after and looks normal but for the most part its all jagged. The page is a
white bg with text rendering into of it. Howcan I fix this so it looks
normal?

Not using a crazy font, just font-family:Helvetica, Arial, sans-serif; 1em

 

Ideas? Suggestions?

 

Thanks

 

Dave 

 



[jQuery] Re: How to rename cloned element id (increase by one)?

2009-09-25 Thread brian

But what if there's already a #span2 in the document?

Perhaps it would be better to give it the ID span1_1 (or similar).

On Fri, Sep 25, 2009 at 6:31 PM, jan1979  wrote:
>
>
> Hello.
>
> I have following code:
>
>  function addElement(id) {
>    $(document).ready(function(){
>        if ( $("#span1") ) {
>           $(id).clone().prependTo("#span1");
>        }
>    });
>
>  }
>
> How can I rename cloned element? Should be fine to increase its name by one,
> e.g.: original id1 into cloned id2 and so on.
> --
> View this message in context: 
> http://www.nabble.com/How-to-rename-cloned-element-id-%28increase-by-one%29--tp25620242s27240p25620242.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: Prevent jagged text in IE

2009-09-25 Thread Rick Faircloth
I include a reference to a file with this jQuery code in every page to solve
that problem, Dave.

Best solution I've found so far. I got it from someone, somewhere, but don't
remember who.

 

Rick

 

  jQuery.fn.fadeIn = function(speed, callback) { 

  return this.animate({opacity: 'show'}, "750", function() { 

 if (jQuery.browser.msie)  

 this.style.removeAttribute('filter');  

 if (jQuery.isFunction(callback)) 

 callback();  

  }); 

  }; 

 

  jQuery.fn.fadeOut = function(speed, callback) { 

  return this.animate({opacity: 'hide'}, "750", function() { 

 if (jQuery.browser.msie)  

 this.style.removeAttribute('filter');  

 if (jQuery.isFunction(callback)) 

 callback();  

  }); 

  }; 

 

  jQuery.fn.fadeTo = function(speed,to,callback) { 

  return this.animate({opacity: to}, "750", function() { 

 if (to == 1 && jQuery.browser.msie)  

 this.style.removeAttribute('filter');  

 if (jQuery.isFunction(callback)) 

 callback();  

  }); 

  };

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Michael Geary
Sent: Friday, September 25, 2009 8:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Prevent jagged text in IE

 

Make sure the text opacity is 100%. Don't fade it in. IE renders
non-antialiased text when opacity is less than 100%.

If that's not it, post a link to a test page.

-Mike

On Fri, Sep 25, 2009 at 4:56 PM, Dave Maharaj :: WidePixels.com
 wrote:

I have content that loads into a div and in every browser except IE it
renders fine. In the wonderful IE it comes in jagged...sometimes it "snaps"
after and looks normal but for the most part its all jagged. The page is a
white bg with text rendering into of it. Howcan I fix this so it looks
normal?

Not using a crazy font, just font-family:Helvetica, Arial, sans-serif; 1em

 

Ideas? Suggestions?

 

Thanks

 

Dave 

 



[jQuery] Re: Prevent jagged text in IE

2009-09-25 Thread Michael Geary
Make sure the text opacity is 100%. Don't fade it in. IE renders
non-antialiased text when opacity is less than 100%.

If that's not it, post a link to a test page.

-Mike

On Fri, Sep 25, 2009 at 4:56 PM, Dave Maharaj :: WidePixels.com <
d...@widepixels.com> wrote:

>  I have content that loads into a div and in every browser except IE it
> renders fine. In the wonderful IE it comes in jagged...sometimes it "snaps"
> after and looks normal but for the most part its all jagged. The page is a
> white bg with text rendering into of it. Howcan I fix this so it looks
> normal?
> Not using a crazy font, just font-family:Helvetica, Arial, sans-serif; 1em
>
> Ideas? Suggestions?
>
> Thanks
>
> Dave
>


[jQuery] Prevent jagged text in IE

2009-09-25 Thread Dave Maharaj :: WidePixels.com
I have content that loads into a div and in every browser except IE it
renders fine. In the wonderful IE it comes in jagged...sometimes it "snaps"
after and looks normal but for the most part its all jagged. The page is a
white bg with text rendering into of it. Howcan I fix this so it looks
normal?
Not using a crazy font, just font-family:Helvetica, Arial, sans-serif; 1em
 
Ideas? Suggestions?
 
Thanks
 
Dave 


[jQuery] Re: Trying to use fadein and fade out with mouseover and mouseout functions.

2009-09-25 Thread Aaron

no, the problem I have is that I set a mouseout function from jquery
on the menus background.

This background is a box blue square. On this square is buttons that
once clicked takes you to different pages. These buttons are more
linke image links.

Well when the mouse moves over to the image links the menu background
and image links fades out because of the function mouseout. The
mouseout function is used on the menus background  so if the mouse is
not over the menus background  then it fades out the menu.

So when the mouse goes over the image links it detects the mouse is
not over the menu background causing a menu fade out.

What I want to do is make a if statement condition that will only make
the fade out function only if the mouse moved off the menus
background  that is not on any of the image links on the menus
background.  So  I want a if statement that will fade out the menu
only if the mouse moved off the menus background  and onto anything
else then the menus background and the image links on the menus
background.


I am making nothing but a fade in menu. when the person puts the mouse
over the users image a menu fades in.

I got a plain blank blue box that has image links on this box. THe
problem is that  I want the blank box with the image links to fade
out  only when the mouse went over the menu box and then goes out of
that box. I don't want a fade out when the mouse is over the box and
if the mouse goes over the image links then it would fade out.



On Sep 25, 5:41 am, "ryan.j"  wrote:
> if i'm reading your question right, on the menu button'smouseover
> function you could call $('#menu').stop() to end any animation
> effects.
>
> http://docs.jquery.com/Effects/stop
>
> copy paste some code in jsbin.com if you can, it's always easier to
> sort stuff like this with code to look at.
>
> On Sep 25, 4:55 am, "shyhockey...@gmail.com" 
> wrote:
>
> > Hi, I am  usingthe fade in and fade out  and mouse over and mouse
> > out.
>
> > What I am doing is creating a menu that fades in when the mouse if
> > over the users image.
>
> > The problem I run into is that when the background of the menu fades
> > in with the buttons which are links. I notice that if you move the
> > mouse over the buttons/links the menu and buttons fade out.
>
> > I have 2 elements one is the menus background and the other element is
> > the buttons/links on top of the background.
>
> > I have a fade out command when the mouse it off the menu background.
> > So I am guessing when the mouse goes over the links/buttons it acts as
> > if the mouse isn't no longer over the menu background element causing
> > a fade out effect.
>
> > What can I do to prevent  the menu fading out when the mouse is over
> > the buttons that are links.
>
> > I want the users to be able to put their mouses on the buttons and be
> > able to click on the buttons without the menu fading out but only fade
> > out if the mouse is not longer on the background of the menu and is
> > not over any of the buttons on the menus background.
>
> > I was woundering if I should do a if statement to check the conditions
> > which would be where the mouse is over.
>
> > If the mouse is over either the menu background meaning the menu or is
> > over the buttons on the menu background meaning the opitions in the
> > menu. Then don't do a fade out  only do a fade out if the mouse is not
> > over  either the buttons or the menu itself.
>
> > how   could I do this?


[jQuery] How to rename cloned element id (increase by one)?

2009-09-25 Thread jan1979


Hello.

I have following code:

  function addElement(id) { 
$(document).ready(function(){  
if ( $("#span1") ) {
   $(id).clone().prependTo("#span1");
}   
});  

  }

How can I rename cloned element? Should be fine to increase its name by one,
e.g.: original id1 into cloned id2 and so on.
-- 
View this message in context: 
http://www.nabble.com/How-to-rename-cloned-element-id-%28increase-by-one%29--tp25620242s27240p25620242.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: getJSON callback not firing?

2009-09-25 Thread Rick Faircloth
Hang in there, Charlie!

 

My head was very bloody from banging it against the wall when I first
started

down the AJAX road.  Now I'm finally getting some work done with it!  I
almost

gave up several times.

 

fwiw, I have always used the $.ajax method without any problems and
typically specify

the method as "post", occasionally venturing to use "get" when just
retrieving data,

just to see what might happen.nothing different.

 

(and actually, I recognized that censored expression, having been there! :o)

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Charlie Griefer
Sent: Friday, September 25, 2009 2:06 PM
To: jQuery (English)
Subject: [jQuery] getJSON callback not firing?

 

Hey all:

I've read the docs and googled the heck out of this, but not seeing what the
problem is.

I'm trying to get some data from the server via the getJSON() method.  I do
see a response in firebug and I've validated the response data at
JSONLint.com.  However, the callback function simply will not fire.  I've
tried to simplify things as much as possible.  The CFC returning the data is
in the same directory as the calling page.  The callback function, for now,
should only alert a simple text string (which has evolved from "hi" to "foo"
to a censored version below as the hours have passed).

$(document).ready(function() {
$('a.players').click(function() {
$.getJSON(
 
'data.cfc?method=getPlayerByID&returnformat=JSON&queryformat=column&playerID
=' + this.id,
function(data) {
alert('i %!%##%* hate you');
});
return false;
});
});

Here's the response I receive:

{"ROWCOUNT":1,"COLUMNS":["PLAYERID","PLAYERNAME","PLAYERNUMBER","PLAYERPOSIT
ION","PLAYERIMG","PLAYERCOLLEGE"],"DATA":{"PlayerID":[1],"PlayerName":["Bard
en,
Ramses"],"PlayerNumber":[13],"PlayerPosition":["WR"],"PlayerImg":["http:\/\/
assets.giants.com\/uploads\/players\/2FE2D3BDF4FB443D949D1D39B69ADC03.gif"],
"PlayerCollege":["Cal Poly"]}}

...which when pasted into JSONLint returns valid.

If anyone has any ideas, or if there's any additional information that I can
provide, I'm all ears.

Thanks!
Charlie

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.



[jQuery] Re: if opera...... else

2009-09-25 Thread KeeganWatkins

hi a1anm,

if it's a CSS property, you can always determine that without relying
on the deprecated $.browser object...

$(function() {
// Check for the property you are interested in. Will be a
Boolean value
var opera = typeof $("body")[0].style["OperaOnlyCSSProp"] ===
"undefined";

if (opera) {
// do something
}
});

On Sep 22, 9:31 pm, a1anm  wrote:
> it's a css property so I'm not sure if checking to see if it is
> supported if possible.  The link you posted did the trick though.
> thanks.
>
> On Sep 22, 9:37 pm, MorningZ  wrote:
>
> > While it's recommended to look for features/support more than actual
> > browser type, jQuery.browser is still in the library
>
> >http://docs.jquery.com/Utilities/jQuery.browser
>
> > On Sep 22, 9:25 pm, a1anm  wrote:
>
> > > Hi,
>
> > > I would like to output the followin content if the browser isn't
> > > opera:
>
> > >                 
> > >                          > > onclick="homeSlide()">home
> > >                          > > onclick="aboutSlide()">about
> > >                         portfolio
> > >                          > > onclick="servicesSlide()">services > > li>
> > >                          > > onclick="contactSlide()">contact > > li>
> > >                         
>
> > > If the browser is opera I would like to output something slightly
> > > different.
>
> > > How would I do this?
>
> > > Thanks!


[jQuery] Re: validate - if "other" checked --> require input box

2009-09-25 Thread KeeganWatkins

are you using the validate plugin? i'm not familiar with it at all,
but for a simple validation like this you could do:

// DOM-ready handler
$(function() {
// Listen for "onsubmit" events for the form
$("#signupForm").submit(function() {
// Get the checkbox
var checkbox = $("#chkStatus5");
// True or false based on the checkbox
var checked = checkbox[0].checked;

// If its checked...
if (checked) {
// ...grab the textfield...
var text = $("#textfield");
// ...and its value
var val = text.val();

// If the textfield is empty...
if (val === "") {
// ...validation failed,
// so do something!
}
}
});
});

hope that helps.

On Sep 21, 8:38 pm, ripcurlksm  wrote:
> I have a "How did you hear about us?" with a series of checkboxes that is
> working great, however there is an option for "Other", where they can fill
> out their answer.
>
> I want to modify the script so if the checkbox for Other is selected, they
> are required to fill in the input box.
>
> I have this working here, but I cant get the input box to be required if
> "other" is selected:http://psylicyde.com/misc/jquery-validate/demo/test.html
> --
> View this message in 
> context:http://www.nabble.com/validate---if-%22other%22-checked---%3E-require...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Each function gives errors in IE6

2009-09-25 Thread KeeganWatkins

hey Shane,

Nick's comments above simply reinforce the need for explicit variable
declaration. ignoring the "var" keyword, even when picking names that
don't collide with properties of the window object, is a dangerous
practice. it leads to hard-to-spot bugs, scope issues, and a whole
mess of other problems.

furthermore, implicit assignment (ignoring the "var" keyword to scope
a variable globally) has some quirks in relation to overwriting
properties of the window. from an article by kangax (http://
thinkweb2.com/projects/prototype/detecting-global-variable-leaks/):

"To be more precise, undeclared assignment actually results in global
property assignment, not global variable declaration. The difference
between two is rather subtle: variable declaration creates non-
deletable property of a global object, whereas explicit or implicit
property assignment creates deletable one. Another peculiarity can be
observed in IE, where global property assignment is disallowed if
there's an element in a document with the same-named ID or NAME value.
Global variable declaration, on the other hand, quietly overwrites
existing property in cases like this. "

Effectively, outside of any other code, the statements:

top = "someValue";
var top = "someValue";

both produce a globally scoped variable named "top" with a value of
"someValue". in the first example, however, because implicit
assignment is used AND "top" is an existing property of the global
object (window in the case of the browser) IE chokes. there is a
wonderful solution that couldn't be easier to remember:

don't omit the "var" keyword. ever. :)

hope that helps!



On Sep 24, 6:58 am, Nick Fitzsimons  wrote:
> 2009/9/24 Shane Riley :
>
>
>
> > Weird double post. Found the issue. For some reason declaring the
> > variable worked. So I changed it to:
> > var  top = (parseInt($(this).height()) / 2) - 6;
>
> That's because "top" is already defined as a synonym for the top-level
> window object, and IE gets upset if you try to overwrite it.
>
> I think you'd get the same "Not implemented" error if you tried to
> assign values to the global "self", "parent", and "window" properties
> too. Assuming you're not running in a frame or an iframe, "self",
> "top", "parent", and "window" all refer to the same object. In a frame
> or iframe, "self" and "window" will refer to the framed document's
> "window", and "top" will refer to the "window" object of the very
> topmost document, while "parent" will refer to the "window" object of
> the document containing the frame, which is not the same as "top" if
> you have nested frames/iframes.
>
> Regards,
>
> Nick.
> --
> Nick Fitzsimonshttp://www.nickfitz.co.uk/


[jQuery] Re: Wait until animation completed - callback?

2009-09-25 Thread William Chang

I don't know how complex the user interface you're making, but if
you're asking for a callback after completing the "slideToggle()"
animation, then overload the method with a second argument which is
the callback function.

$('#51').slideToggle('fast, function() {
// Do something after element's animation completes.
});

If you're dealing with multiple items with animation and don't want
them to overlap the animation, then try using jQuery to manipulate the
"class" attribute to store the state (e.g. "slide_started",
"slide_ended"). I don't think using the timeout is the best way.

Good Luck,
William Chang
http://www.williamchang.org
http://www.babybluebox.com

On Sep 25, 4:23 pm, Merlin  wrote:
> The timeout sounds logical. I would like to try it, but somehow jquery
> does not know that 
> function:http://docs.jquery.com/Special:Search?ns0=1&search=setTimeout&go=
>
> I am pretty new to jquery. Could you post some code that fits into
> this one:
> onmouseover="$('#51').slideToggle('fast');$('.subcategories:not
> (#51)').hide(700);"
>
> Thanks!!
>
> On Sep 25, 4:42 pm, "ryan.j"  wrote:
>
>
>
> > the problem with jquery animation effects is that you can easily chain
> > effects on a single element, but unless you specify a timer of some
> > description or utilise the callback, effects on different elements
> > will execute simultaneously as you're finding.
>
> > unfortunately you really aren't going to know how far into the
> > animation it is (you can find out by checking the opacity of the el,
> > but that's probably A Very Bad Idea) so whilst it seems like the most
> > obvious method, if you want to just stop  the new mouseover func
> > executing until the animation has finished you'd need to make the
> > mouseover function setTimeout("yourActualFunction("+el.attr('id')+")",
> > x)  where x is the max length the anim could be.
>
> > you might be able to do something clever with a conditional to
> > determine if there was a menu animation happening on the initial
> > mouseover event, and if there was checking the element now under the
> > cursor in the callback, but since you have limited access to the
> > callback of any existing events in progress you're always going to hit
> > the problem of not being able to fully utilise that.
>
> > i'd be tempted to .stop() anything that's :animated on mouseover
> > before you start the new .fadeTo()   ;)
>
> > On Sep 25, 2:12 pm,Merlin wrote:
>
> > > does nobody have an idea? :-(
>
> > > On Sep 23, 5:13 pm,Merlin wrote:
>
> > > > Hi there,
>
> > > > I am building huge list with subcategories in each category that fade
> > > > out once the mouse is placed over the category. It works great, BUT
> > > > the problem is, if your mouse goes down the list vertically and the
> > > > subcategories are fiew, then the obove subcategories fade out and your
> > > > mouse is over the next category which is causing the next menu to fade
> > > > in.
>
> > > > I would need a way to make jquerywaitto fade out the next menüuntil
> > > > the last one has disapeared. An area would be good, if the mouse
> > > > leaves the subcategory area fade out or similar.
>
> > > > Do you believe the callback function might be a solution? I could not
> > > > think about how. Here is the code I am using:
> > > > onmouseover="$('#51').slideToggle('fast');$('.subcategories:not
> > > > (#51)').hide(700);"
>
> > > > Thank you for any help!!
>
> > > >Merlin


[jQuery] Re: Unlock Documentation

2009-09-25 Thread Scott Haneda


I went through all the plug-ins pages last night.  There are a good  
deal, 10% maybe, that 404 or go to the wrong place.  If I go in and  
delete those, that is all I am going to be doing, deletes.  Will these  
be rolled  back since I am only deleting?  Should they even be  
deleted?  Should I try to find a new link that is not 404?  What is  
the best approach?

--
Scott * If you contact me off list replace talklists@ with scott@ *

On Sep 24, 2009, at 1:48 AM, Jörn Zaefferer wrote:



As Karl mentioned, users registered for more then 24h can edit all
pages, with just a few exceptions, like the wiki homepage and the
About page.

So, could you guys be a bit more specific with your critique of
existing documentation?




[jQuery] Re: Convert MooTools to jQuery

2009-09-25 Thread KeeganWatkins

hi GonzoDesign -

this is a straight port. i'm not that familiar with mootools, so one
aspect that may be off is the selection of elements. i'm assuming $
('europe') returns the element with an ID of "europe" but if not
you'll need to change the ported selectors. you can read up on how
jQuery implements CSS selectors at http://docs.jquery.com/Selectors if
you need to tweak the element selection.

i'm certain there is a cleaner way to handle this, but without knowing
what's going on (and in light of your request for a straight port)
i've done no other refactoring. even though your not a "javascript
person", i've included some comments to (hopefully) help explain how
the differences between the libraries are addressed. hope it helps.

CODE:
// DOM-ready handler
$(function() {

// Listen for "onkeyup" events
$("#myInput").keyup(function() {

// Store a reference to the "myInput" node.
var elem = $(this);

var max_chars = 20;
var current_value = elem.val();
var current_length = current_value.length;
var remaining_chars = max_chars - current_length;

// Store a reference to the element to update
var target = $("#europe");

if (remaining_chars <= 14) {
target.css('opacity', '3.5');
} else if (remaining_chars <= 15) {
target.css('opacity', '3');
} else if (remaining_chars <= 16) {
target.css('opacity', '0.25');
} else if (remaining_chars <= 17) {
target.css('opacity', '0.2');
} else if (remaining_chars <= 18) {
target.css('opacity', '0.15');
} else if (remaining_chars <= 19) {
target.css('opacity', '0.1');
} else {
target.css('opacity', '0.05');
}

});
});

On Sep 25, 12:15 pm, GonzoDesign 
wrote:
> I know this is sloppy code, I'm more of a HTML and CSS person than
> JavaScript person. The thing is this code does exactly what I need it
> to do. This is done with mootools and it conflicts with some other
> jQuery things going on, on the page. I would REALLY appreciate any
> help anyone could give me.
>
> This isn't the finished code implemented but if there core details of
> this code could be re-written as jQuery I can probably tailor it for
> the purpose I'm using it for.
>
> window.addEvent('domready', function() {
>         $('myInput').addEvent('keyup', function() {
>                 max_chars = 20;
>                 current_value   = $('myInput').value;
>                 current_length  = current_value.length;
>                 remaining_chars = max_chars-current_length;
>                 $('counter_number').innerHTML = remaining_chars;
>
>                 if(remaining_chars<=14){
>                         $('europe').setStyle('opacity', '3.5');
>                 }
>                 else if(remaining_chars<=15){
>                         $('europe').setStyle('opacity', '3');
>                 }
>                 else if(remaining_chars<=16){
>                         $('europe').setStyle('opacity', '0.25');
>                 }
>                 else if(remaining_chars<=17){
>                         $('europe').setStyle('opacity', '0.2');
>                 }
>                 else if(remaining_chars<=18){
>                         $('europe').setStyle('opacity', '0.15');
>                 }
>                 else if(remaining_chars<=19){
>                         $('europe').setStyle('opacity', '0.1');
>                 } else {
>                         $('europe').setStyle('opacity', '0.05');
>                 }
>         });
>
> });


[jQuery] Re: Wait until animation completed - callback?

2009-09-25 Thread Merlin

The timeout sounds logical. I would like to try it, but somehow jquery
does not know that function:
http://docs.jquery.com/Special:Search?ns0=1&search=setTimeout&go=

I am pretty new to jquery. Could you post some code that fits into
this one:
onmouseover="$('#51').slideToggle('fast');$('.subcategories:not
(#51)').hide(700);"

Thanks!!

On Sep 25, 4:42 pm, "ryan.j"  wrote:
> the problem with jquery animation effects is that you can easily chain
> effects on a single element, but unless you specify a timer of some
> description or utilise the callback, effects on different elements
> will execute simultaneously as you're finding.
>
> unfortunately you really aren't going to know how far into the
> animation it is (you can find out by checking the opacity of the el,
> but that's probably A Very Bad Idea) so whilst it seems like the most
> obvious method, if you want to just stop  the new mouseover func
> executing until the animation has finished you'd need to make the
> mouseover function setTimeout("yourActualFunction("+el.attr('id')+")",
> x)  where x is the max length the anim could be.
>
> you might be able to do something clever with a conditional to
> determine if there was a menu animation happening on the initial
> mouseover event, and if there was checking the element now under the
> cursor in the callback, but since you have limited access to the
> callback of any existing events in progress you're always going to hit
> the problem of not being able to fully utilise that.
>
> i'd be tempted to .stop() anything that's :animated on mouseover
> before you start the new .fadeTo()   ;)
>
> On Sep 25, 2:12 pm,Merlin wrote:
>
> > does nobody have an idea? :-(
>
> > On Sep 23, 5:13 pm,Merlin wrote:
>
> > > Hi there,
>
> > > I am building huge list with subcategories in each category that fade
> > > out once the mouse is placed over the category. It works great, BUT
> > > the problem is, if your mouse goes down the list vertically and the
> > > subcategories are fiew, then the obove subcategories fade out and your
> > > mouse is over the next category which is causing the next menu to fade
> > > in.
>
> > > I would need a way to make jquerywaitto fade out the next menüuntil
> > > the last one has disapeared. An area would be good, if the mouse
> > > leaves the subcategory area fade out or similar.
>
> > > Do you believe the callback function might be a solution? I could not
> > > think about how. Here is the code I am using:
> > > onmouseover="$('#51').slideToggle('fast');$('.subcategories:not
> > > (#51)').hide(700);"
>
> > > Thank you for any help!!
>
> > >Merlin


[jQuery] Re: Fancybox from alt text

2009-09-25 Thread amuhlou

it looks like you have an extra $ inside your wrap method, and you
also may need to add the . And it looks like your code may need to
account for the space between the href and class attributes.

something like:
$(this).wrap('')



On Sep 25, 1:44 pm, casperMC  wrote:
> hi,
>
> im trying to wrap a fancybox link around each image on a site, which
> has an alt tag specified.
>
> Right now i have this html markup:
>
> 
>    
> 
>
> And this javascript-code:
>
> $(document).ready(function() {
>     $("img[alt]").each(function(){
>         $(this).wrap($(' class="fancyBoxImage">'));
>     });
>     $(".fancyBoxImage").fancybox();
>
> });
>
> And it's working perfect in every browser, except IE7 and 8 (haven't
> tested it in IE6 yet).
>
> Does anybody has a explanation for it?


[jQuery] Re: load callback doesn't wait for completion

2009-09-25 Thread amuhlou

can you post a snippet or test page of how you're using the load
method? it's really hard to figure out why it might not be working
without any code samples.

On Sep 25, 5:07 pm, rodeored  wrote:
> How do I get the callback for load() to wait until the load is
> complete?


[jQuery] Validation parity client/server (was: Re: getJSON callback not firing?)

2009-09-25 Thread Scott Haneda


What do you think about getJSON for simple "is username available"  
type checks?


I'm thinking, go with the simple and more compact method. Return your  
errors in JSON and parse them out.


Since these are just quick "exists in database" lookups, the chances  
of failure are low. If they do fail, you lose the real time username  
check, but that should not matter, since when the form is fully  
posted, you are in a normal POST method, with normal client server  
validation, so the failure on the pure client side no longer matters.  
It's also the edge case, rare.


Form validation even with jQ validation plugins can quickly turn your  
code into a large set of conditions that's hard to maintain. I'm  
leaning on simpler is better.


As an aside, any suggestions on client side form validation being kept  
in parity with server side?


Consider email, username, and password validation done in jQ. That's  
three types of validation. Each has to have parity with your server  
side validation. Remembering to keep those in sync is a burden.


I would have a file that was validate.php?check=username&user=foo so  
one file can check all my form elements. Now when I get done on the  
client side, I'm considering using curl to fetch the same resource jQ  
did. This way my server side validation all comes from the same place.


It's an extra http call, so slower, and there's a window for some form  
of non atomic insert, although it's small, and my sites are not banks :)


Suggestions?
--
Scott
Iphone says hello.

On Sep 25, 2009, at 11:58 AM, MorningZ  wrote:


I'd suggest using the more generic $.ajax method so you can actually
catch the error, as the $.getJSON fails silently, which is no good for
programmers  :-(


[jQuery] Re: getJSON callback not firing?

2009-09-25 Thread MorningZ

$.getJSON is a convenience/wrapper method around the $.ajax call... so
is $.getScript and $.get and $.post

just open up the unpacked version of jQuery and search for "getJSON"
and you'll see this first hand

On Sep 25, 3:07 pm, Charlie Griefer  wrote:
> Z: thanks for the response.  I'm making my initial foray into using jQuery
> for AJAX (up 'til now, had only used it for page manipulations).
>
> Given your response... would there ever be a situation where .getJSON()
> would be preferable to .ajax()?  It seems odd that jQuery would have 2
> methods that essentially do the same thing.  Especially if one is near
> impossible to debug.
>
> Thanks,
> Charlie
>
>
>
> On Fri, Sep 25, 2009 at 11:58 AM, MorningZ  wrote:
>
> > I'd suggest using the more generic $.ajax method so you can actually
> > catch the error, as the $.getJSON fails silently, which is no good for
> > programmers  :-(
>
> > $.ajax({
> >     type: GET,
> >     url: "your URL",
> >     processData = true,
> >     data: {},
> >     dataType: "json",
> >     success: function(json) {
> >          alert("success");
> >     },
> >     error: function(x,y,z) {
> >         // x.responseText should have what's wrong
> >     }
> > });
>
> > On Sep 25, 2:06 pm, Charlie Griefer  wrote:
> > > Hey all:
>
> > > I've read the docs and googled the heck out of this, but not seeing what
> > the
> > > problem is.
>
> > > I'm trying to get some data from the server via the getJSON() method.  I
> > do
> > > see a response in firebug and I've validated the response data at
> > > JSONLint.com.  However, the callback function simply will not fire.  I've
> > > tried to simplify things as much as possible.  The CFC returning the data
> > is
> > > in the same directory as the calling page.  The callback function, for
> > now,
> > > should only alert a simple text string (which has evolved from "hi" to
> > "foo"
> > > to a censored version below as the hours have passed).
>
> > > $(document).ready(function() {
> > >     $('a.players').click(function() {
> > >         $.getJSON(
>
> > 'data.cfc?method=getPlayerByID&returnformat=JSON&queryformat=column&playerID='
> > > + this.id,
> > >             function(data) {
> > >                 alert('i %!%##%* hate you');
> > >             });
> > >         return false;
> > >     });
>
> > > });
>
> > > Here's the response I receive:
>
> > {"ROWCOUNT":1,"COLUMNS":["PLAYERID","PLAYERNAME","PLAYERNUMBER","PLAYERPOSITION","PLAYERIMG","PLAYERCOLLEGE"],"DATA":{"PlayerID":[1],"PlayerName":["Barden,
>
> > Ramses"],"PlayerNumber":[13],"PlayerPosition":["WR"],"PlayerImg":["http:\/\/
> > > assets.giants.com
> > \/uploads\/players\/2FE2D3BDF4FB443D949D1D39B69ADC03.gif"],"PlayerCollege":["Cal
> > > Poly"]}}
>
> > > ...which when pasted into JSONLint returns valid.
>
> > > If anyone has any ideas, or if there's any additional information that I
> > can
> > > provide, I'm all ears.
>
> > > Thanks!
> > > Charlie
>
> > > --
> > > Charlie Grieferhttp://charlie.griefer.com/
>
> > > I have failed as much as I have succeeded. But I love my life. I love my
> > > wife. And I wish you my kind of success.
>
> --
> Charlie Grieferhttp://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.


[jQuery] problem with $('.class').animate({scrollTop: x}) in Safari

2009-09-25 Thread Sergio de la Garza

Hello,

I have a problem with safari behaving weird with a custom Slider I'm
making, what it does is like reseting the scrollTop value to 0 when
jumping from one item to other making the animation look pretty bad,
the behavior in FF is as expected.

The code is here:

http://pastie.org/630593


Cheers and thanks


[jQuery] Convert MooTools to jQuery

2009-09-25 Thread GonzoDesign

I know this is sloppy code, I'm more of a HTML and CSS person than
JavaScript person. The thing is this code does exactly what I need it
to do. This is done with mootools and it conflicts with some other
jQuery things going on, on the page. I would REALLY appreciate any
help anyone could give me.

This isn't the finished code implemented but if there core details of
this code could be re-written as jQuery I can probably tailor it for
the purpose I'm using it for.

window.addEvent('domready', function() {
$('myInput').addEvent('keyup', function() {
max_chars = 20;
current_value   = $('myInput').value;
current_length  = current_value.length;
remaining_chars = max_chars-current_length;
$('counter_number').innerHTML = remaining_chars;

if(remaining_chars<=14){
$('europe').setStyle('opacity', '3.5');
}
else if(remaining_chars<=15){
$('europe').setStyle('opacity', '3');
}
else if(remaining_chars<=16){
$('europe').setStyle('opacity', '0.25');
}
else if(remaining_chars<=17){
$('europe').setStyle('opacity', '0.2');
}
else if(remaining_chars<=18){
$('europe').setStyle('opacity', '0.15');
}
else if(remaining_chars<=19){
$('europe').setStyle('opacity', '0.1');
} else {
$('europe').setStyle('opacity', '0.05');
}
});
});


[jQuery] $.post cross domain first sends an OPTIONS verb?

2009-09-25 Thread David P

I use $.post like so:

$.post("http://mydomain.com/some/webservice";, $.toJSON({ emailAddress:
emailAddress }), callback, "json");

this works great..the response of the POST is a json string and that
is used in the callback..now I added https:

$.post("https://mydomain.com/some/webservice";, $.toJSON
({ emailAddress: emailAddress }), callback, "json");

so it is now a cross domain post...in firebug I see that instead of
POST'ing like in the http case..it first is sending an OPTIONS
verb..why?  The webservice doesn't know how to respond to that and
gives a 403 forbidden...I need it to just send the POST like it did
when it was on the same domain...

Any insight?


[jQuery] Documentation Recommendation

2009-09-25 Thread Rick

It should be noted that you are able to pass in jQuery objects to html
() (and probably the others append() ...)


[jQuery] Re: getJSON callback not firing?

2009-09-25 Thread Charlie Griefer
Z: thanks for the response.  I'm making my initial foray into using jQuery
for AJAX (up 'til now, had only used it for page manipulations).

Given your response... would there ever be a situation where .getJSON()
would be preferable to .ajax()?  It seems odd that jQuery would have 2
methods that essentially do the same thing.  Especially if one is near
impossible to debug.

Thanks,
Charlie

On Fri, Sep 25, 2009 at 11:58 AM, MorningZ  wrote:

>
> I'd suggest using the more generic $.ajax method so you can actually
> catch the error, as the $.getJSON fails silently, which is no good for
> programmers  :-(
>
> $.ajax({
> type: GET,
> url: "your URL",
> processData = true,
> data: {},
> dataType: "json",
> success: function(json) {
>  alert("success");
> },
> error: function(x,y,z) {
> // x.responseText should have what's wrong
> }
> });
>
> On Sep 25, 2:06 pm, Charlie Griefer  wrote:
> > Hey all:
> >
> > I've read the docs and googled the heck out of this, but not seeing what
> the
> > problem is.
> >
> > I'm trying to get some data from the server via the getJSON() method.  I
> do
> > see a response in firebug and I've validated the response data at
> > JSONLint.com.  However, the callback function simply will not fire.  I've
> > tried to simplify things as much as possible.  The CFC returning the data
> is
> > in the same directory as the calling page.  The callback function, for
> now,
> > should only alert a simple text string (which has evolved from "hi" to
> "foo"
> > to a censored version below as the hours have passed).
> >
> > $(document).ready(function() {
> > $('a.players').click(function() {
> > $.getJSON(
> >
> >
> 'data.cfc?method=getPlayerByID&returnformat=JSON&queryformat=column&playerID='
> > + this.id,
> > function(data) {
> > alert('i %!%##%* hate you');
> > });
> > return false;
> > });
> >
> > });
> >
> > Here's the response I receive:
> >
> >
> {"ROWCOUNT":1,"COLUMNS":["PLAYERID","PLAYERNAME","PLAYERNUMBER","PLAYERPOSITION","PLAYERIMG","PLAYERCOLLEGE"],"DATA":{"PlayerID":[1],"PlayerName":["Barden,
> >
> Ramses"],"PlayerNumber":[13],"PlayerPosition":["WR"],"PlayerImg":["http:\/\/
> > assets.giants.com
> \/uploads\/players\/2FE2D3BDF4FB443D949D1D39B69ADC03.gif"],"PlayerCollege":["Cal
> > Poly"]}}
> >
> > ...which when pasted into JSONLint returns valid.
> >
> > If anyone has any ideas, or if there's any additional information that I
> can
> > provide, I'm all ears.
> >
> > Thanks!
> > Charlie
> >
> > --
> > Charlie Grieferhttp://charlie.griefer.com/
> >
> > I have failed as much as I have succeeded. But I love my life. I love my
> > wife. And I wish you my kind of success.
>



-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: getJSON callback not firing?

2009-09-25 Thread MorningZ

I'd suggest using the more generic $.ajax method so you can actually
catch the error, as the $.getJSON fails silently, which is no good for
programmers  :-(

$.ajax({
 type: GET,
 url: "your URL",
 processData = true,
 data: {},
 dataType: "json",
 success: function(json) {
  alert("success");
 },
 error: function(x,y,z) {
 // x.responseText should have what's wrong
 }
});

On Sep 25, 2:06 pm, Charlie Griefer  wrote:
> Hey all:
>
> I've read the docs and googled the heck out of this, but not seeing what the
> problem is.
>
> I'm trying to get some data from the server via the getJSON() method.  I do
> see a response in firebug and I've validated the response data at
> JSONLint.com.  However, the callback function simply will not fire.  I've
> tried to simplify things as much as possible.  The CFC returning the data is
> in the same directory as the calling page.  The callback function, for now,
> should only alert a simple text string (which has evolved from "hi" to "foo"
> to a censored version below as the hours have passed).
>
> $(document).ready(function() {
>     $('a.players').click(function() {
>         $.getJSON(
>
> 'data.cfc?method=getPlayerByID&returnformat=JSON&queryformat=column&playerID='
> + this.id,
>             function(data) {
>                 alert('i %!%##%* hate you');
>             });
>         return false;
>     });
>
> });
>
> Here's the response I receive:
>
> {"ROWCOUNT":1,"COLUMNS":["PLAYERID","PLAYERNAME","PLAYERNUMBER","PLAYERPOSITION","PLAYERIMG","PLAYERCOLLEGE"],"DATA":{"PlayerID":[1],"PlayerName":["Barden,
> Ramses"],"PlayerNumber":[13],"PlayerPosition":["WR"],"PlayerImg":["http:\/\/
> assets.giants.com\/uploads\/players\/2FE2D3BDF4FB443D949D1D39B69ADC03.gif"],"PlayerCollege":["Cal
> Poly"]}}
>
> ...which when pasted into JSONLint returns valid.
>
> If anyone has any ideas, or if there's any additional information that I can
> provide, I'm all ears.
>
> Thanks!
> Charlie
>
> --
> Charlie Grieferhttp://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.


[jQuery] jquery.embedquicktime.js

2009-09-25 Thread RealMason

Anyone know how to contact the author of this plug in?

Every time I try to send him a question on his site form, it says it
was rejected as spam.

Or are there any other experts on this plugin out there?

I need to figure out how to reverse the replacement that happens when
the quicktime controller comes up.

Meaning, when I click on another play button on the screen, I'd like
for the previous one to go back to it's pre-clicked state.

Thanks.


[jQuery] getJSON callback not firing?

2009-09-25 Thread Charlie Griefer
Hey all:

I've read the docs and googled the heck out of this, but not seeing what the
problem is.

I'm trying to get some data from the server via the getJSON() method.  I do
see a response in firebug and I've validated the response data at
JSONLint.com.  However, the callback function simply will not fire.  I've
tried to simplify things as much as possible.  The CFC returning the data is
in the same directory as the calling page.  The callback function, for now,
should only alert a simple text string (which has evolved from "hi" to "foo"
to a censored version below as the hours have passed).

$(document).ready(function() {
$('a.players').click(function() {
$.getJSON(

'data.cfc?method=getPlayerByID&returnformat=JSON&queryformat=column&playerID='
+ this.id,
function(data) {
alert('i %!%##%* hate you');
});
return false;
});
});

Here's the response I receive:

{"ROWCOUNT":1,"COLUMNS":["PLAYERID","PLAYERNAME","PLAYERNUMBER","PLAYERPOSITION","PLAYERIMG","PLAYERCOLLEGE"],"DATA":{"PlayerID":[1],"PlayerName":["Barden,
Ramses"],"PlayerNumber":[13],"PlayerPosition":["WR"],"PlayerImg":["http:\/\/
assets.giants.com\/uploads\/players\/2FE2D3BDF4FB443D949D1D39B69ADC03.gif"],"PlayerCollege":["Cal
Poly"]}}

...which when pasted into JSONLint returns valid.

If anyone has any ideas, or if there's any additional information that I can
provide, I'm all ears.

Thanks!
Charlie

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] marking a link as visited

2009-09-25 Thread RealMason

I'm using jquery.embedquicktime.js to play an mp3. Sometimes I have a
dozen different mp3s on a page. When a user clicks on the graphical
play button, the button is replaced with the Quicktime controller bar.
This is all expected behavior.

Since the link doesn't actually go anywhere, the link doesn't ever get
"visited" and so when a user comes back to the page, they have no
visual clues as to what mp3s they have already listed to. I'm very
familiar with controlling this behavior with the css pseudo classes
(link, visted, hover, active). But since jquery is just doing a
"replace", the link is truly never visited.

Any ideas of how to mark that link as visited?


[jQuery] Re: $(document).resize bug?

2009-09-25 Thread MartinBorthiry





On 25 sep, 13:13, Bertilo Wennergren  wrote:
> MartinBorthiry wrote:
> >  I'm trying to do this:
>
> >  $(document).resize(function(){alert('yea')});
>
> >  but doesn't work on firefox or chrome,  only work fine on IE (WTF!)
>
> >  I'd tryied $('body').resize...  but happen the same.
>
> >  $(window).resize  work fine but i need to detect when the body's
> > height has been changed by ajax.
>
> As far as I know, resize is only supposed to fire
> when an actual window (or iframe) is resized. The
> IE behaviour is a bug.
>
> As for doing what you want to do, I have no idea,
> but at least you can stop trying to catch a resize
> event for "body". That won't happen in Firefox
> and Chrome (except, perhaps, if you can get your
> page to trigger quirks mode, but I wouldn't recommend
> going down that path...).
>

Thanks for your replay Bertilo.

Well, i'll try other way to catch that event... i was reading w3c dom
specifications (http://www.w3.org/TR/2000/REC-DOM-Level-2-
Events-20001113/events.html#Events-eventgroupings-mutationevents) and
document onresize event must to be defined since html 4.  :(


[jQuery] Re: Load quicktime as needed

2009-09-25 Thread RealMason

Couldn't get this to work but am using jquery.embedquicktime.js and it
seems to help. Thanks.

On Sep 25, 7:26 am, Mike Alsup  wrote:
> > My ideal solution would be a list of song titles and a play button.
> > When the user clicks the play button, the quicktime play is revealed
> > below the title and ONLY at that moment does the file start
> > downloading.
>
> If you are using the media plugin then just invoke "media" on the
> desired element when a play button is clicked.  For example, given
> markup like this:
>
> 
>     Play
>     Song Title
> 
>
> I would use script something like this:
>
> $('button.play').click(function() {
>     $(this).next('span.song').media();
>
> });


[jQuery] Re: Load quicktime as needed

2009-09-25 Thread RealMason

Thanks. I actually don't want to use Flash at all since it is not
iPhone compatible, but thanks.

On Sep 25, 7:32 am, allenm541  wrote:
> Actually, after reading over your post again, it looks like what you
> need is to set autoBuffering: false
> autoBuffering: false will prevent the media from loading until the
> play button it presses.  It differs from autoPlay: false which simply
> prevents it from player, but buffers anyhow.
>
> So, your code may look something like this. You can add in and define
> a host of different options.
>
> flowplayer("player", 'http://www.your-website.com/path-to-flowplayer/
> flowplayer-3.1.3.swf', {
>         clip: {
>                 url: path-to-your-media,
>                 autoPlay: false,
>                 autoBuffering: false, //<-- THIS IS YOUR GOLDEN NUGGET
>                 seekableOnBegin: true
>                 },
>         plugins: {            // load one or more plugins
>                 controls: {            // load the controls plugin
>                 url: 'path-to-controls-plugin/flowplayer.controls-3.1.3.swf',
>                 backgroundColor: '#927150',
>                 timeBgColor: '#00',
>                 progressGradient: 'low',
>                 height: 20,
>                 scrubber: true,
>                 } //Ends controls
>         } //Ends plugins
>
> }); //Ends flowplayer
>
> On Sep 24, 8:51 am, RealMason  wrote:
>
> > I'm a total jquery newbie and I'm just trying to find out if something
> > is possible.
>
> > If I have a full album worth of songs that I want to list on a web
> > page, can I use jquery to only embed the quicktime file after the user
> > clicks on a play button for that track.
>
> > Similar to Amazon's or iTunes play button per track.
>
> > The way I'm doing it right now, every song is embedded and therefore
> > is progressively downloading and soaking up bandwidth even though the
> > user may only listen to one song (or none).
>
> > Essentially, I want the song to only progressively download IF the
> > user clicks play.
>
> > I am NOT asking about autoplay versus click to play... instead my
> > question is about controlling the point in time that the file gets
> > embedded and starts downloading to the browser.
>
> > Any direction would be appreciated. I do have the "jquery.media.js"
> > plug in.
>
> > My ideal solution would be a list of song titles and a play button.
> > When the user clicks the play button, the quicktime play is revealed
> > below the title and ONLY at that moment does the file start
> > downloading.
>
> > Thanks.


[jQuery] jquery slideshow

2009-09-25 Thread Shravan Garlapati
Hi,
 I want to use jquery slideshow. I have a side menu bar with 15
different options. When I choose an option from menu bar, different slide
shows must appear in the same div.
I would really appreciate if any body can help me with this.

Shravan.


[jQuery] (validate) submit form in lightbox?

2009-09-25 Thread Loony2nz

Hello all,

I have a form that opens up in a lightbox (shadowbox to be exact).

And I'm having a heckuva time to get the form in the iframe to submit.

i'm using the submitHandler option within the validate plugin like so:

submitHandler: function(form) {

form.submit();

var s = window.parent.Shadowbox;
s.open({
player: 'iframe',
title:  'Thank you!',
content:
'http://www.somesite.com/includes/thank_you.php',
width:  270,
height: 110
});
}

I get a javascriptt error stating, "form is undefined" on the
form.submit(); line #.

How do I target the form in the iframe to submit?

thanks!


[jQuery] load callback doesn't wait for completion

2009-09-25 Thread rodeored

How do I get the callback for load() to wait until the load is
complete?


[jQuery] Re: Lightbox or PrettyPhoto or Fancybox break when submitting content with jEditable plugin

2009-09-25 Thread kyleduncan

sorry just to clarify, the problem CAN still emerge even if you view a
prettyPhoto image first, before entering a caption. if you do this,
then enter several captions and try to view photos again, it still
breaks (sometimes it gets into a weird loop even whereby the first
click tries to open the prettyPhoto box and fails, so it closes it,
then the second click opens the loading animation and then does
nothing). basically this is the most unpredictable and difficult to
debug problem i've ever encountered with jquery!


[jQuery] Re: Lightbox or PrettyPhoto or Fancybox break when submitting content with jEditable plugin

2009-09-25 Thread kyleduncan

Just to add a bit more detail: my current setup as of right now is
still using the jEditable plugin combined with the prettyPhoto image
viewer plugin (which i believe is based on lightbox). exactly what
happens with this combination of plugins is:

1. if you enter a caption and save it (jeditable submits the content)
and then click on the image you just entered a caption for, it DOES
show up fine. however, if you then close it and re open (or if you
click next to move to the next image in the gallery and then "back" to
go back to the photo you entered a caption for) the image you entered
a caption for wont load. until you do a SHIFT refresh (or two
refreshes in firefox) the image refuses to load up in prettyPhoto.

2. if you FIRST view the image and then SECOND enter a caption, none
of the above occurs. there are no problems from then on in. it seems
no matter how many times you submit a caption and then try to view the
image, it works fine, AS LONG AS when you first arrived at the page
you viewed an image in prettyPhoto before entering any captions.

any help greatly appreciated, pulling my hair out on the randomness of
this one!!


[jQuery] Lightbox or PrettyPhoto or Fancybox break when submitting content with jEditable plugin

2009-09-25 Thread kyleduncan

Hi,

i have a site that uses a lightbox based image viewer and the
jeditable plugin. basically my site has a photo gallery and below each
gallery i have the option to set a caption to the photo. i have done
the caption using jeditable and i've also tried using the ajaxForm
plugin for jquery to see if jeditable caused the problem. but
whichever method i use, approximately 20% of the time a photo caption
is submitted, if you then click on the photo to view full size using
lightbox (so far i've used fancyBox, prettyPhoto and Lightbox itself,
and all break in the same way) it gets stuck at "loading", whereby the
overlay appears, the inital empty box and animated gif appear, but
then it just spins forever and never loads the image, as if it cant
access the URL. weirder still, the FIRST time i do a page refresh to
try and fix the problem, it doesnt work (something in the cache i
expect), but if i do a second refresh or a shift + refresh, it resets
and works again.

it's very difficult to eliminate all variables because the problem is
so sporadic, but it seems that the most likely way of breaking
lightbox is to do the following:

1. go to the page
2. before viewing any images in lightbox, click to enter a caption,
then hit enter to submit it.
3. click the associated caption's image to view the lightbox zoomed
version. (often breaks)

if you go to the page and look at images BEFORE entering a caption,
then it seems fine (basically if lightbox has been utilised at least
once before you start submitting captions, then it's usually ok).

can anybody shed any light on this? again, its something general about
the ajax submit, not the jeditable plugin, because i've tried doing
away with jeditable and just using ajaxForm to submit a form, and the
same problem occurs.


[jQuery] Re: XHTML or HTML when creating elements?

2009-09-25 Thread Karl Swedberg

On Sep 25, 2009, at 11:56 AM, Bertilo Wennergren wrote:



Karl Swedberg wrote:

Internally, jQuery determines whether to use document.createElement  
by checking the string against a regular expression:

   rsingleTag = /^<(\w+)\s*\/?>$/
Unless I'm missing something, allowing for both syntaxes would be  
trivial. Just change the regex to something like this (untested):

   rsingleTag = /^<(\w+)\s*\/?>(<\/\w+>)?$/
I think I'll recommend that.


That seems to work.

But event then, in the following case '' is still being
converted to '' (and then passed to innerHTML):

 var html = '';
 $("#div").html(html);

--
Bertilo Wennergren 



Right. I'm pretty sure that's because the html string is handled  
differently if it's an argument of a DOM manipulation method  
(e.g. .html('function (e.g. $('

If I recall correctly, all of the DOM manipulation methods are run  
through the same set of functions before performing their specific  
task. While changing '' might not be necessary  
for .html(), it is for .wrap(), for example.


--Karl



[jQuery] Re: $(document).resize bug?

2009-09-25 Thread Bertilo Wennergren


MartinBorthiry wrote:


 I'm trying to do this:

 $(document).resize(function(){alert('yea')});

 but doesn't work on firefox or chrome,  only work fine on IE (WTF!)

 I'd tryied $('body').resize...  but happen the same.

 $(window).resize  work fine but i need to detect when the body's
height has been changed by ajax.


As far as I know, resize is only supposed to fire
when an actual window (or iframe) is resized. The
IE behaviour is a bug.

As for doing what you want to do, I have no idea,
but at least you can stop trying to catch a resize
event for "body". That won't happen in Firefox
and Chrome (except, perhaps, if you can get your
page to trigger quirks mode, but I wouldn't recommend
going down that path...).

--
Bertilo Wennergren 


[jQuery] Re: Parse encoded HTML in XML node

2009-09-25 Thread Bertilo Wennergren


Jeff wrote:


I realize that the text() function is returning text, and not the
nodes within.  How can I return the nodes within, either as a jQuery
object or the DOM nodes themselves, rather than the text, so I can
actually parse them?


The basic problem is probably that there are no nodes within,
or rather just one single text node, with a bunch of "<"
entities etc.. There are no actual html tags there. So you need
to somehow parse that text into HTML (eval?), and I don't know
how to do that, since I'm too new to jQuery... Sorry...

--
Bertilo Wennergren 


[jQuery] Ajax load function - different php each time?

2009-09-25 Thread thodoris

I am developing a webpage that is jquery powered. Many div-hotspots in
the page is ajax powered and they should update dynamically. For
example
number of ratings
average rating
number that a video is favoured

Now i am doing this:
$("#DIV1...").load(some1.php);
$("#DIV2...").load(some2.php);
$("#DIV3...").load(some3.php);

But the number of .php files are increasing too much. Is there another
idea except to have one .php with
many IF ELSE inside?

thanks


[jQuery] Fancybox from alt text

2009-09-25 Thread casperMC

hi,

im trying to wrap a fancybox link around each image on a site, which
has an alt tag specified.

Right now i have this html markup:


   


And this javascript-code:

$(document).ready(function() {
$("img[alt]").each(function(){
$(this).wrap($(''));
});
$(".fancyBoxImage").fancybox();
});

And it's working perfect in every browser, except IE7 and 8 (haven't
tested it in IE6 yet).

Does anybody has a explanation for it?


[jQuery] Tabbed data views, without IDs

2009-09-25 Thread amarquis

Hello,

I've looked at a couple of tutorials focused on having some sort of
clickable elements that emulate tabs - hiding all but the div
associated with that element. Both of those tutorials focus on adding
IDs to the elements involved and a handler for each. This is rough on
a web app that is developing these data on the fly, so I'm looking for
a more generic solution.

I've two ideas, one I'm not sure is possible and the other feels like
cheating (the "this might break in some browsers" kind of cheating).

1) Is there a way to use the "this" object in more complicated
selectors? For example, using '>' to find children of "this" element.
I was trying to find something in the docs that spoke specifically to
the behavior of "this," but it is a hard term to search for. My guess
at the syntax certainly did not work.

2) Will it break things to add a class to the current element, then
select off of that class? For example:

- Add a 'this guy is selected' class to the clicked tab element
- Hide all the tabs not associated with that class
- Show the tab associated with that class
- Remove the class

Or, am I barking up the wrong tree(s) entirely? I'd appreciate any
push in the right direction.

Thanks!


[jQuery] slidedown menu

2009-09-25 Thread dima_mak

I am trying to do an slidedown menu with hover function:
Javascript:
Code:

$(document).ready(function(){

$("#rightmenu ul li").hover(
  function () {
$(this).find("ul:first").stop(true, true);
$(this).find("ul:first").slideDown();
  },
  function () {
$(this).find("ul:first").slideUp('fast');
  }
);
  });

HTML:
Code:

  
 

   סנן לפי סגנון
   
1
2
3
   



It works fine in IE, but not in FF(it doesn't shown at all)
Here is example - www.rollshop.co.il


[jQuery] Re: Every post I make, I get an mail error.

2009-09-25 Thread Bertilo Wennergren


evo wrote:


Everytime I post to this group through thunderbird, I get a
undelivered mail message sent back, everytime.
This has only started happening recently and I can't find any info
about it anywhere.

Just want to know if this is happening to anyone else (as it's only
when I post to this group)


I get those too.

--
Bertilo Wennergren 


[jQuery] Re: XHTML or HTML when creating elements?

2009-09-25 Thread Bertilo Wennergren


Karl Swedberg wrote:

Internally, jQuery determines whether to use document.createElement by 
checking the string against a regular expression:


rsingleTag = /^<(\w+)\s*\/?>$/

Unless I'm missing something, allowing for both syntaxes would be 
trivial. Just change the regex to something like this (untested):


rsingleTag = /^<(\w+)\s*\/?>(<\/\w+>)?$/

I think I'll recommend that.


That seems to work.

But event then, in the following case '' is still being
converted to '' (and then passed to innerHTML):

  var html = '';
  $("#div").html(html);

--
Bertilo Wennergren 


[jQuery] Re: XHTML or HTML when creating elements?

2009-09-25 Thread Bertilo Wennergren


Vincent Robert wrote:

> On Sep 24, 6:33 pm, Bertilo Wennergren  wrote:
>> I think I read somewhere that jQuery just passes the
>> code along to the "innerHTML" function of the browser.
>> That would mean that the actual rules are those of the
>> browsers' various implementations of "innerHTML" (whatever
>> those may be...).


Actually, jQuery does some parsing by itself first.


Yes, I had a look at the jQuery code. Fascinating stuff
in there.


The $('') syntax is actually a shortcut to
document.createElement("span"), and yes, the "/" is required here. So $
('') will be faster than $('') which will have to
go through innerHtml.


A ha. Interesting. But, as it seems, if you use
".html('') or ".html(''), they
amount to the same thing, as the first one gets
converted to the second one, and then gets passed
to "innerHTML".

Actually I'm a bit puzzled.
I tried the following six pieces of code:

1.
var html = '';
$("#div").html(html);

2.
var html = '';
$("#div").html(html);

3.
var html = $('');
$("#div").html(html);

4.
var html = $('');
$("#div").html(html);

5.
$("#div").html($(''));

6.
$("#div").html($(''));

In all cases except 3 and 5 what happens is
that '' finally gets passed through
innerHTML. So in 1 and 5 '' is actually
first turned into '', and thus
it would (theoretically) have been more efficient
to write '' in the first place.

I would have expected all six examples to
behave the same, but there are probably
good reasons for the current choices.

(I found out what happened using FireBug
and a few calls to "console.log()" inside
the jQuery code. This was all done in
Firefox, of course...)

--
Bertilo Wennergren 


[jQuery] Re: XHTML or HTML when creating elements?

2009-09-25 Thread Karl Swedberg

On Sep 25, 2009, at 10:21 AM, Vincent Robert wrote:


Actually, jQuery does some parsing by itself first.

The $('') syntax is actually a shortcut to
document.createElement("span"), and yes, the "/" is required here.  
So $

('') will be faster than $('') which will have to
go through innerHtml.


That's right, for now. Still, I can't see any reason why jQuery should  
prefer the quick-close syntax ( $('') ) over the other ( $ 
('') ).


Internally, jQuery determines whether to use document.createElement by  
checking the string against a regular expression:


rsingleTag = /^<(\w+)\s*\/?>$/

Unless I'm missing something, allowing for both syntaxes would be  
trivial. Just change the regex to something like this (untested):


rsingleTag = /^<(\w+)\s*\/?>(<\/\w+>)?$/

I think I'll recommend that.

Cheers,

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com



[jQuery] Re: Convert Image to PDF

2009-09-25 Thread ryan.j

there is probably some way of doing it server-side and automatically
giving the user a link to that, but not in jquery as far as i know

file I/O stuff in javascript pretty much relies on being run on
localhost too, is this for an Air app?

On Sep 25, 3:45 pm, chiru  wrote:
> Hi friends,
>               I need to convert images(.gif/.png) into PDF format in
> javascript. Can we do that using jQuery. Is there any plugin to solve
> my problem.


[jQuery] Convert Image to PDF

2009-09-25 Thread chiru

Hi friends,
  I need to convert images(.gif/.png) into PDF format in
javascript. Can we do that using jQuery. Is there any plugin to solve
my problem.


[jQuery] Re: Wait until animation completed - callback?

2009-09-25 Thread ryan.j

the problem with jquery animation effects is that you can easily chain
effects on a single element, but unless you specify a timer of some
description or utilise the callback, effects on different elements
will execute simultaneously as you're finding.

unfortunately you really aren't going to know how far into the
animation it is (you can find out by checking the opacity of the el,
but that's probably A Very Bad Idea) so whilst it seems like the most
obvious method, if you want to just stop  the new mouseover func
executing until the animation has finished you'd need to make the
mouseover function setTimeout("yourActualFunction("+el.attr('id')+")",
x)  where x is the max length the anim could be.

you might be able to do something clever with a conditional to
determine if there was a menu animation happening on the initial
mouseover event, and if there was checking the element now under the
cursor in the callback, but since you have limited access to the
callback of any existing events in progress you're always going to hit
the problem of not being able to fully utilise that.

i'd be tempted to .stop() anything that's :animated on mouseover
before you start the new .fadeTo()   ;)

On Sep 25, 2:12 pm, Merlin  wrote:
> does nobody have an idea? :-(
>
> On Sep 23, 5:13 pm, Merlin  wrote:
>
> > Hi there,
>
> > I am building huge list with subcategories in each category that fade
> > out once the mouse is placed over the category. It works great, BUT
> > the problem is, if your mouse goes down the list vertically and the
> > subcategories are fiew, then the obove subcategories fade out and your
> > mouse is over the next category which is causing the next menu to fade
> > in.
>
> > I would need a way to make jquerywaitto fade out the next menüuntil
> > the last one has disapeared. An area would be good, if the mouse
> > leaves the subcategory area fade out or similar.
>
> > Do you believe the callback function might be a solution? I could not
> > think about how. Here is the code I am using:
> > onmouseover="$('#51').slideToggle('fast');$('.subcategories:not
> > (#51)').hide(700);"
>
> > Thank you for any help!!
>
> > Merlin


[jQuery] Re: Disabling parent link if children present

2009-09-25 Thread Shane Riley

Are you wanting to just hide the anchor element for link 4 but keep
links 4a to 4c visible? Here's a quick example of that scenario:
$(function()
{
$("ul#nav li ul").each(function(i)
{
$("a:first", $(this).parent()).hide();
});
});


Item 1
Item 2

Item 3

Sub 1
Sub 2
Sub 3



Item 3

Sub 1
Sub 2
Sub 3




On Sep 24, 2:00 am, osu  wrote:
> Hi,
>
> Is it possible to 'deactivate'/nullify a top-level link in an
> unordered list if child links exist in that list?
>
> For example, I have the following:
>
> - Link 1
> - Link 2
> - Link 3
> - Link 4
>  - Link 4a
>  - Link 4b
>  - Link 4c
> - Link 5
>
> And I want to knock out Link 4 because it has sub-items.
>
> Is that possible?
>
> Thanks,
>
> osu


[jQuery] Re: Wait until animation completed - callback?

2009-09-25 Thread ryan.j

the problem with jquery animation effects is that you can easily chain
effects on a single element, but unless you specify a timer of some
description or utilise the callback, effects on different elements
will execute simultaneously as you're finding.

unfortunately you really aren't going to know how far into the
animation it is (you can find out by checking the opacity of the el,
but that's probably A Very Bad Idea) so whilst it seems like the most
obvious method, if you want to just stop  the new mouseover func
executing until the animation has finished you'd need to make the
mouseover function setTimeout("yourActualFunction("+el.attr('id')+")",
x)  where x is the max length the anim could be.

the nearest solution to what you want sounds like it would be using a
conditional statement to determine if there was a menu animation
happening on the initial mouseover event, and if there was checking
the element now under the cursor in the callback.

i'd be tempted to .stop() anything that's :animated on mouseover
before you start the new .fadeTo()   ;)

On Sep 25, 2:12 pm, Merlin  wrote:
> does nobody have an idea? :-(
>
> On Sep 23, 5:13 pm, Merlin  wrote:
>
> > Hi there,
>
> > I am building huge list with subcategories in each category that fade
> > out once the mouse is placed over the category. It works great, BUT
> > the problem is, if your mouse goes down the list vertically and the
> > subcategories are fiew, then the obove subcategories fade out and your
> > mouse is over the next category which is causing the next menu to fade
> > in.
>
> > I would need a way to make jquerywaitto fade out the next menüuntil
> > the last one has disapeared. An area would be good, if the mouse
> > leaves the subcategory area fade out or similar.
>
> > Do you believe the callback function might be a solution? I could not
> > think about how. Here is the code I am using:
> > onmouseover="$('#51').slideToggle('fast');$('.subcategories:not
> > (#51)').hide(700);"
>
> > Thank you for any help!!
>
> > Merlin


[jQuery] Re: XHTML or HTML when creating elements?

2009-09-25 Thread Vincent Robert

Actually, jQuery does some parsing by itself first.

The $('') syntax is actually a shortcut to
document.createElement("span"), and yes, the "/" is required here. So $
('') will be faster than $('') which will have to
go through innerHtml.

Regards,

On Sep 24, 6:33 pm, Bertilo Wennergren  wrote:
> I think I read somewhere that jQuery just passes the
> code along to the "innerHTML" function of the browser.
> That would mean that the actual rules are those of the
> browsers' various implementations of "innerHTML" (whatever
> those may be...).


[jQuery] Re: cycle plugin and dropdown menu [solved]

2009-09-25 Thread hcvitto

great!!
Many thanks Karl!!

Vitto


On 25 Set, 15:45, Karl Swedberg  wrote:
> Hi Vitto,
>
> Add these declarations to your ul#mainNav rule (main.css, line 149)
>
>    position: relative;
>    z-index: 50;
>
> For IE, you'll probably also need to add these to div#content  
> (main.css, line 26)
>
>    position: relative;
>    z-index: 1;
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Sep 25, 2009, at 6:33 AM, hcvitto wrote:
>
>
>
>
>
> > Hi
> > i'm using the cycle plugin below a dropdown. Problem is that the"
> > dropdowns"  stay behind the slideshow. They have position absolute and
> > higher z-index than the slideshow.
>
> > Any solution?
>
> >http://www.francesconizzola.it/_demo/
>
> > Thanks Vitto


[jQuery] Re: cycle plugin and dropdown menu

2009-09-25 Thread Karl Swedberg

Hi Vitto,

Add these declarations to your ul#mainNav rule (main.css, line 149)

  position: relative;
  z-index: 50;

For IE, you'll probably also need to add these to div#content  
(main.css, line 26)


  position: relative;
  z-index: 1;


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 25, 2009, at 6:33 AM, hcvitto wrote:



Hi
i'm using the cycle plugin below a dropdown. Problem is that the"
dropdowns"  stay behind the slideshow. They have position absolute and
higher z-index than the slideshow.

Any solution?

http://www.francesconizzola.it/_demo/

Thanks Vitto




[jQuery] $(document).resize bug?

2009-09-25 Thread MartinBorthiry

hello:

 I'm trying to do this:

 $(document).resize(function(){alert('yea')});

 but doesn't work on firefox or chrome,  only work fine on IE (WTF!)

 I'd tryied $('body').resize...  but happen the same.

 $(window).resize  work fine but i need to detect when the body's
height has been changed by ajax.


ideas?





[jQuery] Re: jQuery plugin help

2009-09-25 Thread Karl Swedberg

Hi Nalum,

It's pretty straightforward. Instead of doing this:

$.fn.pluginname = function(args) {

};

You can do this:

$.pluginname = function(args) {

}:


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 24, 2009, at 10:59 AM, Nalum wrote:



Hello All,
I'm trying to create a plugin that I want to be able to call like
$.pluginname(...) where currently I have to call the plugin like  
this $

(...).pluginname.

Any help would be greatly appreciated.

Nalum




[jQuery] Re: Find top-level elements

2009-09-25 Thread Karl Swedberg

Hi Grimace,

You should get what you're trying to find by wrapping value in a  
.  Try this inside the success callback:


   var $value = $(' + value + '');
   var body = $value.find('body');
   var form = $value.find('form');
   var p = $value.find('p'); // Actual paragraphs


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 24, 2009, at 8:01 AM, Grimace of Despair wrote:



Working on WinXP in FireFox 3.0.14 with JQuery 1.3.2, I'm trying the
following code:

$.ajax({
 url: "http://foo.bar/document";
 data: 'r=' + Math.random(),
 success: function(value) {

   var body = $(value).find('body'); // Always empty
   var form = $(value).find('form'); // Always empty
   var p = $(value).find('p'); // Actual paragraphs

 }
});

Now, "body" and "form" are always empty, while "p" contains actual
paragraphs.

When I debug $(value) with Firebug, I see that it has become an array
with some text nodes (whitespace), some link nodes (css) and a form
node. The form node contains script nodes (although in the html, they
occur in the head) and the content html.

Now I'd like "body" and "form" to contain their respective counterpart
from the newly loaded content, but, aside from doing some custom
implementation, can I do that with JQuery in some way with a find?
Obviously, the current find on body/form does not work, because it's
applied iteratively on the array and it cannot find top-level element.
The find('p') does work because they are not top-level within an array
node.

Regards,

Grimace




[jQuery] Re: Trouble with backgroundPosition Plugin

2009-09-25 Thread Karl Swedberg
Not having looked at the plugin, this is just a guess, but the problem  
might be occurring because you have a repeating background.


Try changing this line in your CSS:

background:url(../gfx/btn_navbg.jpg) 0px 0px;

to this:

background:url(../gfx/btn_navbg.jpg) no-repeat 0 0;


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 24, 2009, at 2:11 PM, rob wrote:



Having some trouble with this plugin.  I've tried in both IE8 and FF3,
but it doesn't seem to work.

Basically the background position isn't moving...

the function toArray(strg) is suppose to return the following

return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];

this is the line where I'm getting an error code.  The values res[2]
and res[4] are coming back as NaN.  I'm not sure what these values
represent, or why they are Null.

I'm calling the backgroundPosition like this:

$('#nav li')
.css({backgroundPosition: "-150px 0px"})
.mouseover(function(){
$(this).stop().animate(
{backgroundPosition: "300px 
0px" },
{duration:200})
});


my css reads:

#nav li {
background:url(../gfx/btn_navbg.jpg) 0px 0px;

float:right;
min-width: 100px;
max-width: 150px;
margin:0;
padding:0;
text-align:center;
}


Any help would be much appreciated.




[jQuery] Re: Fix for Giva Labs linkselect plugin

2009-09-25 Thread Karl Swedberg
Nice one! Thanks for posting this. Chances are good that if you ran  
into the problem, someone else has, too.


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 25, 2009, at 2:38 AM, boermans wrote:



We noticed an issue with the jquery.linkselect plugin (version 1.2.08)
today.

When the container width would cause it to be positioned off the the
screen it is repositioned incorrectly if there is no title element.

I fixed this in anchorTo function by instead adding the width of the
anchor if there is no title:

// Replace
pos.left = (pos.left - $container.outerWidth()) + $title.outerWidth();

// With
if($title.length)
{
pos.left = (pos.left - $container.outerWidth()) + $title.outerWidth
();
}
else
{
pos.left = (pos.left - $container.outerWidth()) + $anchor.outerWidth
();
}

Hope that helps someone out.
Cheers
Ollie
--
http://www.ollicle.com




[jQuery] Re: How to combine event?

2009-09-25 Thread Karl Swedberg

Hi David,

You can combine events with a space in the first argument  
of .bind(): .bind('type1 type2 type3', function(event) { /*do  
something*/});
Pass the event object into the anonymous function and then determine  
which event was triggered with event.type. Here is an example:


$('a#cursor')
   .css({cursor: 'url(hand.cur), default'})
   .click(function() {
   return false;
   })
   .bind('mousedown mouseup mouseout', function(event) {
var myCursor = (event.type == 'mousedown') ? 'url(grab.cur),  
default' : 'url(hand.cur), default';

$(this).css({cursor: myCursor});
   });

Hope that helps.


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 25, 2009, at 1:48 AM, David .Wu wrote:



event mousedown and mouseup and mouseout actually do the same thing,
how to combine it?

$('a#cursor')
   .css({cursor: 'url(hand.cur), default'})
   .click(function() {
   return false;
   })
   .mousedown(function() {
   $(this).css({cursor: 'url(grab.cur), default'});
   })
   .mouseup(function() {
   $(this).css({cursor: 'url(hand.cur), default'});
   })
   .mouseout(function() {
   $(this).css({cursor: 'url(hand.cur), default'});
   });




[jQuery] Re: Free SMS Gateway

2009-09-25 Thread bharani kumar
ya its nice..useful one..

Anything other then this...

For india supportable one...

On Fri, Sep 25, 2009 at 5:33 PM, Anthony Brown(Worcester Wide Web) <
anth...@worcesterwideweb.com> wrote:

>  http://www.zeepmobile.com/
>
>
>
> bharani kumar wrote:
>
> Hi All ,
>
> If any one know free sms gateway server,
>
> Please share the details ,
>
> Thanks
>
>
>


-- 
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/


[jQuery] Re: Wait until animation completed - callback?

2009-09-25 Thread Merlin

does nobody have an idea? :-(



On Sep 23, 5:13 pm, Merlin  wrote:
> Hi there,
>
> I am building huge list with subcategories in each category that fade
> out once the mouse is placed over the category. It works great, BUT
> the problem is, if your mouse goes down the list vertically and the
> subcategories are fiew, then the obove subcategories fade out and your
> mouse is over the next category which is causing the next menu to fade
> in.
>
> I would need a way to make jquerywaitto fade out the next menüuntil
> the last one has disapeared. An area would be good, if the mouse
> leaves the subcategory area fade out or similar.
>
> Do you believe the callback function might be a solution? I could not
> think about how. Here is the code I am using:
> onmouseover="$('#51').slideToggle('fast');$('.subcategories:not
> (#51)').hide(700);"
>
> Thank you for any help!!
>
> Merlin


[jQuery] Re: Changing a class name without clicking

2009-09-25 Thread Lleoun

Thanks Liam, worked great!
And thanks to all for the approach.


[jQuery] Re: Every post I make, I get an mail error.

2009-09-25 Thread Cyril Lopez
>
> evo wrote:
>
> Everytime I post to this group through thunderbird, I get a
> undelivered mail message sent back, everytime.
> This has only started happening recently and I can't find any info
> about it anywhere.
>
> Just want to know if this is happening to anyone else (as it's only
> when I post to this group)
>
>
> The same for me, with gmail.
Cyril


[jQuery] Re: Every post I make, I get an mail error.

2009-09-25 Thread Charlie





been getting same thing from same "ekster" domain , also when using
Thunderbird. The first time it happened a week or 2 ago the messages it
told me couldn't be delivered were 2 months old, now sends back current
messages very strange

evo wrote:

  Everytime I post to this group through thunderbird, I get a
undelivered mail message sent back, everytime.
This has only started happening recently and I can't find any info
about it anywhere.

Just want to know if this is happening to anyone else (as it's only
when I post to this group)

This is the mail I get.
-
This is the mail system at host ekster.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

   The mail system

: Command died with status 127: "/usr/bin/procmail
#rene".
Command output: sh: /usr/bin/procmail: not found



Reporting-MTA: dns; ekster
X-Postfix-Queue-ID: 6B8B47BA1B7
X-Postfix-Sender: rfc822; radioactiv...@gmail.com
Arrival-Date: Fri, 25 Sep 2009 08:12:18 +0200 (CEST)

Final-Recipient: rfc822; r...@localhost
Original-Recipient: rfc822;r...@localhost
Action: failed
Status: 5.3.0
Diagnostic-Code: x-unix; sh: /usr/bin/procmail: not found

  






[jQuery] Re: Parse encoded HTML in XML node

2009-09-25 Thread Jeff

Fabian,

Here's the js:

$(document).ready(function() {
$.ajax({
type: "GET",
url: "sample.xml",
dataType: "xml",
success: function(data) {
$(data).find('item').each(function() {
var $item = $(this);
var $link = $item.find('link').text();
var $title = $item.find('title').text();
var $content = 
alert($item.find('content').text());
});
}
});
});

and here's a slimmed-down version of my XML file (this would be
contained in "sample.xml"):


http://purl.org/dc/elements/1.1/"; xmlns:content="http://
purl.org/rss/1.0/modules/content/" version="2.0">

Lorem Ipsum
http://www.sample.com
Lorem Ipsum lorem lorem

Lorem Ipsum
http://www.sample.com/2009/09/per-ma-link.html
Lorem Ipsum Lorem Ipsum lorem lorem Lorem Ipsum lorem
lorem Lorem Ipsum lorem lorem

Lorem Ipsum Hi Jeff, > > Could you post your JS code and your XML? I'd like to play around with > it for you, but things aren't really clear right now ;-) > > Fabian > > On 23 sep, 21:36, Jeff wrote: > > > Hi, > > > I'm using $.ajax with a dataType of xml.  The XML document I'm getting > > has a node that contains a bunch of encoded HTML.  Sample: > > >

[jQuery] Re: Free SMS Gateway


http://www.zeepmobile.com/


bharani kumar wrote:

Hi All ,

If any one know free sms gateway server,

Please share the details ,

Thanks




[jQuery] Re: Deactivating parent link with JQuery


Thanks Ryan for the alternative,

However, I need to do the following now (see message above your last
post):

I need to highlight *only* the top-parent item (the same one I just
ran 'return false;' on) with the class 'nav-selected'.

Any idea how I could do that?

Thanks,

osu




On Sep 25, 11:13 am, "ryan.j"  wrote:
> rather than removing the href you could use the preventDefault
> function, which will leave the href intact should you want to unbind
> it at a later date.
>
> usage is something like..
>
> $('a.submit-button').click(function(e){
>         e.preventDefault();
>         doSubmit( $(this).html() );
>
> })
>
> On Sep 24, 5:32 pm, osu  wrote:
>
> > Thanks Andi,
>
> > Yes, I meant an unordered list as you showed.
>
> > Rather than remove the  tag, is it possible to just 'deactivate'
> > it? i.e. when you click it, nothing happens, but the  tag stays in
> > place?
>
> > I ask, because I'd like to keep the CSS as simple as possible.
>
> > Thanks,
>
> > osu
>
> > On Sep 24, 6:05 pm, Andi23  wrote:
>
> > > First of all, let's clarify the actual HTML.  I assume this is what
> > > you have:
> > > 
> > >     Link 1
> > >     Link 2
> > >     Link 3
> > >         
> > >             Link 3a
> > >             Link 3b
> > >             Link 3c
> > >         
> > >     
> > >     Link 4
> > > 
>
> > > When you say "remove the link", I assume you want to turn this:
> > > Link 3
> > > into this:
> > > Link 3
>
> > > Given that, try this jQuery:
> > > $("li ul").siblings("a").each(function(){
> > >     $(this).replaceWith($(this).html());
>
> > > });


[jQuery] Free SMS Gateway

Hi All ,

If any one know free sms gateway server,

Please share the details ,

Thanks


[jQuery] Re: Load quicktime as needed


Actually, after reading over your post again, it looks like what you
need is to set autoBuffering: false
autoBuffering: false will prevent the media from loading until the
play button it presses.  It differs from autoPlay: false which simply
prevents it from player, but buffers anyhow.

So, your code may look something like this. You can add in and define
a host of different options.

flowplayer("player", 'http://www.your-website.com/path-to-flowplayer/
flowplayer-3.1.3.swf', {
clip: {
url: path-to-your-media,
autoPlay: false,
autoBuffering: false, //<-- THIS IS YOUR GOLDEN NUGGET
seekableOnBegin: true
},
plugins: {// load one or more plugins
controls: {// load the controls plugin
url: 'path-to-controls-plugin/flowplayer.controls-3.1.3.swf',
backgroundColor: '#927150',
timeBgColor: '#00',
progressGradient: 'low',
height: 20,
scrubber: true,
} //Ends controls
} //Ends plugins
}); //Ends flowplayer

On Sep 24, 8:51 am, RealMason  wrote:
> I'm a total jquery newbie and I'm just trying to find out if something
> is possible.
>
> If I have a full album worth of songs that I want to list on a web
> page, can I use jquery to only embed the quicktime file after the user
> clicks on a play button for that track.
>
> Similar to Amazon's or iTunes play button per track.
>
> The way I'm doing it right now, every song is embedded and therefore
> is progressively downloading and soaking up bandwidth even though the
> user may only listen to one song (or none).
>
> Essentially, I want the song to only progressively download IF the
> user clicks play.
>
> I am NOT asking about autoplay versus click to play... instead my
> question is about controlling the point in time that the file gets
> embedded and starts downloading to the browser.
>
> Any direction would be appreciated. I do have the "jquery.media.js"
> plug in.
>
> My ideal solution would be a list of song titles and a play button.
> When the user clicks the play button, the quicktime play is revealed
> below the title and ONLY at that moment does the file start
> downloading.
>
> Thanks.


[jQuery] Re: Load quicktime as needed


> My ideal solution would be a list of song titles and a play button.
> When the user clicks the play button, the quicktime play is revealed
> below the title and ONLY at that moment does the file start
> downloading.

If you are using the media plugin then just invoke "media" on the
desired element when a play button is clicked.  For example, given
markup like this:


Play
Song Title


I would use script something like this:

$('button.play').click(function() {
$(this).next('span.song').media();
});



[jQuery] Re: Load quicktime as needed


Actually, what I think you're looking for is the Flowplayer option
autoBuffering, which differs from autoPlay.  autoPlay determines
whether or not the video will play automatically, but autoBuffering is
a different method that will prevent it from buffering as well.

You'll have to learn how to setup Flowplayer first, of course, but
once you do, set autoBuffering to false, like this:

flowplayer("player", 'http://www.your-website/path-to-flowplayer/
flowplayer-3.1.1.swf', {
clip: {
url: path-to-your-media-file,
autoPlay: false,
autoBuffering: false,
seekableOnBegin: true
}
plugins: {// load one or more plugins
controls: {// load 
the controls plugin
url: 
'flowplayer.controls-3.1.1.swf',// always: where to
find the Flash object
backgroundColor: 
'#927150',
timeBgColor: '#00',
progressGradient: 'low',
height: 30,
scrubber: true,
tooltips: { 
   // this plugin object exposes a
'tooltips' object
buttons: true,
fullscreen: 
'Enter Fullscreen mode'
} //Ends tooltips
} //Ends controls
} //Ends plugins
});

http://flowplayer.org/documentation/configuration/clips.html

On Sep 24, 8:51 am, RealMason  wrote:
> I'm a total jquery newbie and I'm just trying to find out if something
> is possible.
>
> If I have a full album worth of songs that I want to list on a web
> page, can I use jquery to only embed the quicktime file after the user
> clicks on a play button for that track.
>
> Similar to Amazon's or iTunes play button per track.
>
> The way I'm doing it right now, every song is embedded and therefore
> is progressively downloading and soaking up bandwidth even though the
> user may only listen to one song (or none).
>
> Essentially, I want the song to only progressively download IF the
> user clicks play.
>
> I am NOT asking about autoplay versus click to play... instead my
> question is about controlling the point in time that the file gets
> embedded and starts downloading to the browser.
>
> Any direction would be appreciated. I do have the "jquery.media.js"
> plug in.
>
> My ideal solution would be a list of song titles and a play button.
> When the user clicks the play button, the quicktime play is revealed
> below the title and ONLY at that moment does the file start
> downloading.
>
> Thanks.


[jQuery] Re: IE: Cursor still displays hourglass symbol after unblocking


> > Yes, same problem I posted yesterday... funny we both hit it this
> > week.   hopefully someone can help??  I know the author of blockUI
> > says he monitors this forum...

Hmm, anyone have any ideas for how to force IE to honor the new cursor
style without having to move the mouse?  One that doesn't involve
putting a mouse listener on the document.

To mitigate the issue you can simply not use the wait cursor.  You can
override this via the CSS options of blockUI.

Mike


[jQuery] Re: Load quicktime as needed


I think I can help.  What I suggest is that you become familiar with
free and excellent Flowplayer and use it to embed your media files.
Here is a link:  http://flowplayer.org/

Flowplayer has lots of tools for scripters and jQuery developers.  It
has two methods that I've found that may be of use to you:
stopBuffering()
and...
onBufferStop

There's also onBufferFull and onBufferEmpty

There are also a host of other methods that Flowplayer has that you
may find useful.

See this documentation:
http://flowplayer.org/documentation/configuration/clips.html
http://flowplayer.org/apidoc/org/flowplayer/controller/StreamProvider.html

Good luck.

On Sep 24, 8:51 am, RealMason  wrote:
> I'm a total jquery newbie and I'm just trying to find out if something
> is possible.
>
> If I have a full album worth of songs that I want to list on a web
> page, can I use jquery to only embed the quicktime file after the user
> clicks on a play button for that track.
>
> Similar to Amazon's or iTunes play button per track.
>
> The way I'm doing it right now, every song is embedded and therefore
> is progressively downloading and soaking up bandwidth even though the
> user may only listen to one song (or none).
>
> Essentially, I want the song to only progressively download IF the
> user clicks play.
>
> I am NOT asking about autoplay versus click to play... instead my
> question is about controlling the point in time that the file gets
> embedded and starts downloading to the browser.
>
> Any direction would be appreciated. I do have the "jquery.media.js"
> plug in.
>
> My ideal solution would be a list of song titles and a play button.
> When the user clicks the play button, the quicktime play is revealed
> below the title and ONLY at that moment does the file start
> downloading.
>
> Thanks.


[jQuery] jqTransform + validate bassistance plugin

Hi, i've a problem with input radio validation.
I've two radio (accept and don't accept) for the privacy and obviously the
users have to click "accept".
Here my code:

$("#formContactPage").validate({

errorLabelContainer: $("p.error"),
rules: {
denominazione: "required",
cognome: "required",
jtitle: "required",
comune: "required",
tel: "required",
email: {
required: true,
email: true
},
check_informativa: {
required: true
}
},
messages: {
denominazione: "Il campo denominazione è
obbligatorio",
cognome: "Il campo cognome è obbligatorio",
jtitle: "Il campo job title è obbligatorio",
comune: "Il campo comune è obbligatorio",
tel: "Il campo telefono è obbligatorio",
email: "Il campo email non è corretto",
check_informativa: "Prima di procedere occorre accettare
il consenso al trattamento dei dati personali"
}
});


...
...



 Non accetto

 Accetto



ale


[jQuery] [autocomplete] auto complete based on additional input value


I'm using one of the examples from the demo files as a template.
Basically I'd like to auto suggest hospitals based on the zip code
that's entered from another input. Can someone recommend how do
accomplish this? TIA

This is the local data set:
var hospitals = [
{ name: "hospital 1", zip:
"1"},
{ name: "hospital 2",   zip: "2"},
{ name: "hospital 3",  zip:
"3"},
{ name: "hospital 4",  zip: "4"},
{ name: "hospital 5",zip:
"5"},
...


and here's the autocompleter:


$(document).ready(function(){

$("#example").autocomplete(hospitals, {
matchContains: "word",
max: 8,
width: 500,
scrollHeight: 300,

   extraParams: {
   return "1";
   },


formatItem: function(row, i, max) {
return row.name + " (zip code: " + row.zip + ")";
},

formatMatch: function(row, i, max) {
return row.name;
},

formatResult: function(row) {
return row.name;
}

});

});






[jQuery] Re: .click() fires my callback more than once


I've run into this problem many times as well.  The issue is that your
click function is being bound more than once.  To fix it, use
the .unbind() method.  .unbind() without any parameters will unbind
everything bound to that element, including your .click() function.
However, if you wish to unbind only the click() function and nothing
else, then use .unbind('click').  Here's what your code may look like:

$('#delete').click(function() {
confirmAction('Weet je zeker dat je de geselecteerde
pagina\'s wiltverwijderen?', 'destroy');
$(this).unbind();
});

Notice the .unbind() at the end.  This will prevent the bound .click()
function from stacking upon itself in future events.

See also:  http://docs.jquery.com/Events/unbind



On Sep 24, 4:26 am, Fabdrol  wrote:
> Hi guys,
>
> I'm facing this little problem, I've got a button toolbar, and users
> can select rows in a table. When they have selected some row's, they
> can click one of the buttons, and it invokes a callback.
>
> Problem is, when I click the first time, there's nothing wrong. But
> when I click the second time, it fires the callback two times, when I
> click the third time it fires the callback three times, and so on.
> That's a big problem, since the button is used to delete a page, and
> obviously it should delete it only once, since the AJAX would return
> an error ortherwise.
>
> The code is seperated in three blocks, first the the onclick on the
> button object, which invokes a function called confirmAction, taking
> to parameters. [1], a message for the users, [2] the name of the
> callback function. When the confirmation is confirmed, the
> confirmAction function calls the callback. As said before, when I
> click #delete once, it behaves like expected. But when I click the
> second time (without refresh) it runs the callback function twice,
> third time thrice, and so on.
>
> Below is my code...
>
> Thanks in advance!
>
> the onclick on the button object
> [code]
>         $('#delete').click(function() {
>                 confirmAction('Weet je zeker dat je de geselecteerde 
> pagina\'s wilt
> verwijderen?', 'destroy');
>         });
> [/code]
>
> the confirmation (global for my app, that's why callback is an
> parameter)
> [code]
> var confirmAction = function(msg, callback) {
>         var context = $('#confirmAction');
>         $('p.msg', context).html(msg);
>
>         $.blockUI({
>                 message: context,
>                 css: {
>                         border: 'none',
>                 padding: '15px',
>                 backgroundColor: '#000',
>                 '-webkit-border-radius': '10px',
>                 '-moz-border-radius': '10px',
>                 color: '#fff'
>                 }
>         });
>
>         $('#confirmYes').click(function() {
>                 $.unblockUI();
>                 base[callback](true);
>                 // [callback] is the function name, (true) the
> parameter.
>                 // base is global this cashed
>         });
>
>         $('#confirmNo').click(function() {
>                 $.unblockUI();
>                 return false;
>         });}
>
> [/code]
>
> the callback:
> [code]
> var destroy = function(yesno) {
>         var arr = new Array();
>
>         if(yesno == true) {
>                 $('input.do').each(function() {
>                         if($(this).attr('checked') == true) {
>                                 arr.push($(this).val());
>                         }
>                 });
>
>                 console.log(arr);
>         }};
>
> [/code]


[jQuery] Combining functions?


Hi all,

I'm new jquery. I'm trying to create a photo gallery/slideshow using
the cycle plugin. There will be three elements, a large graphic, a
text section, and a thumbnail gallery of the large graphics. I have
the large graphics and thumbnails connected (so when you click on the
thumbnail the correct photo comes up), but can't seem to connect these
elements to the title and text for the photo. The goal is to click on
the thumbnail and have it bring fade the graphic and the text!

So far here is what I have:


 

$(function(evt) {
$("a:has(img.gallery)").click(function() {
var largePath = $(this).attr("href");
var caption = $(this).attr("title");

$("#photo_large").attr({ src: largePath });
$("#caption1").text(caption);
return false;
});
$('#graphic').cycle({
fx: 'fade',
speed:   1000,
timeout: 1000,
next:   '#graphic',
pause:   1
});
$('#copy').cycle({
 fx: 'none',
speed:   1000,
timeout: 1,
next:   '#copy',
pause:   1
});
});








College Seen Photo Contest 2009

An image depicting a single mother balancing home life and school work
was selected from among 243 entries to win this year’s College Seen,
an annual photo contest co-sponsored by the Foundation, its
CollegeBuys program, and Adobe®
Read more >
Different Slide Altogether

An image depicting a single mother balancing home life and school work
was selected from among 243 entries to win this year’s
Read more >









[jQuery] how to get post data from a page loaded in iframe in parent page


how to get post data from a page loaded in iframe in parent page


[jQuery] Every post I make, I get an mail error.


Everytime I post to this group through thunderbird, I get a
undelivered mail message sent back, everytime.
This has only started happening recently and I can't find any info
about it anywhere.

Just want to know if this is happening to anyone else (as it's only
when I post to this group)

This is the mail I get.
-
This is the mail system at host ekster.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

   The mail system

: Command died with status 127: "/usr/bin/procmail
#rene".
Command output: sh: /usr/bin/procmail: not found



Reporting-MTA: dns; ekster
X-Postfix-Queue-ID: 6B8B47BA1B7
X-Postfix-Sender: rfc822; radioactiv...@gmail.com
Arrival-Date: Fri, 25 Sep 2009 08:12:18 +0200 (CEST)

Final-Recipient: rfc822; r...@localhost
Original-Recipient: rfc822;r...@localhost
Action: failed
Status: 5.3.0
Diagnostic-Code: x-unix; sh: /usr/bin/procmail: not found


[jQuery] Re: Validate Text Field onblur (Bassistance Validation Plugin)


Not at the moment, sorry

Dave Buchholz

On Sep 25, 12:51 am, Loony2nz  wrote:
> do you have an example of this somehwere?  I think I could use this
> for upcoming forms I have in my pipeline.
>
> Thanks!
>
> On Sep 1, 10:33 am, Dave Buchholz - I-CRE8  wrote:
>
> > Got it, this code onfocusout: function(element) { this.element
> > (element); }, gives me what I am looking for
>
> > Dave Buchholz


[jQuery] cycle plugin and dropdown menu


Hi
i'm using the cycle plugin below a dropdown. Problem is that the"
dropdowns"  stay behind the slideshow. They have position absolute and
higher z-index than the slideshow.

Any solution?

http://www.francesconizzola.it/_demo/

Thanks Vitto


[jQuery] Re: Trying to use fadein and fade out with mouseover and mouseout functions.


if i'm reading your question right, on the menu button's mouseover
function you could call $('#menu').stop() to end any animation
effects.

http://docs.jquery.com/Effects/stop

copy paste some code in jsbin.com if you can, it's always easier to
sort stuff like this with code to look at.

On Sep 25, 4:55 am, "shyhockey...@gmail.com" 
wrote:
> Hi, I am  using the fade in and fade out  and mouse over and mouse
> out.
>
> What I am doing is creating a menu that fades in when the mouse if
> over the users image.
>
> The problem I run into is that when the background of the menu fades
> in with the buttons which are links. I notice that if you move the
> mouse over the buttons/links the menu and buttons fade out.
>
> I have 2 elements one is the menus background and the other element is
> the buttons/links on top of the background.
>
> I have a fade out command when the mouse it off the menu background.
> So I am guessing when the mouse goes over the links/buttons it acts as
> if the mouse isn't no longer over the menu background element causing
> a fade out effect.
>
> What can I do to prevent  the menu fading out when the mouse is over
> the buttons that are links.
>
> I want the users to be able to put their mouses on the buttons and be
> able to click on the buttons without the menu fading out but only fade
> out if the mouse is not longer on the background of the menu and is
> not over any of the buttons on the menus background.
>
> I was woundering if I should do a if statement to check the conditions
> which would be where the mouse is over.
>
> If the mouse is over either the menu background meaning the menu or is
> over the buttons on the menu background meaning the opitions in the
> menu. Then don't do a fade out  only do a fade out if the mouse is not
> over  either the buttons or the menu itself.
>
> how   could I do this?


[jQuery] Re: Trying to use fadein and fade out with mouseover and mouseout functions.


if i'm this right, on the menu button's mouseover function you could
call $('#menu').stop() to end any animation effects.

http://docs.jquery.com/Effects/stop


On Sep 25, 4:55 am, "shyhockey...@gmail.com" 
wrote:
> Hi, I am  using the fade in and fade out  and mouse over and mouse
> out.
>
> What I am doing is creating a menu that fades in when the mouse if
> over the users image.
>
> The problem I run into is that when the background of the menu fades
> in with the buttons which are links. I notice that if you move the
> mouse over the buttons/links the menu and buttons fade out.
>
> I have 2 elements one is the menus background and the other element is
> the buttons/links on top of the background.
>
> I have a fade out command when the mouse it off the menu background.
> So I am guessing when the mouse goes over the links/buttons it acts as
> if the mouse isn't no longer over the menu background element causing
> a fade out effect.
>
> What can I do to prevent  the menu fading out when the mouse is over
> the buttons that are links.
>
> I want the users to be able to put their mouses on the buttons and be
> able to click on the buttons without the menu fading out but only fade
> out if the mouse is not longer on the background of the menu and is
> not over any of the buttons on the menus background.
>
> I was woundering if I should do a if statement to check the conditions
> which would be where the mouse is over.
>
> If the mouse is over either the menu background meaning the menu or is
> over the buttons on the menu background meaning the opitions in the
> menu. Then don't do a fade out  only do a fade out if the mouse is not
> over  either the buttons or the menu itself.
>
> how   could I do this?


  1   2   >