[jQuery] Re: Find: Looks simple, but isn't working as expected...

2007-09-21 Thread Richard D. Worth
On 9/19/07, Jeffrey Herr <[EMAIL PROTECTED]> wrote:
>
>
> Narrative:
> I'm trying to scrape a Wiki page within my company, extract the header
> text only, then include that into the home page on our Intranet.
> I thought: easy!  I load the Wiki page into separate DOM starting at
> the Div containing the actual content, find all the 'h3' elements, and
> for each one, extract the text and append to a Div on my home page.
> Sounds simple, but for the life of me, I can't get things to work
> right...
> 1) the find() isn't working.  When it's in, it finds nothing.
> 2) the empty() isn't working; the 'span'  is what's handed to me when
> I remove the 'find()' filter.
>
> Any ideas how to do what I'm trying to accomplish?  Less importantly,
> what am I misunderstanding about the code shown below?
>
> Thanks for the help-
>
> Jeff
>
> - - - - - - - - - - - - - -
>
> 
> {snip}
> $(document).ready(function(){
> $("#loadpage").empty() ;
> var myDOM = new jQuery("") ;
> myDOM.empty() ;
>
> var mydata = myDOM.load("/jamwiki/en/TechTesting
> #content-
> article") ;
> mydata.find("h3").each(function(i) {
> alert("Got one!" ) ;
> $("#loadpage").append($(this)) ;
> return true ;
> } ) ;


Here's what's happening. You call myDOM.load(...) and it runs out to fetch
your content. While it's gone doing that, the next statement executes
immediately. That's why it's not find()-ing any h3s. The content isn't back
yet. load() accepts as a third parameter a callback function. The function
you pass will get called when the content returns and has been loaded in
your element. Use this guy to do your find(), each(), and append(). Or more
simply, (untested):

myDom.load(url,, function() {
  $("h3", this).appendTo("#loadpage");
});

Another thing - you're setting mydata = myDOM.load() as if load() is
returning the data. It's returning the same jQuery object that myDOM is. It
works as currently written, but it looks like something else, so that could
cause problems if code changes.

- Richard


[jQuery] Re: giving element focus through jQuery

2007-09-21 Thread Karl Rudd

 As long as you've actually selected an element that can gain focus
the "focus()" method _should_ work. Make sure that
$('[EMAIL PROTECTED]:last') is actually selecting an element.

If it is then try:
$('[EMAIL PROTECTED]:last')[0].focus();

Note the "[0]" on the end. That will retrieve the first raw DOM
element in the jQuery "array".

Karl Rudd

On 9/22/07, Eridius <[EMAIL PROTECTED]> wrote:
>
>
> I have created a link to add and input box.  is there a way to give that
> element focus like:
>
> $('[EMAIL PROTECTED]:last').focus();
>
> or something or do i have to use plain javascript?
> --
> View this message in context: 
> http://www.nabble.com/giving-element-focus-through-jQuery-tf4497022s15494.html#a12824567
> Sent from the JQuery mailing list archive at Nabble.com.
>
>


[jQuery] Re: BlockUI question

2007-09-21 Thread Jack Killpatrick

Thanks, Mike!

BTW, love this plugin, and have found cycle, form and rounded corners 
plugins to be awesome, too! (just thought I'd toss that in since I have 
your attentiongreat stuff ;-)


- Jack

Mike Alsup wrote:

Set all your cache vars to null.

$(window).unload(function() {
myCacheVar = null;
});

Mike


On 9/20/07, *Jack Killpatrick* < [EMAIL PROTECTED] > 
wrote:


Mike,

Would you mind elaborating on this ?

"Well, not exactly, but it does put the onus on you as the user to
clean up your cache before page unload."

What should I do to clean up the cache before page unload? I use
BlockUI for a bunch of things, so am curious.

Thanks,
Jack


Mike Alsup wrote:


I've faced the same frustration. Why not just hide the
displayed div
rather than removing it from the DOM? This would be my
preference as
well. Perhaps as an option.


Yeah, I should refactor it to behave that way; that makes good
sense.  Sorry for the frustration!
 


Does the example create a memory leak pattern via the circular
reference? I haven't checked it with drip, but it looks to me
like a
leak scenario.


Well, not exactly, but it does put the onus on you as the user to
clean up your cache before page unload.  Good point though, I
hadn't considered that.

@seedy:  Your technique solves the "must cache" problem but you
end up accumulating a lot of noise in the DOM because the
blocking elements are never removed (but they're created every time).

Mike







[jQuery] jquery 1.2.1 bug (copy iframe data to parent bug)

2007-09-21 Thread linuja
copy the data in iframe to its parent. It works fine in firefox and opera,
bug it can't in ie(both ie6 and ie7).

here is the test case.

the main html file code :

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml";>





var addData = function($data){
$('#test-data').append($data);
};









and here is the iframe html file code:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml";>





$(function(){
$('#test-div').click(function(){
window.parent.addData($('p').clone());
});
});




click me
test



when click the "click me", the __test__ should be append in the . It worked in firefox and opera, but can't in ie6 and
ie7.

thanks~


[jQuery] fadeIn to ajax submit succes callback

2007-09-21 Thread [EMAIL PROTECTED]

Hi this  is my code:

$(document).ready(function() {
var options = {
target:'.cfjq_form_target4',
beforeSubmit: function(){

$('.cfjq_form_target4').empty();
$('.loading4').show();
},
success: function() {
$('.loading4').hide();
}
};
$(".cfjq_form4").validate({

errorContainer: $(".messageBox4"),
errorLabelContainer: $(".messageBox4 
ul"),
wrapper: "li",

submitHandler: function(form) {
$(form).ajaxSubmit(options);
}
});
});

If I change my success like this:

  success: function() {
$('.loading4').hide();
$
('.cfjq_form_target4').fadeIn('slow');
}

Firefox do not show the fade effect at all.
IE7 do not validate any more the form and also loose the ajax
behavior.

Do I miss something.

Andrea



[jQuery] Re: Still trying to understand index function

2007-09-21 Thread Dave Methvin

> var firstPara = $("p#first").get();
> alert($("p").index(firstPara));

The .index() takes a DOM element as an argument, and you are passing
it the array of DOM elements from .get(). Try using .get(0) instead
and see if that helps.



[jQuery] Re: Help on clue tip

2007-09-21 Thread Karl Swedberg

On Sep 21, 2007, at 6:19 AM, mohsin wrote:


can we call clue tip in click, change etc events or in other
function ...if so then please tell me the way to do it





Hi, currently you can activate the clueTip on hover (default) or on  
click. I guess it makes sense to allow for other event binding, too.  
Maybe I'll implement that. One potential problem there, though, is  
that I have it set up to only show a clueTip on click if one isn't  
already visible (for complicated reasons).


Anyway, to make it work on click, you can just use the activation  
option, like so:


$('yourSelector').cluetip({activation: 'click'});

 * @option String activation: default is 'hover'. Set to 'click' to  
force the user to click the element in order to activate the clueTip.


To see this in action, go to http://plugins.learningjquery.com/ 
cluetip/demo/

click on the Examples link and then try example #7 in the default style.

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






[jQuery] OT: Google autofill(or any others) and form events

2007-09-21 Thread Eridius


I am doing some validation on a form using live validation.  One issue that
someone brought up is what about autofillers? is thier a way to trigger the
event with an autofiller or disable the use of auto filler on that form
element?  it is a short form so i don't care are disabling that.
-- 
View this message in context: 
http://www.nabble.com/OT%3A-Google-autofill%28or-any-others%29-and-form-events-tf4498171s15494.html#a12828546
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Metadata plugin performance issues

2007-09-21 Thread Erik Beeson
Thanks for this info. I eventually gave up on the metadata plugin in favor
of a global variable for holding my metadata. So instead of
$('#someID')[0].data, I now just do mynamespace.mydata['someID'].

You mention breaking up the if statement to keep a function call from
happening. Thanks to logical operator short-circuiting, all you have to do
is move this.metaDone to before the function call, like so:

if ( this.metaDone || this.nodeType == 9 || $.isXMLDoc(this) ) return;

See here for more info:
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Operators:Logical_Operators#Short-Circuit_Evaluation

--Erik


On 9/21/07, Diego A. <[EMAIL PROTECTED]> wrote:
>
>
> I've written a short article about Metadata plugin performance issues
> in my blog:
>
> http://fyneworks.blogspot.com/2007/09/jquery-metadata-plugin-performance.html
>
> I was wondering what you guys think about it...
> ...also might help people with the same problem.
>
>


[jQuery] Metadata plugin performance issues

2007-09-21 Thread Diego A.

I've written a short article about Metadata plugin performance issues
in my blog:
http://fyneworks.blogspot.com/2007/09/jquery-metadata-plugin-performance.html

I was wondering what you guys think about it...
...also might help people with the same problem.



[jQuery] Re: hide() question

2007-09-21 Thread Glen Lipka
I whipped up a demo.
http://www.commadot.com/jquery/fadeIn.php

FadeIn is not exactly the same thing as show() and hide().
If you have display:none, you need to show() the img first and then fade it
on.

Glen

On 9/21/07, HubGoblin <[EMAIL PROTECTED]> wrote:
>
>
> Please can you tell me how to achieve that: I want to have element
> that is hidden initially and I want to display it with fade effect
> when the page loads. If I create a div with display: none, or
> visibility: hidden i don't get any results.
>
> Please help.
>
>


[jQuery] Re: post data and get data in one request?

2007-09-21 Thread Jake McGraw

Ah, I think you can do something like:


  
  
  


and then in "myapp.php":



The trick is manually inserting the GET variables as URL parameters in
the form action field.

- jake

On 9/20/07, Codex <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> this is probably something very simple, but I don't get it. I want to
> post data to a php file that send the posted data to the DB. Then I
> would like to return the last inserted ID and use that on the same
> page the request was made from. How is this done? I know how to post
> and how to get, but not in the same request. Do I have to use Ajax?
>
> Maybe it's a little clearer if I mention it's for writing tags to the
> DB Flickr style.
>
> Need help! ;-)
>
>


[jQuery] Re: post data and get data in one request?

2007-09-21 Thread Josh Nathanson


Yup, you'll have to use ajax if you don't want to refresh the current page.

You'll probably want to use the Forms plugin to submit the form, then in 
your php somewhere, output the last inserted ID as the server response. 
Then you can use that new ID however you like as part of the callback 
function from the post.


-- Josh

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

To: "jQuery (English)" 
Sent: Thursday, September 20, 2007 4:30 PM
Subject: [jQuery] post data and get data in one request?




Hello,

this is probably something very simple, but I don't get it. I want to
post data to a php file that send the posted data to the DB. Then I
would like to return the last inserted ID and use that on the same
page the request was made from. How is this done? I know how to post
and how to get, but not in the same request. Do I have to use Ajax?

Maybe it's a little clearer if I mention it's for writing tags to the
DB Flickr style.

Need help! ;-)





[jQuery] hide() question

2007-09-21 Thread HubGoblin

Please can you tell me how to achieve that: I want to have element
that is hidden initially and I want to display it with fade effect
when the page loads. If I create a div with display: none, or
visibility: hidden i don't get any results.

Please help.



[jQuery] Form Variables

2007-09-21 Thread Beau

Hi Everyone,

I have a pretty weird issue that I am unable to solve myself.
I am using jQuery  and ColdFusion.

The issue is that for some unknown reason, that when I submit a form,
the form variable that has been jquerified is not submitted  - it is
not part of the form scope.

I have created a small test coldfusion form/page
and can successfully jquery "touched" fileds without error.
So I am confident it is not a coldfusion form / JS issue.

Yet when I try to insert the EXACT same code into an exisiting form
the form variable is lost.

Would anyone have any ideas that I could investigate?

Thanks in advance for anything you might be able to suggest.
Beau



[jQuery] post data and get data in one request?

2007-09-21 Thread Codex

Hello,

this is probably something very simple, but I don't get it. I want to
post data to a php file that send the posted data to the DB. Then I
would like to return the last inserted ID and use that on the same
page the request was made from. How is this done? I know how to post
and how to get, but not in the same request. Do I have to use Ajax?

Maybe it's a little clearer if I mention it's for writing tags to the
DB Flickr style.

Need help! ;-)



[jQuery] Getting jquery/impromptu to wait for a response?

2007-09-21 Thread dougXN

So am attempting to do a:

$(window).bind( 'beforeunload', function () { $.prompt( 'You have
unsaved data', { buttons: { Cancel: 'cancel', Save: 'save', Ok:
'ok' }, function (response, object) { . } } );

The funny thing is when you do the prompt it doesn't wait for the
response  it just keeps heading to the next page.

Any ideas how this can be made to stop and wait- like a confirm?

thanks
dn

ps: I posted this in the plug in section but it never got posted as
fara as I can tell...



[jQuery] Still trying to understand index function

2007-09-21 Thread [EMAIL PROTECTED]

My understanding of the index function was that it takes an OBJECT to
match in a list of same type objects so as a trivial example


$(document).ready(function(){

var firstPara = $("p#first").get();
alert($("p").index(firstPara));





});

with the following :


First para
Second para


seemingly should work...
It does not. Just looking for some advice so I can move on to finding
indexes of classed  and do some interesting things I have in mind.
Thanks for any help in advance.



[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit

I wonder if the problem in my application would be the fact that my
 is actually an ASP.Net DropDownList control that get
converted to a  at run time?

On Sep 21, 12:00 pm, hobbit <[EMAIL PROTECTED]> wrote:
> That is interesting. I tried your test page and it also works for me.
> I wonder why it is not working in my application.
>
> On Sep 21, 11:14 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Your code worked for me in IE and FF:
>
> >http://pastie.caboo.se/99419
>
> > - Richard
>
> > On 9/21/07, hobbit <[EMAIL PROTECTED]> wrote:
>
> > > I tried all the following and get no alerts:
>
> > > $("select").keyup(function() {
> > >   alert("here1");
> > > });
> > > $("select").keydown(function() {
> > >   alert("here2");
> > > });
> > > $("select").keypress(function() {
> > >   alert("here3");
> > > });
> > > $("select").mousedown(function() {
> > >   alert("here4");
> > > });
> > > $("select").mouseout(function() {
> > >   alert("here5");
> > > });
> > > $("select").mouseup(function() {
> > >   alert("here6");
> > > });
>
> > > On Sep 21, 10:01 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> > > > The change event doesn't fire until the input is blurred (focus moves
> > > away
> > > > from the dropdown via tab-key or mouse click elsewhere). If you want to
> > > > handle the "changes" to the selected option while they're being changed,
> > > try
> > > > keydown, keyup, or keypress.
>
> > > > - Richard
>
> > > > On 9/21/07, Brook Davies <[EMAIL PROTECTED]> wrote:
>
> > > > > I've tried this, but it does not catch change events trigged by the
> > > > > keyboard. Why?
>
> > > > > Brook
>
> > > > > -Original Message-
> > > > > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
> > > On
> > > > > Behalf Of Andy Matthews
> > > > > Sent: September 20, 2007 1:21 PM
> > > > > To: jquery-en@googlegroups.com
> > > > > Subject: [jQuery] Re: NEWBIE QUESTION: Catch Select event
>
> > > > > I believe you'd want the change handler.
>
> > > > > $("select").change(function() {
> > > > > //do some stuff here...
> > > > > )};
>
> > > > > -Original Message-
> > > > > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
> > > On
> > > > > Behalf Of hobbit
> > > > > Sent: Thursday, September 20, 2007 1:22 PM
> > > > > To: jQuery (English)
> > > > > Subject: [jQuery] NEWBIE QUESTION: Catch Select event
>
> > > > > Hi,
>
> > > > > I would like to catch the select event when a user changes the select
> > > item
> > > > > in any  in a form.  Something like:
>
> > > > > $("select").select(function() {
> > > > > //do some stuff here...
> > > > > )};
>
> > > > > Is this feasible?- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -



[jQuery] Superfish - pathclass question

2007-09-21 Thread steve35mm

Hi,

I'm currently using the pathclass version of the JQuery Superfish plug-
in to breadcrumb trail throughout a new site I'm building.  Here's a
direct link to the beta version:  http://www.aceconcrete.com/revised/

The client has requested that once the user selects a link from the
menu, the hovering animation stops.  So basically the homepage is the
only page that displays the superfish hovering effect.  The rest of
the pages are to hold the breadcrumb the active page tier and
"current" styling.  Is there a simple way to achieve via either css or
the superfish.js file itself?

NOTE:  I'm using PHP "if" statements to add the current class to each
page as the user navigates through the site.

This might be a completely newbie / beginner question, but any help
you could give would be MUCH appreciated.

Thanks!
Steve



[jQuery] Re: jQuery 1.2.1 is auto evaling scripts from AJAX before DOM is ready

2007-09-21 Thread Andy

Benjam,

Did you have any luck resolving this issue other than using the
setTimeout method?

thanks.


On Sep 17, 11:20 pm, benjam <[EMAIL PROTECTED]> wrote:
> I have a script that runs a clickable calendar date field, and this
> script is being called in a form that is passed through AJAX.
>
> When the form html is returned from the AJAX script, it is added to
> the page and displayed.
>
> The problem is that the script (which cames after the input field it
> is referring to) is trying to look for said input field and is failing
> to find it.  This leads me to believe that the javascript is being run
> before the html has been fully integrated into the page, which is also
> why there is nothing shown on the page when the errors pop up.
>
> Here is a sample of the script that is being run:
>  class="datedDate" value="1969-12-31" type="text" />Calendar.setup({ "ifFormat" : "%Y-%m-%d", "daFormat" : "%Y/
> %m/%d", "firstDay" : 0, "showOthers" : true, "inputField" : "f-
> calendar-field-8da04fa6e1", "button" : "f-calendar-
> trigger-8da04fa6e1"} );
>
> Is there a way to delay eval of the scripts until after the html
> content has been integrated into the page?



[jQuery] Re: Closing a thickbox from within a Flash movie

2007-09-21 Thread Alexandre Plennevaux
there is an old skool way: create a javascript function to close the
thickbox. then in your flash file: getURL("javascript:closeThickbox()");
 
 

   _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Benjamin Sterling
Sent: vendredi 21 septembre 2007 14:08
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Closing a thickbox from within a Flash movie


Gordon,
In your flash file you need to put:

import flash.external.*;

Then at the last frame put something like:

ExternalInterface.call("function(){\\code to close thickbox}");

If that does not work, try creating a new function on the javascript side
and call it like: 

ExternalInterface.call('closeFunction');


On 9/21/07, Gordon mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED] > wrote: 


I have been asked to update a website that provides help to the user
by opening up Flash videos in popups when the user clicks a link.  The
Powers That be want them to open in the page itself, so I've decided
to use a thickbox that links to a HTML page with the flash movie
embedded in it. 

This works well and the results are a definate improvement over the
popup windows, but I do have one question.  It may be desireable for
the thickbox to close itself when the video in the Flash player comes
to an end.  I was wondering, is there a way of triggering the Thickbox
to close itself when the player stops?






-- 
Benjamin Sterling
HYPERLINK "http://www.KenzoMedia.com"http://www.KenzoMedia.com
HYPERLINK "http://www.KenzoHosting.com"http://www.KenzoHosting.com 

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.488 / Base de données virus: 269.13.27/1020 - Date: 20/09/2007
12:07
 


[jQuery] Re: Get time of ajax post?

2007-09-21 Thread Josh Nathanson


Perfect Mike, thank you very much.

-- Josh

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

To: 
Sent: Friday, September 21, 2007 10:09 AM
Subject: [jQuery] Re: Get time of ajax post?




  function now() { return (new Date).getTime(); }

  // before the ajax call
  var before = now();

 // and in your ajax success callback:
 var elapsed = now() - before;

Time is in milliseconds, but actual resolution is usually less, e.g. 15 
millisecond resolution on a typical PC.


-Mike


From: Josh Nathanson

This is more of a JS queston in general than a jQuery
question: how do I get the time it took for an ajax post to complete?

I am trying to show a progress bar for an ajax post which may
take anywhere from 1 to 20 seconds.  It's a multi-row
database table update.  To do this I'm using the
"guesstimate" pattern described here:
http://ajaxpatterns.org/Progress_Indicator

To improve the accuracy, I'd like to do a "dummy" ajax post
to the server, get the amount of time it took, and use that
to calculate the total estimated time for the database
update, then do the actual multi-row update while the
progress bar is running.

I've seen timers for events in JS, such as the speed test
demos, but I can't figure out how to retrieve that
information from a completed ajax request.
Is what I'm trying to do possible?






[jQuery] Re: Get time of ajax post?

2007-09-21 Thread Michael Geary

   function now() { return (new Date).getTime(); }

   // before the ajax call
   var before = now();

  // and in your ajax success callback:
  var elapsed = now() - before;

Time is in milliseconds, but actual resolution is usually less, e.g. 15 
millisecond resolution on a typical PC.

-Mike

> From: Josh Nathanson
> 
> This is more of a JS queston in general than a jQuery 
> question: how do I get the time it took for an ajax post to complete?
> 
> I am trying to show a progress bar for an ajax post which may 
> take anywhere from 1 to 20 seconds.  It's a multi-row 
> database table update.  To do this I'm using the 
> "guesstimate" pattern described here:
> http://ajaxpatterns.org/Progress_Indicator
> 
> To improve the accuracy, I'd like to do a "dummy" ajax post 
> to the server, get the amount of time it took, and use that 
> to calculate the total estimated time for the database 
> update, then do the actual multi-row update while the 
> progress bar is running.
> 
> I've seen timers for events in JS, such as the speed test 
> demos, but I can't figure out how to retrieve that 
> information from a completed ajax request. 
> Is what I'm trying to do possible?



[jQuery] Re: Superfish - pathclass question

2007-09-21 Thread Joel Birch

Not sure what happened because I answered your other identical thread
earlier. To save confusion, here is my response again:

Hi Steve,

This is by no means a newbie question, and even if it was you would
still be more than welcome to ask it.

I had a bit of an experiment and what you are attempting can be
achieved fairly simply. Just add a class 'useSF' to the body element
for pages that you want to use Superfish hovers for (your home page),
then add that class to specific hover selectors in the css file. You
can see exactly which ones by looking at the file I applied this to
here:
http://users.tpg.com.au/j_birch/plugins/superfish/all-horizontal-example/allow-static.css
I based it on the all-horizontal demo and have since realised that you
have three levels of menu so you will need to add .useSF in two more
places for that. You might be able to figure that out, otherwise let
me know and I'll dig into your css and give you more accurate help.

The last step is to change the code that you use to initialise
Superfish so that it only runs on pages whose body element has the
class useSF. For example:

$(document).ready(function(){
   $("body.useSF ul.nav")
   .superfish({
   pathClass : 'current',
   animation : {opacity:'show'},
   delay : 1000
   });
});

Let me know if you have any problems. Good luck. Cool looking site, by the way!

Joel Birch.


[jQuery] Re: ids of elements in a string

2007-09-21 Thread spinnach


no, but it's easy to build a simple plugin that does that:

jQuery.fn.allIDs = function(){
  var IDs = [];
  this.each(function(){
if (this.id) IDs.push(this.id);
  });
  return IDs;
}

and use like:
var IDs = $(".list li").allIDs()

the plugin returns an array, if you want a string you can do this (or 
change the return IDs in the plugin to return IDs.join(',') ):

var IDstring = IDs.join(',');

dennis.

[EMAIL PROTECTED] wrote:

hi, i think im blind :/
is there any jquery function or a short way to get a string with all
ids of elements?
for example

$(".list li").allids()

output something like that:
element1,element2,element3






[jQuery] Re: .load() problem

2007-09-21 Thread [EMAIL PROTECTED]

Really no one got this issue before???

Thanks

Andrea

On Sep 21, 10:04 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Thanks fo rthe answer but no th epage that I load is not loading any
> JS.
> And I also have the problem that css do not apply to the code inserted
> in the page...
>
> Anyone had this problem??
>
> Thanks
>
> Andrea
>
> On Sep 21, 5:33 am, barnezz <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > If there is 20 requests, it means you've bind 20 time the event
> > click ;-)
>
> > So I don't think the problem is in this piece of code, but maybe come
> > from it's location???
> > Is there any js in the page you load? Don't you load again jquery.js
> > in the target div?
> > Is there so much request when you click for the first time?
>
> > I had such things that occured when I began whith jQuery, I was
> > loading a page that called jquery.js, but this must be done only once
> > or everything is done several times!
>
> > I don't know if this explanation is clear and if that'll solve your
> > problem, but maybe you should look in that way ?
>
> > Best regards.
>
> > $(barney)



[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Richard D. Worth
On 9/21/07, hobbit <[EMAIL PROTECTED]> wrote:
>
>
> This does not seem to work for me.  Could it be the version of jquery
> we are using?  We are using an older version, version 1.0.3.  Do you
> know if this is supported in that version?


In my code I changed jquery-latest.js to jquery-1.0.3.js and it still
worked. I guess it must be something else.

- Richard


[jQuery] Fwd: Getting jquery/impromptu to wait for a response?

2007-09-21 Thread Douglas Nichols

So am attempting to do a:

$(window).bind( 'beforeunload', function () { $.prompt( 'You have
unsaved data', { buttons: { Cancel: 'cancel', Save: 'save', Ok:
'ok' }, function (response, object) { . } } );

The funny thing is when you do the prompt it doesn't wait for the
response  it just keeps heading to the next page.

Any ideas how this can be made to stop and wait- like a confirm?

thanks
dn

ps: I posted this before but it never shows up???



-- 
Doug Nichols
Seattle, WA


[jQuery] Handling timeouts with jsonp ajax requests

2007-09-21 Thread Matt
Hi,

How jQuery handles timeouts on jsonp requests ? Does it call the error
callback ? something else ?

Basically a request like this one...

[]
$.ajax({'url' : url, 'data' : params, dataType : 'jsonp', timeout: 2500,
success : callback, error : callback});
[]

... does not seem to call the error callback when during more than 2.5 sec

Any help would be welcome :-)

thanks

-- 
Matthias ETIENNE


[jQuery] Help needed with Interface elements Autocomplete

2007-09-21 Thread miCRoSCoPiC^eaRthLinG

Hi guys,
 I'm playing around with the Autocomplete function of jQuery
Interface elements (http://interface.eyecon.ro/). Now I've managed to
put all the pieces together except one... i.e. when you start typing
in the autocomplete field, the data is being sent to the ajax backend
- but I can't figure out what variable to look for in the backend to
grab that data and match it with the autocompletion list.

My field is a country names field and the backend contains an array
with all the country names. So when you type a couple of characters in
the field - the data is sent to the backend, when do a strpos() check
against each array element and return the matches in XML format.

$('#country').Autocomplete( ... )

My question is - how do I read the data at the backend? I tried
$_POST['country'], $_GET['country'] etc... but nothign seems to work.
What variable is used to transport the data here?

Thanks,
m^e



[jQuery] Superfish - pathclass question

2007-09-21 Thread steve35mm

Hi,

I'm currently using the pathclass version of the JQuery Superfish plug-
in to breadcrumb trail throughout a new site I'm building.  Here's a
direct link to the beta version:  http://www.aceconcrete.com/revised/

The client has requested that once the user selects a link from the
menu, the hovering animation stops.  So basically the homepage is the
only page that displays the superfish hovering effect.  The rest of
the pages are to hold the breadcrumb the active page tier and
"current" styling.  Is there a simple way to achieve via either css or
the superfish.js file itself?

NOTE:  I'm using PHP "if" statements to add the current class to each
page as the user navigates through the site.

This might be a completely newbie / beginner question, but any help
you could give would be MUCH appreciated.

Thanks!
Steve



[jQuery] Get time of ajax post?

2007-09-21 Thread Josh Nathanson


Hey all,

This is more of a JS queston in general than a jQuery question: how do I get 
the time it took for an ajax post to complete?


I am trying to show a progress bar for an ajax post which may take anywhere 
from 1 to 20 seconds.  It's a multi-row database table update.  To do this 
I'm using the "guesstimate" pattern described here:

http://ajaxpatterns.org/Progress_Indicator

To improve the accuracy, I'd like to do a "dummy" ajax post to the server, 
get the amount of time it took, and use that to calculate the total 
estimated time for the database update, then do the actual multi-row update 
while the progress bar is running.


I've seen timers for events in JS, such as the speed test demos, but I can't 
figure out how to retrieve that information from a completed ajax request. 
Is what I'm trying to do possible?


-- Josh 



[jQuery] ids of elements in a string

2007-09-21 Thread [EMAIL PROTECTED]

hi, i think im blind :/
is there any jquery function or a short way to get a string with all
ids of elements?
for example

$(".list li").allids()

output something like that:
element1,element2,element3



[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit

This does not seem to work for me.  Could it be the version of jquery
we are using?  We are using an older version, version 1.0.3.  Do you
know if this is supported in that version?  I tried replacing the "//
do some stuff here" line with simply "alert("hello!");", but this
alert is not executed whenever any select statement is changed.

On Sep 20, 4:21 pm, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> I believe you'd want the change handler.
>
> $("select").change(function() {
> //do some stuff here...
> )};
>
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of hobbit
> Sent: Thursday, September 20, 2007 1:22 PM
> To: jQuery (English)
> Subject: [jQuery] NEWBIE QUESTION: Catch Select event
>
> Hi,
>
> I would like to catch the select event when a user changes the select item
> in any  in a form.  Something like:
>
> $("select").select(function() {
> //do some stuff here...
> )};
>
> Is this feasible?- Hide quoted text -
>
> - Show quoted text -



[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Christian Bach
Unfortunately :after renders as unknown in ie6 :(

So no luck there...

2007/9/21, Christian Bach <[EMAIL PROTECTED]>:
>
> That would be way cool, and not to hard to implement!
>
> /christian
>
> 2007/9/21, Brandon Aaron <[EMAIL PROTECTED]>:
> >
> > Well why not fix :after and :before too :)
> >
> > --
> > Brandon Aaron
> >
> > On 9/21/07, Christian Bach < [EMAIL PROTECTED] > wrote:
> > >
> > > Yeah that would make sense!
> > >
> > > A other thing that could be use full is to have a fix for the :focus
> > > selector in IE6.
> > > All though it will be returned as "unknown" in ie6.
> > >
> > >
> > > If you want to make a plugin and release it it's fine by me.
> > >
> > > /christian
> > >
> > > 2007/9/21, Fabien Meghazi < [EMAIL PROTECTED]>:
> > > >
> > > >
> > > > > > 1. The script only looks for declarations in the stylesheets,
> > > > that's the
> > > > > > beauty of it.
> > > > > yes, but I mean that if you look at the content of the cssRules
> > > > > variable you will see that there are a lot of css declaration
> > > > which
> > > > > could be avoided (or they can't ?)
> > > >
> > > > Christian,
> > > >
> > > > Ok, here's what I meant :
> > > > In parseCss(), checking if css selector contains ":hover" (and
> > > > return
> > > > if not) will only do stuff on css selectors where :hover is present.
> > > > I
> > > > guess in most cases this is what we want. (correct me if I'm wrong).
> > > > It's quite faster (I can feel it because I've got a 1ghz laptop :-)
> > > >
> > > > Anyway, here's a version of your script where we can choose if stuff
> > > >
> > > > should be done only for :hover selectors or not.
> > > >
> > > > Calling $.ie6HoverFix(); has the normal behaviour as you designed
> > > > it.
> > > > Calling $.ie6HoverFix(true);  will redo css declaration only for
> > > > :hover selectors
> > > >
> > > > Here it is. What do you think ?
> > > >
> > > > // ie6HoverFix - Author : Christian Bach
> > > > $.ie6HoverFix = function(only_hovers) {
> > > > if ($.browser.msie && $.browser.version < 7) {
> > > > only_hovers = only_hovers || false;
> > > > var cssRules = [], newStyleSheet =
> > > > document.createStyleSheet(),
> > > > styleSheets = document.styleSheets;
> > > > function parseCSS(rule) {
> > > > var prefix = "ie6fix-";
> > > > var select = rule.selectorText, style =
> > > > rule.style.cssText;
> > > > if (only_hovers && select.indexOf(":hover")
> > > > == -1) {
> > > > return;
> > > > }
> > > > var element = select.replace(/:(hover).*$/,
> > > > '');
> > > > var pseudo = 
> > > > select.replace(/[^:]+:([a-z-]+).*/i,
> > > > '$1');
> > > > var styleRule = element + "." + prefix +
> > > > pseudo;
> > > > var className = prefix + pseudo;
> > > > $(element).hover(function(e) {
> > > > $(this).addClass(className);
> > > > }, function(e) {
> > > > $(this).removeClass(className)
> > > > });
> > > > cssRules.push([styleRule,style]);
> > > > }
> > > > for (var i = 0, ii = styleSheets.length ; i < ii;
> > > > i++) {
> > > > for(var j = 0, jj =
> > > > styleSheets[i].rules.length; j < jj; j++) {
> > > > parseCSS(styleSheets[i].rules[j]);
> > > > }
> > > > }
> > > > for (var i = 0, ii = cssRules.length; i < ii; i++) {
> > > > var ruledef = cssRules[i][1];
> > > > if (ruledef.length != 0) {
> > > >  newStyleSheet.addRule(cssRules[i][0],
> > > > ruledef);
> > > > }
> > > > }
> > > > }
> > > > };
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Fabien Meghazi
> > > >
> > > > Website: http://www.amigrave.com
> > > > Email: [EMAIL PROTECTED]
> > > > IM: [EMAIL PROTECTED]
> > > >
> > >
> > >
> >
>


[jQuery] Klaus Tabs plugin & fcckeditor

2007-09-21 Thread Giovanni Battista Lenoci

Hi, I'm using klaus tabs plugin, but I have a problem with fckeditor.

I use the tab plugin for a multilingual site, then every language is
in a tab, and in every tab there is an fckeditor instance.

If I comment the line that initialize tabs I can write in every
textarea, if I initialize the plugin only the first fckeditor is
wirtable, the others seems to be readonly.

Can you help me?

bye



[jQuery] Re: jQueryHelp Forum Launched

2007-09-21 Thread Alexander Bilbie
http://www.jqueryhelp.com/

On 21/09/2007, Scott Sauyet <[EMAIL PROTECTED]> wrote:
>
>
> [EMAIL PROTECTED] wrote:
> > Just an FYI for everyone, I've launched a jQuery Forum to offer an
> > alternative method of discussion.
> > [ ... ]
> >
> > Hope to see some of you there!
>
> Where's there?  :)
>
>-- Scott
>
>


-- 
Kind Regards,
Alex Bilbie

Freelance website and graphics design
Quite Good Media Ltd

m: 07923 272797


[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit

That is interesting. I tried your test page and it also works for me.
I wonder why it is not working in my application.

On Sep 21, 11:14 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> Your code worked for me in IE and FF:
>
> http://pastie.caboo.se/99419
>
> - Richard
>
> On 9/21/07, hobbit <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I tried all the following and get no alerts:
>
> > $("select").keyup(function() {
> >   alert("here1");
> > });
> > $("select").keydown(function() {
> >   alert("here2");
> > });
> > $("select").keypress(function() {
> >   alert("here3");
> > });
> > $("select").mousedown(function() {
> >   alert("here4");
> > });
> > $("select").mouseout(function() {
> >   alert("here5");
> > });
> > $("select").mouseup(function() {
> >   alert("here6");
> > });
>
> > On Sep 21, 10:01 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> > > The change event doesn't fire until the input is blurred (focus moves
> > away
> > > from the dropdown via tab-key or mouse click elsewhere). If you want to
> > > handle the "changes" to the selected option while they're being changed,
> > try
> > > keydown, keyup, or keypress.
>
> > > - Richard
>
> > > On 9/21/07, Brook Davies <[EMAIL PROTECTED]> wrote:
>
> > > > I've tried this, but it does not catch change events trigged by the
> > > > keyboard. Why?
>
> > > > Brook
>
> > > > -Original Message-
> > > > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
> > On
> > > > Behalf Of Andy Matthews
> > > > Sent: September 20, 2007 1:21 PM
> > > > To: jquery-en@googlegroups.com
> > > > Subject: [jQuery] Re: NEWBIE QUESTION: Catch Select event
>
> > > > I believe you'd want the change handler.
>
> > > > $("select").change(function() {
> > > > //do some stuff here...
> > > > )};
>
> > > > -Original Message-
> > > > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
> > On
> > > > Behalf Of hobbit
> > > > Sent: Thursday, September 20, 2007 1:22 PM
> > > > To: jQuery (English)
> > > > Subject: [jQuery] NEWBIE QUESTION: Catch Select event
>
> > > > Hi,
>
> > > > I would like to catch the select event when a user changes the select
> > item
> > > > in any  in a form.  Something like:
>
> > > > $("select").select(function() {
> > > > //do some stuff here...
> > > > )};
>
> > > > Is this feasible?- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -



[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Matt Penner

Thanks Christian!  I had this same frustration on a recent product and
simply added a manual class for IE6.  It was a quick fix but you had
to remember to update both if the look and feel was ever changed.  I
like your method much better because it uses the actual original
:hover class definition.

Matt


From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Christian Bach
Sent: Friday, September 21, 2007 7:07 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Adding :hover css support to IE6 - ie6HoverFix

Hi list,

The other day i got feed up with ie6 not having :hover css support so
i decided to fix it.

Here is a simple script that solves the problem:
http://lovepeacenukes.com/jquery/ie6hoverfix/

/christian


[jQuery] Re: jQuery 1.2 - Serialize a form as JSON

2007-09-21 Thread Wizzud


Name a browser that will take the submission of...
  


  
... and transmit it as : prog.php?foo[]=bar1&foo[]=bar2

(and I suggest you test it first)


Christoph Roeder-2 wrote:
> 
> 
> Ok, Problem #1 is solved, but #2 isn't.
> 
> Now I've seen this in the jQuery Ajax-Docs [1]:
> 
>> If value is an Array, jQuery serializes multiple values with same key
>> i.e. {foo:["bar1", "bar2"]} becomes '&foo=bar1&foo=bar2'.
> 
> WTF?
> 
> Why not like every browser does it?
> 
> '&foo[]=bar1&foo[]=bar2'
> 
> [1] http://docs.jquery.com/Ajax/jQuery.ajax#options
> 
> Thanks
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jQuery-1.2---Serialize-a-form-as-JSON-tf4428762s15494.html#a12825126
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Christian Bach
That would be way cool, and not to hard to implement!

/christian

2007/9/21, Brandon Aaron <[EMAIL PROTECTED]>:
>
> Well why not fix :after and :before too :)
>
> --
> Brandon Aaron
>
> On 9/21/07, Christian Bach <[EMAIL PROTECTED] > wrote:
> >
> > Yeah that would make sense!
> >
> > A other thing that could be use full is to have a fix for the :focus
> > selector in IE6.
> > All though it will be returned as "unknown" in ie6.
> >
> >
> > If you want to make a plugin and release it it's fine by me.
> >
> > /christian
> >
> > 2007/9/21, Fabien Meghazi < [EMAIL PROTECTED]>:
> > >
> > >
> > > > > 1. The script only looks for declarations in the stylesheets,
> > > that's the
> > > > > beauty of it.
> > > > yes, but I mean that if you look at the content of the cssRules
> > > > variable you will see that there are a lot of css declaration which
> > > > could be avoided (or they can't ?)
> > >
> > > Christian,
> > >
> > > Ok, here's what I meant :
> > > In parseCss(), checking if css selector contains ":hover" (and return
> > > if not) will only do stuff on css selectors where :hover is present. I
> > >
> > > guess in most cases this is what we want. (correct me if I'm wrong).
> > > It's quite faster (I can feel it because I've got a 1ghz laptop :-)
> > >
> > > Anyway, here's a version of your script where we can choose if stuff
> > > should be done only for :hover selectors or not.
> > >
> > > Calling $.ie6HoverFix(); has the normal behaviour as you designed it.
> > > Calling $.ie6HoverFix(true);  will redo css declaration only for
> > > :hover selectors
> > >
> > > Here it is. What do you think ?
> > >
> > > // ie6HoverFix - Author : Christian Bach
> > > $.ie6HoverFix = function(only_hovers) {
> > > if ($.browser.msie && $.browser.version < 7) {
> > > only_hovers = only_hovers || false;
> > > var cssRules = [], newStyleSheet =
> > > document.createStyleSheet(),
> > > styleSheets = document.styleSheets;
> > > function parseCSS(rule) {
> > > var prefix = "ie6fix-";
> > > var select = rule.selectorText, style =
> > > rule.style.cssText;
> > > if (only_hovers && select.indexOf(":hover") ==
> > > -1) {
> > > return;
> > > }
> > > var element = select.replace(/:(hover).*$/,
> > > '');
> > > var pseudo = select.replace(/[^:]+:([a-z-]+).*/i,
> > > '$1');
> > > var styleRule = element + "." + prefix +
> > > pseudo;
> > > var className = prefix + pseudo;
> > > $(element).hover(function(e) {
> > > $(this).addClass(className);
> > > }, function(e) {
> > > $(this).removeClass(className)
> > > });
> > > cssRules.push([styleRule,style]);
> > > }
> > > for (var i = 0, ii = styleSheets.length ; i < ii; i++)
> > > {
> > > for(var j = 0, jj =
> > > styleSheets[i].rules.length; j < jj; j++) {
> > > parseCSS(styleSheets[i].rules[j]);
> > > }
> > > }
> > > for (var i = 0, ii = cssRules.length; i < ii; i++) {
> > > var ruledef = cssRules[i][1];
> > > if (ruledef.length != 0) {
> > >  newStyleSheet.addRule(cssRules[i][0],
> > > ruledef);
> > > }
> > > }
> > > }
> > > };
> > >
> > >
> > >
> > >
> > > --
> > > Fabien Meghazi
> > >
> > > Website: http://www.amigrave.com
> > > Email: [EMAIL PROTECTED]
> > > IM: [EMAIL PROTECTED]
> > >
> >
> >
>


[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Brandon Aaron
Well why not fix :after and :before too :)

--
Brandon Aaron

On 9/21/07, Christian Bach <[EMAIL PROTECTED]> wrote:
>
> Yeah that would make sense!
>
> A other thing that could be use full is to have a fix for the :focus
> selector in IE6.
> All though it will be returned as "unknown" in ie6.
>
>
> If you want to make a plugin and release it it's fine by me.
>
> /christian
>
> 2007/9/21, Fabien Meghazi <[EMAIL PROTECTED]>:
> >
> >
> > > > 1. The script only looks for declarations in the stylesheets, that's
> > the
> > > > beauty of it.
> > > yes, but I mean that if you look at the content of the cssRules
> > > variable you will see that there are a lot of css declaration which
> > > could be avoided (or they can't ?)
> >
> > Christian,
> >
> > Ok, here's what I meant :
> > In parseCss(), checking if css selector contains ":hover" (and return
> > if not) will only do stuff on css selectors where :hover is present. I
> > guess in most cases this is what we want. (correct me if I'm wrong).
> > It's quite faster (I can feel it because I've got a 1ghz laptop :-)
> >
> > Anyway, here's a version of your script where we can choose if stuff
> > should be done only for :hover selectors or not.
> >
> > Calling $.ie6HoverFix(); has the normal behaviour as you designed it.
> > Calling $.ie6HoverFix(true);  will redo css declaration only for
> > :hover selectors
> >
> > Here it is. What do you think ?
> >
> > // ie6HoverFix - Author : Christian Bach
> > $.ie6HoverFix = function(only_hovers) {
> > if ($.browser.msie && $.browser.version < 7) {
> > only_hovers = only_hovers || false;
> > var cssRules = [], newStyleSheet =
> > document.createStyleSheet(),
> > styleSheets = document.styleSheets;
> > function parseCSS(rule) {
> > var prefix = "ie6fix-";
> > var select = rule.selectorText, style =
> > rule.style.cssText;
> > if (only_hovers && select.indexOf(":hover") ==
> > -1) {
> > return;
> > }
> > var element = select.replace(/:(hover).*$/, '');
> > var pseudo = select.replace(/[^:]+:([a-z-]+).*/i,
> > '$1');
> > var styleRule = element + "." + prefix + pseudo;
> >
> > var className = prefix + pseudo;
> > $(element).hover(function(e) {
> > $(this).addClass(className);
> > }, function(e) {
> > $(this).removeClass(className)
> > });
> > cssRules.push([styleRule,style]);
> > }
> > for (var i = 0, ii = styleSheets.length ; i < ii; i++) {
> > for(var j = 0, jj = styleSheets[i].rules.length;
> > j < jj; j++) {
> > parseCSS(styleSheets[i].rules[j]);
> > }
> > }
> > for (var i = 0, ii = cssRules.length; i < ii; i++) {
> > var ruledef = cssRules[i][1];
> > if (ruledef.length != 0) {
> >  newStyleSheet.addRule(cssRules[i][0],
> > ruledef);
> > }
> > }
> > }
> > };
> >
> >
> >
> >
> > --
> > Fabien Meghazi
> >
> > Website: http://www.amigrave.com
> > Email: [EMAIL PROTECTED]
> > IM: [EMAIL PROTECTED]
> >
>
>


[jQuery] Sorting a jQuery object?

2007-09-21 Thread Gordon

I need to be able to reorder elements based on criteriaso I tried
coming up with a sorting function.  I ended up with something along
these lines:

var myElems = $(mySelector);

var temp = myElems.get ().sort (function (a, b) {// sort code goes
here});

myElems = $(temp);

This seems to work but it got me wondering, is there any sorting
functionality built into the jquery core?  Would I be able to avoid
the second jQuery invokation and the associated overhead (myElems = $
(temp);)?  Or is what I've come up with as good as can be done?



[jQuery] Suggestion for corner plugin to get lighter DOM

2007-09-21 Thread Erlend Schei

I'm a great fan of the corner plugin, but I came across a possible
weakness using the top/bottom setting.

If I specify that I want to use corners for only the top or bottom
halv of my container, the plugin will still add DOM elements for the
other half. This is in most cases invisible, but in IE6/IE7 it will
cause a side effect in certain cases, as it shifts divs two pixels,
causing underlying background color to become visible.

Manipulating the bottom of a div seems unnecessary when I just need
corners on the top.

I added a check that will prevent this behaviour. It just checks if
it's really neccesary to create the additional DOM for the current
edge:

for (var j in edges) {
var bot = edges[j];
-- inserted: --
if ( (bot && (opts.BL || opts.BR)) || (!bot && (opts.TR ||
opts.TR)) ) {
--- /inserted -
   // existing code that adds div elements
-- inserted: --
}
--- /inserted -
}

I presume the corner authors also scan this list, but I'm unsure who
maintains the "official" version. It'd be great if you could consider
adding this into the plugin, so that I don't have to use an edited
version of this great tool!



[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Christian Bach
Yeah that would make sense!

A other thing that could be use full is to have a fix for the :focus
selector in IE6.
All though it will be returned as "unknown" in ie6.


If you want to make a plugin and release it it's fine by me.

/christian

2007/9/21, Fabien Meghazi <[EMAIL PROTECTED]>:
>
>
> > > 1. The script only looks for declarations in the stylesheets, that's
> the
> > > beauty of it.
> > yes, but I mean that if you look at the content of the cssRules
> > variable you will see that there are a lot of css declaration which
> > could be avoided (or they can't ?)
>
> Christian,
>
> Ok, here's what I meant :
> In parseCss(), checking if css selector contains ":hover" (and return
> if not) will only do stuff on css selectors where :hover is present. I
> guess in most cases this is what we want. (correct me if I'm wrong).
> It's quite faster (I can feel it because I've got a 1ghz laptop :-)
>
> Anyway, here's a version of your script where we can choose if stuff
> should be done only for :hover selectors or not.
>
> Calling $.ie6HoverFix(); has the normal behaviour as you designed it.
> Calling $.ie6HoverFix(true);  will redo css declaration only for
> :hover selectors
>
> Here it is. What do you think ?
>
> // ie6HoverFix - Author : Christian Bach
> $.ie6HoverFix = function(only_hovers) {
> if ($.browser.msie && $.browser.version < 7) {
> only_hovers = only_hovers || false;
> var cssRules = [], newStyleSheet =
> document.createStyleSheet(),
> styleSheets = document.styleSheets;
> function parseCSS(rule) {
> var prefix = "ie6fix-";
> var select = rule.selectorText, style =
> rule.style.cssText;
> if (only_hovers && select.indexOf(":hover") == -1)
> {
> return;
> }
> var element = select.replace(/:(hover).*$/, '');
> var pseudo = select.replace(/[^:]+:([a-z-]+).*/i,
> '$1');
> var styleRule = element + "." + prefix + pseudo;
> var className = prefix + pseudo;
> $(element).hover(function(e) {
> $(this).addClass(className);
> }, function(e) {
> $(this).removeClass(className)
> });
> cssRules.push([styleRule,style]);
> }
> for (var i = 0, ii = styleSheets.length; i < ii; i++) {
> for(var j = 0, jj = styleSheets[i].rules.length; j
> < jj; j++) {
> parseCSS(styleSheets[i].rules[j]);
> }
> }
> for (var i = 0, ii = cssRules.length; i < ii; i++) {
> var ruledef = cssRules[i][1];
> if (ruledef.length != 0) {
> newStyleSheet.addRule(cssRules[i][0],
> ruledef);
> }
> }
> }
> };
>
>
>
>
> --
> Fabien Meghazi
>
> Website: http://www.amigrave.com
> Email: [EMAIL PROTECTED]
> IM: [EMAIL PROTECTED]
>


[jQuery] Re: $(document) bug?

2007-09-21 Thread Hackfrag

I have the same Problem :/

On 13 Sep., 17:20, hans <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just downloaded the latest version(1.2) and the $(document) object
> doesn't seem to be functioning. I tried the new $(document).height()
> which always returns 0 (zero) for me and binding the resize event
> isn't working for me either. The code:
>
> $(document).height();
>
> $(document).resize(function(){
>   alert("Stop it!");
>
> });
>
> Is this a bug or am i missing something? :)
>
> thanks,
> Hans



[jQuery] Validation plugin - alphanumeric password with min length

2007-09-21 Thread voltron

Hi,

has anyone written a validator to check for alphanumeric values and a
min length for the validator plug in?

thanks



[jQuery] Re: jQuery 1.2 - Serialize a form as JSON

2007-09-21 Thread Christoph Roeder

Ok, Problem #1 is solved, but #2 isn't.

Now I've seen this in the jQuery Ajax-Docs [1]:

> If value is an Array, jQuery serializes multiple values with same key i.e. 
> {foo:["bar1", "bar2"]} becomes '&foo=bar1&foo=bar2'.

WTF?

Why not like every browser does it?

'&foo[]=bar1&foo[]=bar2'

[1] http://docs.jquery.com/Ajax/jQuery.ajax#options

Thanks



[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Fabien Meghazi

> > 1. The script only looks for declarations in the stylesheets, that's the
> > beauty of it.
> yes, but I mean that if you look at the content of the cssRules
> variable you will see that there are a lot of css declaration which
> could be avoided (or they can't ?)

Christian,

Ok, here's what I meant :
In parseCss(), checking if css selector contains ":hover" (and return
if not) will only do stuff on css selectors where :hover is present. I
guess in most cases this is what we want. (correct me if I'm wrong).
It's quite faster (I can feel it because I've got a 1ghz laptop :-)

Anyway, here's a version of your script where we can choose if stuff
should be done only for :hover selectors or not.

Calling $.ie6HoverFix(); has the normal behaviour as you designed it.
Calling $.ie6HoverFix(true);  will redo css declaration only for
:hover selectors

Here it is. What do you think ?

// ie6HoverFix - Author : Christian Bach
$.ie6HoverFix = function(only_hovers) {
if ($.browser.msie && $.browser.version < 7) {
only_hovers = only_hovers || false;
var cssRules = [], newStyleSheet = document.createStyleSheet(),
styleSheets = document.styleSheets;
function parseCSS(rule) {
var prefix = "ie6fix-";
var select = rule.selectorText, style = 
rule.style.cssText;
if (only_hovers && select.indexOf(":hover") == -1) {
return;
}
var element = select.replace(/:(hover).*$/, '');
var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, '$1');
var styleRule = element + "." + prefix + pseudo;
var className = prefix + pseudo;
$(element).hover(function(e) {
$(this).addClass(className);
}, function(e) {
$(this).removeClass(className)
});
cssRules.push([styleRule,style]);
}
for (var i = 0, ii = styleSheets.length; i < ii; i++) {
for(var j = 0, jj = styleSheets[i].rules.length; j < 
jj; j++) {
parseCSS(styleSheets[i].rules[j]);
}
}
for (var i = 0, ii = cssRules.length; i < ii; i++) {
var ruledef = cssRules[i][1];
if (ruledef.length != 0) {
newStyleSheet.addRule(cssRules[i][0], ruledef);
}
}
}
};




-- 
Fabien Meghazi

Website: http://www.amigrave.com
Email: [EMAIL PROTECTED]
IM: [EMAIL PROTECTED]


[jQuery] giving element focus through jQuery

2007-09-21 Thread Eridius


I have created a link to add and input box.  is there a way to give that
element focus like:

$('[EMAIL PROTECTED]:last').focus();

or something or do i have to use plain javascript?
-- 
View this message in context: 
http://www.nabble.com/giving-element-focus-through-jQuery-tf4497022s15494.html#a12824567
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: jQueryHelp Forum Launched

2007-09-21 Thread Scott Sauyet


[EMAIL PROTECTED] wrote:

Just an FYI for everyone, I've launched a jQuery Forum to offer an
alternative method of discussion.
[ ... ]

Hope to see some of you there!


Where's there?  :)

  -- Scott



[jQuery] Re: IE 6 issues with ajax call

2007-09-21 Thread meddling

I'm very interested in this as well.  I'm running into the same
problem with my mockup project.  Runs fine in Mozilla (like most
things :)), but IE fails silently.  I really wish I had some sort of
Firebug for IE, so I could at least see if the HTTP requests were
being sent (and if they were giving proper responses).  I'd assume the
server response is valid -- since the browser shouldn't make much of a
difference there -- but if it's a Javascript issue, why doesn't IE
report an error?

My head has been hurting on this one for the past week!

Someone enlighten us, please! :)

Jonathon

On Sep 20, 3:53 pm, m2web <[EMAIL PROTECTED]> wrote:
> When loading the following into IE 6. I get no error. Nothing. Any
> help is appreciated.
>
> 
>   
> Parse XML with JQuery
> 
> 
>
>   $(function() {
> $.ajax({
>   type: "POST",
>   url: "books.xml",
>   dataType: "xml",
>   success: function(xmlData)
>   {
> xmlDataSet = xmlData;
> buildHTMLFromXML();
>   }
> });
>   });
>
>   function buildHTMLFromXML()
>   {
>   resultSetLength = $("book",xmlDataSet).length;
>
>   strToAppend = "There are a total of " + resultSetLength
> + " books.
"; > strToAppend += "
"; > $("title",xmlDataSet).each(function(i) { > strToAppend += "" + $(this).text() + "
"; > > strToAppend += "by " + $("author:eq(" + parseInt(i) + > ")",xmlDataSet).text() + "
"; > strToAppend += "Publisher: " + $("publisher:eq(" + parseInt(i) > + ")",xmlDataSet).text() + "
"; > strToAppend += "ISBN-10: " + $("isbn:eq(" + parseInt(i) + > ")",xmlDataSet).text(); > strToAppend += "
"; > strToAppend += "
***"; > strToAppend += "
"; > }); > /* > Populate our DIV with the HTML String > */ > $("#widget").html(strToAppend); > } > > > > > >

[jQuery] jQueryHelp Forum Launched

2007-09-21 Thread [EMAIL PROTECTED]

Just an FYI for everyone, I've launched a jQuery Forum to offer an
alternative method of discussion.

"The purpose of this forum is to offer the quickest form of topic
based conversation for jQuery users.

Currently, there is only a mailing list which offers latent responses,
but does have the largest user base and is a great resource. Though,
there have been many requests for a forum so I have happily taken the
initiative to set something up.

Hopefully we can grow as a community here and help each other learn
and get through problems and make a new home for jQuery users.

Sincerely,
Chrys Bader (aclevercookie.com)"

Hope to see some of you there!



[jQuery] Re: element.css("background") returns undefined

2007-09-21 Thread Richard D. Worth
Here's some more info:

http://www.w3.org/TR/CSS21/box.html#propdef-margin

> The 'margin' property is a shorthand property for setting 'margin-top',
> 'margin-right', 'margin-bottom', and 'margin-left' at the same place in the
> style sheet.

(emphasis mine)

on the same page, the inital value is defined as 0 for each of the top,
right, bottom, and left. For margin's initial property, it says "see
individual properties".

It is interesting that you can set each of the t,r,b,l and margin will
return undefined. If you ever set margin, margin will return values from
there on. Would it be consistent with jQuery's philosophy to normalize this
and have it work as a getter from the start, or is this 'undefined' behavior
useful/correct?

- Richard

On 9/21/07, Richard D. Worth <[EMAIL PROTECTED]> wrote:
>
> I don't have an answer, but I see the same is true for margin.
>
> // tested in FF w/ firebug
> $("#someElement").css("margin-left") // "0px"
> $("#someElement").css("margin") // "undefined"
> $("#someElement").css("margin", 0).css("margin") // "0pt 0pt 0pt 0pt"
>
> Is jQuery simply returning what the browser returns? Is this consistent
> across browsers?
>
> Here's a related thread, talking about the same with border-color:
>
> .css("border-color") returning undefined
> http://groups.google.com/group/jquery-en/browse_thread/thread/9fdb1c44c2d9083f
>
>
> - Richard
>
> On 9/21/07, Piotr Sarnacki <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi,
> >
> > I'm playing around with css manipulation and I encountered strange
> > problem. jQuery("#someElement").css("background") (or background-
> > position) returns undefined, no matter if background-position is set
> > or not :]
> >
> > background-image, background-color work fine :)
> >
> > Peter
> >
> >
>


[jQuery] OT: Missing Images in IE7

2007-09-21 Thread weepy

Hi

I am building dynamic in Chess boards in jQuery over at 64squar.es.

However - in IE7 - sometimes the piece images (and in fact the rest of
the images) only partially load.

I can't find any www documentation on this 'feature' - does anyone
have any ideas why this might happen or how to prevent it?

It occurs for background images and img tags - prerendering in the
HTML doesn't make a difference.

weepy

*...(



[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Fabien Meghazi

> 1. The script only looks for declarations in the stylesheets, that's the
> beauty of it.

yes, but I mean that if you look at the content of the cssRules
variable you will see that there are a lot of css declaration which
could be avoided (or they can't ?)

> 3. Yeah i know but I'm lazy.

Here's an optimized version if you want (hope tabs will be kept). I
also added a condition in order to check cssRules[i][1] in the last
loop because on the page I tested, the value is empty for two items
and it causes an error in IE when addRule() is called with empty
second argument (I didn't checked why).


// ie6HoverFix - Author : Christian Bach
$.ie6HoverFix = function() {
if ($.browser.msie && $.browser.version < 7) {
var cssRules = [], newStyleSheet = document.createStyleSheet(),
styleSheets = document.styleSheets;
function parseCSS(rule) {
var prefix = "ie6fix-";
var select = rule.selectorText, style = 
rule.style.cssText;
var element = select.replace(/:(hover).*$/, '');
var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, '$1');
var styleRule = element + "." + prefix + pseudo;
var className = prefix + pseudo;
$(element).hover(function(e) {
$(this).addClass(className);
}, function(e) {
$(this).removeClass(className)
});
cssRules.push([styleRule,style]);
}
for (var i = 0, ii = styleSheets.length; i < ii; i++) {
for(var j = 0, jj = styleSheets[i].rules.length; j < 
jj; j++) {
parseCSS(styleSheets[i].rules[j]);
}
}
for (var i = 0, ii = cssRules.length; i < ii; i++) {
var ruledef = cssRules[i][1];
if (ruledef.length != 0) {
newStyleSheet.addRule(cssRules[i][0], ruledef);
}
}
}
};



-- 
Fabien Meghazi

Website: http://www.amigrave.com
Email: [EMAIL PROTECTED]
IM: [EMAIL PROTECTED]


[jQuery] Re: Validate plugin and attribute selector values with [square brackets]

2007-09-21 Thread Jörn Zaefferer


Rob Desbois schrieb:

Hi all,

I thought I'd give you all (and Joern also) a heads-up on a problem 
I've been having.


I use the validate() plugin on forms whose tags have names like 
'user[email]'.
The 'rules' option to validate() has no problem with this, but I've 
now started passing an array of server-side errors to showErrors() 
which then fails.


The reason is that on line #538 of jquery.validate.js v1.1, the 
selector resolves to jQuery("[EMAIL PROTECTED]") - I presume that 
the first closing square bracket is interpreted by jQuery to be 
closing the selector instead of part of the attribute.


The fix I have discovered is to amend line #538 to put single quotes 
around the value, like so:


element: jQuery("[EMAIL PROTECTED]'" + name + "']:first", 
this.currentForm)[0]


I'm not sure how advisable that fix is - if anyone can advise on that 
I'd be very grateful.
That fix is perfect, and actually just what I already have in SVN. 
Thanks anyway, and sorry for not releasing that earlier.


-- Jörn


[jQuery] Re: Does JQuery 1.2 solve the thickbox positioning problem when scrolling?

2007-09-21 Thread WebolizeR

Same problem in here, I have been playing with CSS of thickbox but
nothing for now... :(

On 11 Eylül, 17:02, Angelo Zanetti <[EMAIL PROTECTED]> wrote:
> Will do but dont have the time now.
>
> If I do will post the response and let you guys know.
>
> Thanks
>
>
>
> Alexandre Plennevaux wrote:
> > Why not testing it yourself and letting us know of your conclusions?
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> > Behalf Of Angelo Zanetti
> > Sent: mardi 11 septembre 2007 14:49
> > To: jquery-en@googlegroups.com
> > Subject: [jQuery] Does JQuery 1.2 solve the thickbox positioning problem
> > when scrolling?
>
> > Hi all
>
> > Does JQuery 1.2 solve the thickbox positioning problem when scrolling?
>
> > The problem is when you have scrolled down a page and then click on the
> > thickbox link, the thickbox popup appears at the top of the page but as you
> > have scrolled down its not centered?
> > I see there are some changes to the CSS in the latest version.
>
> > Please advise.
> > Thanks
>
> > Kind regards
>
> > --
> > 
> > Angelo Zanetti
> > Systems developer
> > 
>
> > *Telephone:* +27 (021) 552 9799
> > *Mobile:*   +27 (0) 72 441 3355
> > *Fax:*+27 (0) 86 681 5885
> > *
> > Web:*http://www.zlogic.co.za
> > *E-Mail:* [EMAIL PROTECTED] 
>
> > Ce message Envoi est certifié sans virus connu.
> > Analyse effectuée par AVG.
> > Version: 7.5.485 / Base de données virus: 269.13.14/999 - Date: 10/09/2007
> > 17:43
>
> --
> 
> Angelo Zanetti
> Systems developer
> 
>
> *Telephone:* +27 (021) 552 9799
> *Mobile:*   +27 (0) 72 441 3355
> *Fax:*+27 (0) 86 681 5885
> *
> Web:*http://www.zlogic.co.za
> *E-Mail:* [EMAIL PROTECTED] 



[jQuery] Re: element.css("background") returns undefined

2007-09-21 Thread Richard D. Worth
I don't have an answer, but I see the same is true for margin.

// tested in FF w/ firebug
$("#someElement").css("margin-left") // "0px"
$("#someElement").css("margin") // "undefined"
$("#someElement").css("margin", 0).css("margin") // "0pt 0pt 0pt 0pt"

Is jQuery simply returning what the browser returns? Is this consistent
across browsers?

Here's a related thread, talking about the same with border-color:

.css("border-color") returning undefined
http://groups.google.com/group/jquery-en/browse_thread/thread/9fdb1c44c2d9083f

- Richard

On 9/21/07, Piotr Sarnacki <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I'm playing around with css manipulation and I encountered strange
> problem. jQuery("#someElement").css("background") (or background-
> position) returns undefined, no matter if background-position is set
> or not :]
>
> background-image, background-color work fine :)
>
> Peter
>
>


[jQuery] Re: New Plugin: Picklists

2007-09-21 Thread Benjamin Sterling
George, that is really nice, great work.

On 9/21/07, george.gsgd <[EMAIL PROTECTED]> wrote:
>
>
> http://gsgd.co.uk/sandbox/jquery/picklists/
>
> A jQuery plugin to turn multiple select boxes into a dual select
> picklist style thing.
>
> Comments suggestion please.
>
>


-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] New Plugin: Picklists

2007-09-21 Thread george.gsgd

http://gsgd.co.uk/sandbox/jquery/picklists/

A jQuery plugin to turn multiple select boxes into a dual select
picklist style thing.

Comments suggestion please.



[jQuery] Re: element.css("background") returns undefined

2007-09-21 Thread Giuliano Marcangelo
Piotr,

backgroundis a general term, within which we can have
-color
-image
-position
-position-x
-position-y
-repeat

untested, but I would suggest that color, image, repeat will all work...as
would
position-x and position-y.just need to be more specific

On 21/09/2007, Piotr Sarnacki <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I'm playing around with css manipulation and I encountered strange
> problem. jQuery("#someElement").css("background") (or background-
> position) returns undefined, no matter if background-position is set
> or not :]
>
> background-image, background-color work fine :)
>
> Peter
>
>


[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Richard D. Worth
Your code worked for me in IE and FF:

http://pastie.caboo.se/99419

- Richard

On 9/21/07, hobbit <[EMAIL PROTECTED]> wrote:
>
>
> I tried all the following and get no alerts:
>
> $("select").keyup(function() {
>   alert("here1");
> });
> $("select").keydown(function() {
>   alert("here2");
> });
> $("select").keypress(function() {
>   alert("here3");
> });
> $("select").mousedown(function() {
>   alert("here4");
> });
> $("select").mouseout(function() {
>   alert("here5");
> });
> $("select").mouseup(function() {
>   alert("here6");
> });
>
>
> On Sep 21, 10:01 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> > The change event doesn't fire until the input is blurred (focus moves
> away
> > from the dropdown via tab-key or mouse click elsewhere). If you want to
> > handle the "changes" to the selected option while they're being changed,
> try
> > keydown, keyup, or keypress.
> >
> > - Richard
> >
> > On 9/21/07, Brook Davies <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > > I've tried this, but it does not catch change events trigged by the
> > > keyboard. Why?
> >
> > > Brook
> >
> > > -Original Message-
> > > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
> On
> > > Behalf Of Andy Matthews
> > > Sent: September 20, 2007 1:21 PM
> > > To: jquery-en@googlegroups.com
> > > Subject: [jQuery] Re: NEWBIE QUESTION: Catch Select event
> >
> > > I believe you'd want the change handler.
> >
> > > $("select").change(function() {
> > > //do some stuff here...
> > > )};
> >
> > > -Original Message-
> > > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
> On
> > > Behalf Of hobbit
> > > Sent: Thursday, September 20, 2007 1:22 PM
> > > To: jQuery (English)
> > > Subject: [jQuery] NEWBIE QUESTION: Catch Select event
> >
> > > Hi,
> >
> > > I would like to catch the select event when a user changes the select
> item
> > > in any  in a form.  Something like:
> >
> > > $("select").select(function() {
> > > //do some stuff here...
> > > )};
> >
> > > Is this feasible?- Hide quoted text -
> >
> > - Show quoted text -
>
>


[jQuery] Re: .load() problem

2007-09-21 Thread [EMAIL PROTECTED]

Thanks fo rthe answer but no th epage that I load is not loading any
JS.
And I also have the problem that css do not apply to the code inserted
in the page...

Anyone had this problem??

Thanks

Andrea

On Sep 21, 5:33 am, barnezz <[EMAIL PROTECTED]> wrote:
> Hello,
>
> If there is 20 requests, it means you've bind 20 time the event
> click ;-)
>
> So I don't think the problem is in this piece of code, but maybe come
> from it's location???
> Is there any js in the page you load? Don't you load again jquery.js
> in the target div?
> Is there so much request when you click for the first time?
>
> I had such things that occured when I began whith jQuery, I was
> loading a page that called jquery.js, but this must be done only once
> or everything is done several times!
>
> I don't know if this explanation is clear and if that'll solve your
> problem, but maybe you should look in that way ?
>
> Best regards.
>
> $(barney)



[jQuery] element.css("background") returns undefined

2007-09-21 Thread Piotr Sarnacki

Hi,

I'm playing around with css manipulation and I encountered strange
problem. jQuery("#someElement").css("background") (or background-
position) returns undefined, no matter if background-position is set
or not :]

background-image, background-color work fine :)

Peter



[jQuery] Re: OT: Combining JS files for production releases

2007-09-21 Thread Alexsandro_xpt

I belive ob_start() and ob_end_flush() PHP code don't work with Smarty
PHP Templates... right?

On 20 set, 21:06, Stephan Beal <[EMAIL PROTECTED]> wrote:
> On Sep 20, 5:23 pm, "Brook Davies" <[EMAIL PROTECTED]> wrote:
>
> > How do you keep your source files organized and the process of combining and
> > packing them to release any changes or bug fixes orderly?
>
> What i do is use a PHP file as an intermediary so that i can use gzip
> compression on them:
>
> js.php:
>
>  ob_start('ob_gzhandler');
> echo file_get_contents( "file1.js");
> echo file_get_contents( "file2.js");
> ... repeat for each file ...
> ob_end_flush();
> ?>
>
> In my HTML files i then include /path/to/js.php via a 

[jQuery] Adding extra functions to newsticker plugin

2007-09-21 Thread e2e

Hi,

I'm trying to learn jQuery. Plugins are definitely very helpful. But I
can't add an extra function to http://www.texotela.co.uk/code/
jquery/newsticker/">newsticker plugin.

I want to add "next", "prev" links to make slides more flexifle for
users. When a user clicked next button the slide must immediately go
to nextone...

Thanks from now...



[jQuery] Re: Star rating plugin for 1.2?

2007-09-21 Thread Derek Gathright
Awesome!  I'll be plugging this into my latest project right away.

On 9/20/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> I don't know when Ritesh is planning to update is plugin, but my
> modification of it that allows for half-star ratings is working with 1.2.1
> :
>
> http://www.learningjquery.com/2007/05/half-star-rating-plugin
>
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
> On Sep 20, 2007, at 2:18 PM, NccWarp9 wrote:
>
>
> is there any information when Ritesh Agrawal star rating plugin will
> be fixed for 1.2.1 ?>
>
> On Sep 13, 12:32 am, "Derek Gathright" <[EMAIL PROTECTED]> wrote:
>
> Karl, thanks for the help.
>
> I've added those corrections along with a few others and I think it's 99%
> there.  The only issue left is that I can't get the click methods to
> register.  I'll continue playing around with it, but if anyone else has an
> idea as to what the issue may be, I've attached the js file.  The
> additional
> HTML & CSS can be found here.
> http://sandbox.wilstuckey.com/jquery-ratings/
>
> -- Forwarded message --
> From: Karl Swedberg <[EMAIL PROTECTED]>
> Date: Sep 12, 2007 11:46 AM
> Subject: [jQuery] Re: Star rating plugin for 1.2?
> To: jquery-en@googlegroups.com
>
> The .lt() and .eq() -- and .gt() -- methods were removed from 1.2.
> If you'd like to try to patch will stuckey's version, you could try the
> following:
>
> line 97:
> .slice(0,index).addClass('hover').end();
> line 105:
> $stars.slice(0,averageIndex).addClass('on').end();
> line 108:
>
>
> $stars.slice(averageIndex,averageIndex+1).addClass('on').children('a').css('width',
> percent + "%").end().end();
>
> I don't know if there are other issues, but these are the most obvious --
> and the easiest to change.
>
> Hope that helps.
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Sep 12, 2007, at 12:19 PM, Derek Gathright wrote:
>
> I've been scouring the internet looking for a star rating plugin for the
> latest version of jQuery, but have been unsuccessful.  I really like
> these,
> but they appear to be incompatible with any recent versions.
>
>
> http://sandbox.wilstuckey.com/jquery-ratings/http://php.scripts.psu.edu/rja171/widgets/rating.php
>
> I attempted to update the wilstucky.com one for jQuery 1.2, but I'm fairly
> new to jQuery and wasn't able to figure out the issues.  I got past
> the $form.title()
> errors, but I just couldn't figure out why the hell $star.lt() &
> $star.eq()
> weren't functions.  Maybe someone with a bit more experience would be more
> successful than me?
>
> On a side note, as I mentioned, I'm new to jQuery.  In fact, my jQuery
> expertise goes back a full 24 hours.  The website I'm coding now did use
> prototype and scriptaculous, but once I looked at the 1.2 version of
> jQuery,
> I knew I'd found a better solution (for me, anyways).  So I spent the rest
> of the day recoding the site for jQuery.  It was this post that convinced
> me
> I needed to change
> .http://jquery.com/blog/2006/08/20/why-jquerys-philosophy-is-better/
>
> Anyways, if someone has some suggestions or solutions for the star rating,
> that would be much appreciated!
>
> Thanks,
> Derek
>
>
>
>  star_rating.js
> 7KDownload
>
>
>
>


[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit

I tried all the following and get no alerts:

$("select").keyup(function() {
  alert("here1");
});
$("select").keydown(function() {
  alert("here2");
});
$("select").keypress(function() {
  alert("here3");
});
$("select").mousedown(function() {
  alert("here4");
});
$("select").mouseout(function() {
  alert("here5");
});
$("select").mouseup(function() {
  alert("here6");
});


On Sep 21, 10:01 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> The change event doesn't fire until the input is blurred (focus moves away
> from the dropdown via tab-key or mouse click elsewhere). If you want to
> handle the "changes" to the selected option while they're being changed, try
> keydown, keyup, or keypress.
>
> - Richard
>
> On 9/21/07, Brook Davies <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I've tried this, but it does not catch change events trigged by the
> > keyboard. Why?
>
> > Brook
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> > Behalf Of Andy Matthews
> > Sent: September 20, 2007 1:21 PM
> > To: jquery-en@googlegroups.com
> > Subject: [jQuery] Re: NEWBIE QUESTION: Catch Select event
>
> > I believe you'd want the change handler.
>
> > $("select").change(function() {
> > //do some stuff here...
> > )};
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> > Behalf Of hobbit
> > Sent: Thursday, September 20, 2007 1:22 PM
> > To: jQuery (English)
> > Subject: [jQuery] NEWBIE QUESTION: Catch Select event
>
> > Hi,
>
> > I would like to catch the select event when a user changes the select item
> > in any  in a form.  Something like:
>
> > $("select").select(function() {
> > //do some stuff here...
> > )};
>
> > Is this feasible?- Hide quoted text -
>
> - Show quoted text -



[jQuery] is there any way to create common object for all checkboxes?

2007-09-21 Thread Potluri


I've multiple checkboxes of different type on my html like


 a1
 a2
 a3
 a4



 b1
 b2
 b3
 b4
.



 c1
 c2
 c3
 c4
.



I'm creating common  object for all of this checkbox object like 
var $checkBoxObject = $("[EMAIL PROTECTED] ^= 'category_'] [EMAIL 
PROTECTED]'checkbox']");
checkBoxObject = $checkBoxObject[0];


and then later I'm using click function on this common object as 
$checkBoxObject.click(
function()
{
 
}

).attr("checked",true);

This worked but what's troubling me is the initialization part(shown in
bold) is taking 0.8 secs for 130 checkboxes. 

Can any one of jquery pros tell me whats other efficient way of
initialization which completes in <0.3 secs...

Any straight help is appreciated..
-- 
View this message in context: 
http://www.nabble.com/is-there-any-way-to-create-common-object-for-all-checkboxes--tf4496645s15494.html#a12823101
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Christian Bach
Joel: nope i didn't plan on adding it, but if you want you can add it.

Brandon: thanks man!

Fabien:
1. The script only looks for declarations in the stylesheets, that's the
beauty of it.
2. If it was rewritten to use Brandons exellent livequery plugin it would
work with load append etc.
3. Yeah i know but I'm lazy.



/c

2007/9/21, Fabien Meghazi <[EMAIL PROTECTED]>:
>
>
> > Here is a simple script that solves the problem:
> >  http://lovepeacenukes.com/jquery/ie6hoverfix/
>
> Cool !!
>
> Got some questions:
>
> 1) would it be possible to detect :hover declarations in css in order
> to do stuff only on css rules that actually have a :hover declared
>
> 2) what if a $(#foo").load("index.html") is done. Will the new
> elements loaded benefit of your plugin or should $.ie6HoverFix();
> function be called again ? Will this cause a problem if the function
> is called twice in the same DOM tree ?
>
> 3) As your loops have a lot of iteration I think you should avoid this
> kind of loops :
>
> for(var i = 0; i < cssRules.length; i++) {
>
> and use this instead :
>
> for (var i = 0, ii = cssRules.length; i < ii; i++) {
>
> this avoid the cssRules.length to be evaluated at each iteration (faster)
>
>
> Thanks for sharing this ! I will be able to get rid of those
>
> if ($.browser.msie) {
> $("table tr").hover(function() {
> $(this).addClass("hover");
> }, function() {
> $(this).removeClass("hover");
> });
> }
>
> laying everywhere in my pages ;-)
>
> --
> Fabien Meghazi
>
> Website: http://www.amigrave.com
> Email: [EMAIL PROTECTED]
> IM: [EMAIL PROTECTED]
>


[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Fabien Meghazi

> Here is a simple script that solves the problem:
>  http://lovepeacenukes.com/jquery/ie6hoverfix/

Cool !!

Got some questions:

1) would it be possible to detect :hover declarations in css in order
to do stuff only on css rules that actually have a :hover declared

2) what if a $(#foo").load("index.html") is done. Will the new
elements loaded benefit of your plugin or should $.ie6HoverFix();
function be called again ? Will this cause a problem if the function
is called twice in the same DOM tree ?

3) As your loops have a lot of iteration I think you should avoid this
kind of loops :

for(var i = 0; i < cssRules.length; i++) {

and use this instead :

for (var i = 0, ii = cssRules.length; i < ii; i++) {

this avoid the cssRules.length to be evaluated at each iteration (faster)


Thanks for sharing this ! I will be able to get rid of those

if ($.browser.msie) {
$("table tr").hover(function() {
$(this).addClass("hover");
}, function() {
$(this).removeClass("hover");
});
}

laying everywhere in my pages ;-)

-- 
Fabien Meghazi

Website: http://www.amigrave.com
Email: [EMAIL PROTECTED]
IM: [EMAIL PROTECTED]


[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Brandon Aaron
Nice. Thanks for sharing!

--
Brandon Aaron

On 9/21/07, Christian Bach <[EMAIL PROTECTED]> wrote:
>
> Hi list,
>
> The other day i got feed up with ie6 not having :hover css support so i
> decided to fix it.
>
> Here is a simple script that solves the problem:
> http://lovepeacenukes.com/jquery/ie6hoverfix/
>
> /christian
>
>


[jQuery] Re: Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Joel Birch

Thanks Christian! Very handy indeed. Will you add this to the plugin
repository? Either way, I'm stealling it (along with a credit to you
of course) for regular use :)

Cheers
Joel Birch.


[jQuery] Re: Help needed with close button removing DOM elements.

2007-09-21 Thread Richard D. Worth
This FAQ entry may help:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F

- Richard

On 9/20/07, Matt81 <[EMAIL PROTECTED]> wrote:
>
>
> Hi there.
>
>
>
>
> On this site http://lexus-test.lateral.net/blogfeeds/ , when one of
> the main navigational links is hit (About the debate, for example), I
> pull in some static HTML from a separate HTML file through through the
> jQuery ajax load() method, and display it on top of the main content
> in an absolutely positioned div (that is initially empty).
>
> Now, within this HTML file, I have an anchor with a class of "close".
> When this anchor is clicked, I want the content of the div to be
> removed. I've written this code (within a document.ready handler), but
> it doesn't seem to work, and instead the link just acts as a default
> and causes a full page refresh (the code simply isn't being invoked).
>
> $("a.close").click
> (
> function()
> {
> $(".content_overlay").remove();
> return false;
> }
> );
>
> I believe my problem may be to do with the fact that when the initial
> document and Javascript is loaded, there are no anchors with a class
> of "close" on the page (as they have yet to be loaded), but cannot
> find a solution.
>
> Any help would be greately appreciated.
>
>


[jQuery] Adding :hover css support to IE6 - ie6HoverFix

2007-09-21 Thread Christian Bach
Hi list,

The other day i got feed up with ie6 not having :hover css support so i
decided to fix it.

Here is a simple script that solves the problem:
http://lovepeacenukes.com/jquery/ie6hoverfix/

/christian


[jQuery] Re: Superfish pathclass question

2007-09-21 Thread Joel Birch

Hi Steve,

This is by no means a newbie question, and even if it was you would
still be more than welcome to ask it.

I had a bit of an experiment and what you are attempting can be
achieved fairly simply. Just add a class 'useSF' to the body element
for pages that you want to use Superfish hovers for (your home page),
then add that class to specific hover selectors in the css file. You
can see exactly which ones by looking at the file I applied this to
here:
http://users.tpg.com.au/j_birch/plugins/superfish/all-horizontal-example/allow-static.css
I based it on the all-horizontal demo and have since realised that you
have three levels of menu so you will need to add .useSF in two more
places for that. You might be able to figure that out, otherwise let
me know and I'll dig into your css and give you more accurate help.

The last step is to change the code that you use to initialise
Superfish so that it only runs on pages whose body element has the
class useSF. For example:

$(document).ready(function(){
$("body.useSF ul.nav")
.superfish({
pathClass : 'current',
animation : {opacity:'show'},
delay : 1000
});
});

Let me know if you have any problems. Good luck. Cool looking site, by the way!

Joel Birch.


[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Richard D. Worth
The change event doesn't fire until the input is blurred (focus moves away
from the dropdown via tab-key or mouse click elsewhere). If you want to
handle the "changes" to the selected option while they're being changed, try
keydown, keyup, or keypress.

- Richard

On 9/21/07, Brook Davies <[EMAIL PROTECTED]> wrote:
>
>
> I've tried this, but it does not catch change events trigged by the
> keyboard. Why?
>
> Brook
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Andy Matthews
> Sent: September 20, 2007 1:21 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: NEWBIE QUESTION: Catch Select event
>
>
> I believe you'd want the change handler.
>
> $("select").change(function() {
> //do some stuff here...
> )};
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of hobbit
> Sent: Thursday, September 20, 2007 1:22 PM
> To: jQuery (English)
> Subject: [jQuery] NEWBIE QUESTION: Catch Select event
>
>
> Hi,
>
> I would like to catch the select event when a user changes the select item
> in any  in a form.  Something like:
>
> $("select").select(function() {
> //do some stuff here...
> )};
>
> Is this feasible?
>
>
>
>
>


[jQuery] Re: $(document) bug?

2007-09-21 Thread Brandon Aaron
The $(document).height() issue is resolved in SVN. Try using
$(window).resize() instead of $(document).resize().

--
Brandon Aaron

On 9/21/07, Hackfrag <[EMAIL PROTECTED]> wrote:
>
>
> I have the same Problem :(
>
> On 13 Sep., 17:20, hans <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I just downloaded the latest version(1.2) and the $(document) object
> > doesn't seem to be functioning. I tried the new $(document).height()
> > which always returns 0 (zero) for me and binding the resize event
> > isn't working for me either. The code:
> >
> > $(document).height();
> >
> > $(document).resize(function(){
> >   alert("Stop it!");
> >
> > });
> >
> > Is this a bug or am i missing something? :)
> >
> > thanks,
> > Hans
>
>


[jQuery] Re: Is there any better way to do that?

2007-09-21 Thread David Duymelinck


Iwould do something like this

$(document).ready(function(){
  // hide price divs
  $(".singleOffer").hide();
  // toggle
   $("a.togglePrice").toggle(function(){
$(this).next().slideDown('slow');
  },function(){
$(this).next().slideUp('slow');
  });
});

with following html

show/hide
prices
Content
show/hide
prices
Content
show/hide
prices
Content
...
show/hide
prices
Content

Less html and less javascript

-- David Duymelinck

Owca schreef:

It's my first script using jQuery.


 $(document).ready(function(){
   $("a").filter('.showPrices').toggle(function(){
 $("."+this.id).slideDown('slow');
 $("."+this.id).addClass("singleOffer");
   },function(){
 $("."+this.id).slideUp('slow');
   });
 });


show/hide
prices
show/hide
prices



show/hide
prices

Content

Is there better way to do this? I have a lot of  that show/
hide single div. In normal JS it's quite easy to show hide something
using getElementById. Is there any way to send div ID to jQuery
function? Like in JS:

function x (div_id) { document.getElementByiD(div_id).style.display =
'block'; }



  


[jQuery] Re: Closing a thickbox from within a Flash movie

2007-09-21 Thread spinnach


or even more simple (without the additional overhead of including the 
ExternalInterface class):


getURL("javascript:closeFunction()");

dennis.

Benjamin Sterling wrote:

Gordon,
In your flash file you need to put:

import flash.external.*;

Then at the last frame put something like:

ExternalInterface.call("function(){\\code to close thickbox}");

If that does not work, try creating a new function on the javascript 
side and call it like:


ExternalInterface.call('closeFunction');

On 9/21/07, *Gordon* <[EMAIL PROTECTED] 
 > wrote:



I have been asked to update a website that provides help to the user
by opening up Flash videos in popups when the user clicks a link.  The
Powers That be want them to open in the page itself, so I've decided
to use a thickbox that links to a HTML page with the flash movie
embedded in it.

This works well and the results are a definate improvement over the
popup windows, but I do have one question.  It may be desireable for
the thickbox to close itself when the video in the Flash player comes
to an end.  I was wondering, is there a way of triggering the Thickbox
to close itself when the player stops?




--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com




[jQuery] Is there any better way to do that?

2007-09-21 Thread Owca

It's my first script using jQuery.


 $(document).ready(function(){
   $("a").filter('.showPrices').toggle(function(){
 $("."+this.id).slideDown('slow');
 $("."+this.id).addClass("singleOffer");
   },function(){
 $("."+this.id).slideUp('slow');
   });
 });


show/hide
prices
show/hide
prices



show/hide
prices

Content

Is there better way to do this? I have a lot of  that show/
hide single div. In normal JS it's quite easy to show hide something
using getElementById. Is there any way to send div ID to jQuery
function? Like in JS:

function x (div_id) { document.getElementByiD(div_id).style.display =
'block'; }




[jQuery] Server Side Grid?

2007-09-21 Thread Phunky

Hello there,

Is there any known supported Server Side Grid plugin's for JQuery i
managed to stumble apon JGrid but it does not seem to be that well
documented.

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

Any help would be a great help



[jQuery] IMage div is not updating acc to the image urls in textfile

2007-09-21 Thread [EMAIL PROTECTED]

I m using jquery with loading dynamic content from text file, when i
change the text file the images dont get changed till I open new
browser window. The image urls are coming from database and im writing
them to text file and everytime the page refereshes the image urls
data gets changed , so i want to reflect the same in my div where im
loading images using jquery dynamically, Please help me with this
query Thanks



[jQuery] Help on clue tip

2007-09-21 Thread mohsin

can we call clue tip in click, change etc events or in other
function ...if so then please tell me the way to do it



[jQuery] problem whith $post();

2007-09-21 Thread [EMAIL PROTECTED]

hello
First sorry for my english writting, i dont speak english very well.

i have a problem to send my POST variables from a form to my php page.
this is my code:

in contact.htm:

Contact

Nom:
Prénom:
Adresse mail:
Votre message:



in contact.php:



the function verif_champ():
 function verif_champ(){
$.post('includes/contact.php', { nom:"nom", prenom:"prenom",
message:"message", mail:"mail" } );

};




the problem is that there is any result of my POST request i dont know
why. Help me plz if you can.

friendly



[jQuery] Re: .load() problem

2007-09-21 Thread barnezz

Hello,

If there is 20 requests, it means you've bind 20 time the event
click ;-)

So I don't think the problem is in this piece of code, but maybe come
from it's location???
Is there any js in the page you load? Don't you load again jquery.js
in the target div?
Is there so much request when you click for the first time?

I had such things that occured when I began whith jQuery, I was
loading a page that called jquery.js, but this must be done only once
or everything is done several times!

I don't know if this explanation is clear and if that'll solve your
problem, but maybe you should look in that way ?

Best regards.

$(barney)



[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Brook Davies

I've tried this, but it does not catch change events trigged by the
keyboard. Why?

Brook

 -Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: September 20, 2007 1:21 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: NEWBIE QUESTION: Catch Select event


I believe you'd want the change handler.

$("select").change(function() {
//do some stuff here...
)};

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of hobbit
Sent: Thursday, September 20, 2007 1:22 PM
To: jQuery (English)
Subject: [jQuery] NEWBIE QUESTION: Catch Select event


Hi,

I would like to catch the select event when a user changes the select item
in any  in a form.  Something like:

$("select").select(function() {
//do some stuff here...
)};

Is this feasible?






[jQuery] Suggestion for corner plugin to get lighter DOM

2007-09-21 Thread Erlend Schei

I'm a great fan of the corner plugin, but I came across a possible
weakness using the top/bottom setting.

If I specify that I want to use corners for only the top or bottom
halv of my container, the plugin will still add DOM elements for the
other half. This is in most cases invisible, but in IE6/IE7 it will
cause a side effect in certain cases, as it shifts divs two pixels,
causing underlying background color to become visible.

Manipulating the bottom of a div seems unnecessary when I just need
corners on the top.

I added a check that will prevent this behaviour. It just checks if
it's really neccesary to create the additional DOM for the current
edge:

   for (var j in edges) {
   var bot = edges[j];
-- inserted: --
   if ( (bot && (opts.BL || opts.BR)) || (!bot && (opts.TR ||
opts.TR)) ) {
--- /inserted -
  // existing code that adds div elements
-- inserted: --
   }
--- /inserted -
   }

I presume the corner authors also scan this list, but I'm unsure who
maintains the "official" version. It'd be great if you could consider
adding this into the plugin, so that I don't have to use an edited
version of this great tool!



[jQuery] Re: $(document) bug?

2007-09-21 Thread Hackfrag

I have the same Problem :(

On 13 Sep., 17:20, hans <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just downloaded the latest version(1.2) and the $(document) object
> doesn't seem to be functioning. I tried the new $(document).height()
> which always returns 0 (zero) for me and binding the resize event
> isn't working for me either. The code:
>
> $(document).height();
>
> $(document).resize(function(){
>   alert("Stop it!");
>
> });
>
> Is this a bug or am i missing something? :)
>
> thanks,
> Hans



[jQuery] IE and .ajax(). No Exception, No Results

2007-09-21 Thread m2web

In IE 6 and IE 7 do not provide any exceptions and/or results when
running the following. Any ideas or advice is appreciated.


  
Parse XML with JQuery



  $(function() {
$.ajax({
  type: "POST",
  url: "books.xml",
  dataType: "xml",
  success: function(xmlData)
  {
xmlDataSet = xmlData;
buildHTMLFromXML();
  }
});
  });

  function buildHTMLFromXML()
  {
  resultSetLength = $("book",xmlDataSet).length;

  strToAppend = "There are a total of " + resultSetLength
+ " books.
"; strToAppend += "
"; $("title",xmlDataSet).each(function(i) { strToAppend += "" + $(this).text() + "
"; strToAppend += "by " + $("author:eq(" + parseInt(i) + ")",xmlDataSet).text() + "
"; strToAppend += "Publisher: " + $("publisher:eq(" + parseInt(i) + ")",xmlDataSet).text() + "
"; strToAppend += "ISBN-10: " + $("isbn:eq(" + parseInt(i) + ")",xmlDataSet).text(); strToAppend += "
"; strToAppend += "
***"; strToAppend += "
"; }); $("#info").html(strToAppend); }

[jQuery] Re: Star rating plugin for 1.2?

2007-09-21 Thread Derek Gathright
Wish I knew, I've been anticipating it as well.

On 9/20/07, NccWarp9 <[EMAIL PROTECTED]> wrote:
>
>
> is there any information when Ritesh Agrawal star rating plugin will
> be fixed for 1.2.1 ?>
>
> On Sep 13, 12:32 am, "Derek Gathright" <[EMAIL PROTECTED]> wrote:
> > Karl, thanks for the help.
> >
> > I've added those corrections along with a few others and I think it's
> 99%
> > there.  The only issue left is that I can't get the click methods to
> > register.  I'll continue playing around with it, but if anyone else has
> an
> > idea as to what the issue may be, I've attached the js file.  The
> additional
> > HTML & CSS can be found here.
> http://sandbox.wilstuckey.com/jquery-ratings/
> >
> > -- Forwarded message --
> > From: Karl Swedberg <[EMAIL PROTECTED]>
> > Date: Sep 12, 2007 11:46 AM
> > Subject: [jQuery] Re: Star rating plugin for 1.2?
> > To: jquery-en@googlegroups.com
> >
> > The .lt() and .eq() -- and .gt() -- methods were removed from 1.2.
> > If you'd like to try to patch will stuckey's version, you could try the
> > following:
> >
> > line 97:
> > .slice(0,index).addClass('hover').end();
> > line 105:
> > $stars.slice(0,averageIndex).addClass('on').end();
> > line 108:
> >
>
> >  
> > $stars.slice(averageIndex,averageIndex+1).addClass('on').children('a').css('width',
> > percent + "%").end().end();
> >
> > I don't know if there are other issues, but these are the most obvious
> --
> > and the easiest to change.
> >
> > Hope that helps.
> >
> > --Karl
> > _
> > Karl Swedbergwww.englishrules.comwww.learningjquery.com
> >
> > On Sep 12, 2007, at 12:19 PM, Derek Gathright wrote:
> >
> > I've been scouring the internet looking for a star rating plugin for the
> > latest version of jQuery, but have been unsuccessful.  I really like
> these,
> > but they appear to be incompatible with any recent versions.
> >
> >
> http://sandbox.wilstuckey.com/jquery-ratings/http://php.scripts.psu.edu/rja171/widgets/rating.php
> >
> > I attempted to update the wilstucky.com one for jQuery 1.2, but I'm
> fairly
> > new to jQuery and wasn't able to figure out the issues.  I got past
> > the $form.title()
> > errors, but I just couldn't figure out why the hell $star.lt() &
> $star.eq()
> > weren't functions.  Maybe someone with a bit more experience would be
> more
> > successful than me?
> >
> > On a side note, as I mentioned, I'm new to jQuery.  In fact, my jQuery
> > expertise goes back a full 24 hours.  The website I'm coding now did use
> > prototype and scriptaculous, but once I looked at the 1.2 version of
> jQuery,
> > I knew I'd found a better solution (for me, anyways).  So I spent the
> rest
> > of the day recoding the site for jQuery.  It was this post that
> convinced me
> > I needed to change
> .http://jquery.com/blog/2006/08/20/why-jquerys-philosophy-is-better/
> >
> > Anyways, if someone has some suggestions or solutions for the star
> rating,
> > that would be much appreciated!
> >
> > Thanks,
> > Derek
> >
> >
> >
> >  star_rating.js
> > 7KDownload
>
>


[jQuery] Re: Form Variables

2007-09-21 Thread Gavin Baumanis
Hi Everyone,

As an update I have also noticed that my normally working form validation no
longer works either.
So I am pretty sure there is some sort of JS weirdness going on between
Coldfusion and jQuery.

Beau.

On 9/21/07, Beau <[EMAIL PROTECTED]> wrote:
>
> Hi Everyone,
>
> I have a pretty weird issue that I am unable to solve myself.
> I am using jQuery  and ColdFusion.
>
> The issue is that for some unknown reason, that when I submit a form,
> the form variable that has been jquerified is not submitted  - it is
> not part of the form scope.
>
> I have created a small test coldfusion form/page
> and can successfully jquery "touched" fileds without error.
> So I am confident it is not a coldfusion form / JS issue.
>
> Yet when I try to insert the EXACT same code into an exisiting form
> the form variable is lost.
>
> Would anyone have any ideas that I could investigate?
>
> Thanks in advance for anything you might be able to suggest.
> Beau
>
>


[jQuery] Re: How to bind a function to all elements?

2007-09-21 Thread barnezz

Thank you a lot for your answers ;-)

barney



[jQuery] Superfish pathclass question

2007-09-21 Thread steve35mm

Hello,

I'm currently using the pathclass version of the JQuery Superfish
plugin on a new website I'm building.

BETA VERSION:  http://www.aceconcrete.com/revised/

The client has requested that the hover effect only happens on the
homepage.  For the rest of the pages, he wants the dropdown tier
navigation to stay current and static, regardless of where the user is
moving the cursor.

Is there a simple way using either CSS or the superfish.js file to
achieve this effect?

I realize that this may be an uber-newbie question, but any help you
could give would be MUCH appreciated.

NOTE:  I'm using PHP "if" statements to add the "current" class to the
proper pages.

Thanks,
Steve



[jQuery] IE 6 issues with ajax call

2007-09-21 Thread m2web

When loading the following into IE 6. I get no error. Nothing. Any
help is appreciated.


  
Parse XML with JQuery



  $(function() {
$.ajax({
  type: "POST",
  url: "books.xml",
  dataType: "xml",
  success: function(xmlData)
  {
xmlDataSet = xmlData;
buildHTMLFromXML();
  }
});
  });


  function buildHTMLFromXML()
  {
  resultSetLength = $("book",xmlDataSet).length;

  strToAppend = "There are a total of " + resultSetLength
+ " books.
"; strToAppend += "
"; $("title",xmlDataSet).each(function(i) { strToAppend += "" + $(this).text() + "
"; strToAppend += "by " + $("author:eq(" + parseInt(i) + ")",xmlDataSet).text() + "
"; strToAppend += "Publisher: " + $("publisher:eq(" + parseInt(i) + ")",xmlDataSet).text() + "
"; strToAppend += "ISBN-10: " + $("isbn:eq(" + parseInt(i) + ")",xmlDataSet).text(); strToAppend += "
"; strToAppend += "
***"; strToAppend += "
"; }); /* Populate our DIV with the HTML String */ $("#widget").html(strToAppend); }

[jQuery] Re: Closing a thickbox from within a Flash movie

2007-09-21 Thread Benjamin Sterling
Gordon,
In your flash file you need to put:

import flash.external.*;

Then at the last frame put something like:

ExternalInterface.call("function(){\\code to close thickbox}");

If that does not work, try creating a new function on the javascript side
and call it like:

ExternalInterface.call('closeFunction');

On 9/21/07, Gordon <[EMAIL PROTECTED]> wrote:
>
>
> I have been asked to update a website that provides help to the user
> by opening up Flash videos in popups when the user clicks a link.  The
> Powers That be want them to open in the page itself, so I've decided
> to use a thickbox that links to a HTML page with the flash movie
> embedded in it.
>
> This works well and the results are a definate improvement over the
> popup windows, but I do have one question.  It may be desireable for
> the thickbox to close itself when the video in the Flash player comes
> to an end.  I was wondering, is there a way of triggering the Thickbox
> to close itself when the player stops?
>
>


-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Validate plugin and attribute selector values with [square brackets]

2007-09-21 Thread Rob Desbois
Hi all,

I thought I'd give you all (and Joern also) a heads-up on a problem I've
been having.

I use the validate() plugin on forms whose tags have names like
'user[email]'.
The 'rules' option to validate() has no problem with this, but I've now
started passing an array of server-side errors to showErrors() which then
fails.

The reason is that on line #538 of jquery.validate.js v1.1, the selector
resolves to jQuery("[EMAIL PROTECTED]") - I presume that the first closing
square bracket is interpreted by jQuery to be closing the selector instead
of part of the attribute.

The fix I have discovered is to amend line #538 to put single quotes around
the value, like so:

> element: jQuery("[EMAIL PROTECTED]'" + name + "']:first", this.currentForm)[0]
>

I'm not sure how advisable that fix is - if anyone can advise on that I'd be
very grateful.

As an aside - Joern this is the first time I've used validate, all I'll say
is thank you, it's a fantastic plugin very well thought-out.
--rob

-- 
Rob Desbois


[jQuery] Re: Image + map area + mouseout event

2007-09-21 Thread Fabien Meghazi

Ok, here's a test case of my problem. If anyone has an idea about how
to fix it ?

http://amigrave.com/upload/posts/jquery/mouseover_and_map_area.htm

I considered hoverIntent but it won't be an option for me.

An ugly fix would be to detect if mouse position is not over the image
before firing doStuff() function but it's not an elegant solution and
I even don't know how to do this. Anyway, if there's no solution I'll
be forced to do it so any hint about this is welcome.

-- 
Fabien Meghazi

Website: http://www.amigrave.com
Email: [EMAIL PROTECTED]
IM: [EMAIL PROTECTED]


  1   2   >