[jQuery] Re: preventDefault

2009-08-24 Thread Hans

Thanks, James!

the :has() selector did not work on the 'if' statement, but you put me
on the right track.

the code now looks like this:

$('ul#hoofdNavigatieLijst  li  ul  li:has(ul)  a ').click
(function(event) {
event.preventDefault();
});

and it works like a charm.

thanks again!

On 21 aug, 22:09, James james.gp@gmail.com wrote:
 I think you want to use :has() selector instead of 
 contains().http://docs.jquery.com/Selectors/has

 I think contains() works only for text nodes and not elements. I
 haven't tested it to be sure.

 On Aug 20, 9:06 pm, Hans deboem...@gmail.com wrote:



  hello everybody,

  the site I'm building has a dropdown menu based on an unordered list
  with 3 levels. I've got it working nicely using jQuery, but there is
  one thing I can't get working..

  this is the problem:

  the 'a href' on the first tow levels serves to open up the level below
  without leaving the page. there is a real link for the non-script
  users, so I have switched off the first two levels using
  event.preventDefault();

  however, on the second level some items do not contain any 3rd level
  links, so in that case the user should navigate away using the 2nd
  level link. therefore the link on level 2 should one be disabled if
  the list-item contains a list (ul).

  I tried doing this:

          $('ul#hoofdNavigatieLijst  li  ul  li  a 
  ').click(function(event)
  {
                  if ($(this).parent('li').contains('ul')) {
                  event.preventDefault();
                  }
                  });

  it doesn't do the trick, however.

  can anyone help me? thanks!- Tekst uit oorspronkelijk bericht niet 
  weergeven -

 - Tekst uit oorspronkelijk bericht weergeven -


[jQuery] Re: Jquery + ExtJS 3.0

2009-08-24 Thread Steven Yang
try switching the order of script type=text/javascript
src=...ext-all.js/script
script type=text/javascript src=...ext-jquery-adapter.js/script

to
script type=text/javascript src=...ext-jquery-adapter.js/script
script type=text/javascript src=...ext-all.js/script


[jQuery] Re: Do something when id of clicked anchor is home

2009-08-24 Thread StefanCandan

K, I got it.

Changed paragraphs to divs tho.

$(document).ready(function(){
$(li).hide()
$(p.subtitle).hide()
$(p.copy).hide()
$(div[name!=home][class=body]).hide()

var $i=500;
$(li:eq(0)).show($i, function(event){
// use callee so don't have to name the function
$i = $i+150;
$(this).next().show($i, arguments.callee, function(event){
});
$(p.subtitle).show(5250)
$(p.copy).show(5250)
});

   $(a.menuitem).click(function(event){
   $(a.menuitem).removeClass(selected);
$(this).addClass(selected);

$(div[name!=+this.id+][class=body]).hide(500)
$('div[name='+this.id+']').show(500)

 event.preventDefault();
   });


});


[jQuery] Is there a jQuery script that can do automatic text sizing based on browser window size?

2009-08-24 Thread Tuckers

I want to create a page that scales everything on it as you increase/
decrease the browser window/viewport.  I can scale everything on the
page except the text.

You can see my example here (made for IE only now).  You can size the
browser window and see how it all scales.
http://mediazure.com/message_boards/Logo-message-board-template.htm

I have not found a solution to scale text with window size. I think
that there is a function that can be called called onResize.I only
need it to work in IE.  If it doesn't work in Firefox etc., as long as
it doesn't mess up those browsers it will be ok.

Does anyone know a jQuery script that can do this?  Or maybe someone
might want to make a bit of money making this for me?  I am not a
javascript programmer, I have one available if there is a script
available.

Thanks!


[jQuery] Re: Trying to pass vars from multiple triggers

2009-08-24 Thread Irwan Setiawan

Hi,

id is designed to work with only 1 instance in a web page.
If you need multiple instances of an element, use class=newsTrigger
instead of id=newsTrigger.
And change $('#newsTrigger') into $('.newsTrigger').

Regards,
Irwan Setiawan


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of TrixJo
Sent: Monday, August 24, 2009 9:54 AM
To: jQuery (English)
Subject: [jQuery] Trying to pass vars from multiple triggers


Hi I have multiple triggers and I am trying to pass variables via a
rel= tag (which are unique id's) for each trigger

I can get most of it working, problem is that since there are multiple
triggers with id=newsTrigger only the first listed trigger works

Using PHP/mySQL.



An example trigger is:
while loop{
   echo 'span id=newsTrigger style=font-size:0.8em; rel='.
$rowNewsid[$counter].'a href='.$rowNewsPermalink
[$counter].''.substr($rowNewsHeadline[$counter],0,40).'/a/span';
}

The above outputs a large number of rows with the same span id of
newsTrigger.  When a user mousesover any of the newsTrigges I am
trying to get an ajax dialog to load up content based on the id that
is being passed through the rel tag.  How do I do this?


The javascript so far is:


script
$(document).ready(function(){

$(#newsTrigger).mouseover(function() {
var newsid = $(this).attr(rel);
alert(newsid);

});

});

/script




[jQuery] Re: Form Plugin issue

2009-08-24 Thread kostjazz

Hi All,

I also experience the very same problem.

I also found that when it happens it submits the form twice.

I haven't tried upgrading the version but the one I'm using is 2.10
(05/08/2008)

Cheers
Kostya


[jQuery] Display DIVs as Multiple Columns

2009-08-24 Thread S2

How can I display a bunch of DIVs in multiple columns? Like Flex's
TileList component.

A
B
C
C
E
F
G

A B C
D E F
G

A B C D
E F G


[jQuery] Re: Is there a jQuery script that can do automatic text sizing based on browser window size?

2009-08-24 Thread Liam Potter


would just be a function to increase the font size same as anything 
else, and if you are using percentages or em's would be even simpler.


Tuckers wrote:

I want to create a page that scales everything on it as you increase/
decrease the browser window/viewport.  I can scale everything on the
page except the text.

You can see my example here (made for IE only now).  You can size the
browser window and see how it all scales.
http://mediazure.com/message_boards/Logo-message-board-template.htm

I have not found a solution to scale text with window size. I think
that there is a function that can be called called onResize.I only
need it to work in IE.  If it doesn't work in Firefox etc., as long as
it doesn't mess up those browsers it will be ok.

Does anyone know a jQuery script that can do this?  Or maybe someone
might want to make a bit of money making this for me?  I am not a
javascript programmer, I have one available if there is a script
available.

Thanks!
  




[jQuery] Re: Display DIVs as Multiple Columns

2009-08-24 Thread Liam Potter


float them, with css.

S2 wrote:

How can I display a bunch of DIVs in multiple columns? Like Flex's
TileList component.

A
B
C
C
E
F
G

A B C
D E F
G

A B C D
E F G
  




[jQuery] Re: Display DIVs as Multiple Columns

2009-08-24 Thread Jonathan Vanherpe (T T NV)


S2 wrote:

How can I display a bunch of DIVs in multiple columns? Like Flex's
TileList component.

A
B
C
C
E
F
G

A B C
D E F
G

A B C D
E F G



You could use float: left;width: 33%; in the stylesheet. No need to use 
javascript for that (as long as your divs have a fixed height).


Jonathan

--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] trouble with 'url' in $.ajax

2009-08-24 Thread ch2450


Hi everybody,

I recently updated my website with url rewriting.
What I did was change the htaccess file so that every url is
redirected to an index.php file, which then parts this url ($_SERVER
['REQUEST_URI']) and 'include()' the corresponding files.

Since then, I've had several problems with absolute and relative paths
throughout the whole website, so I hardcoded every url and src tag
inside the code using the absolute path http://www.mysite.com/path/to/file
(instead of path/to/file/).
This has been working fine for every browser running on a Mac (Safari
and Firefox) and for Firefox on PC.
I didn't have the same luck with Chrome, Safari (PC) and IE for which
everything seems to work fine except the ajax requests. After several
days of testing, I am 95 percent sure that the problem comes from the
url's used by the $.ajax requests.
Although I wrote the absolute path for all of them (http://
www.mysite.com/path/to/file.php), the above-mentioned browsers don't
seem to find them.

Any idea what the problem could be ?
Any tips on how I could manage the absolute/relative path problem
better (for php and js) ?

Thank you for your help. Best,
-Clem.


Here is the entire content of my htaccess file :
IfModule mod_rewrite.c
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php
/IfModule

I use Dreamhost, if this is of any help.


[jQuery] [treeview] Can I apply classes to async trees??

2009-08-24 Thread nsbk

Hi!

I'm currently working on a project in wich I use a pair of trees. The
thing is that one of them is too big and IE6 (it needs to be
supported :s ) takes forever to process the tree so I want to load it
asynchronously branch by branch using the async version of the tree.

The problem is that I want the tree to be a filetree, but when created
as async it displays with default style. Is it possible to create an
async filetree (without applying the classes manually)??

Here's my code:

//js
$(document).ready(function(){
$(#tree).treeview({
url: MenuTree.aspx,animated: fast,collapsed: true, 
unique: true
})
});
//html

ul id=tree class=filetree
/ul

Thanks in advance!

-- nsbk


[jQuery] Re: Help with using the 'not' selector

2009-08-24 Thread MiKiTiE

Thanks for your help but this is still not working. All that happens
is as soon as I click the word to make the div appear, it fades out
again.

I'm probably being totally thick here and missing something really
simple but I just cannot figure it out. All I need is for the div to
appear when clicking the link and to disappear when clicking out of
it.

This is how I make it appear:

$('a').click(function(e){
var x = $('#FM_OPTIONS').css( {
'left' : e.pageX - 100,
'top' : e.pageY + 35
} );

x.show();
});

which works.

I tried just a simple test:

$('body').click(function(){
$(#FM_OPTIONS).fadeOut('fast');
});

and even that doesn't do anything. I tried implementing the :not()
selector by saying if it's not an a tag but I don't think that's
what it's actually for. I hope someone can come up with a working
solution - I would really appreciate it.

Thanks.


On Aug 17, 8:18 pm, Ricardo ricardob...@gmail.com wrote:
 return false; in your a's click handler should avoid that, as it
 prevents the event from bubbling to the body. You can also check
 visibility:

 $().click(function(){
     var opt = $(#'fm_options');
     if( this != opt[0]  opt.is(':visible') )
       opt.fadeOut('fast');

 });

 On Aug 17, 6:27 am,MiKiTiEmikiji...@googlemail.com wrote:

  Thanks for your reply.

  This is pretty much what I want - except I need my div to appear when
  a particular link is clicked, but since I've put the fire in the body,
  it's basically doing the fadeOut on every click (which stands to
  reason since everything is the body!) So really what I need is
  something else in there that says if it's also NOT an a tag...but
  I'm pretty sure that if the a tag is clicked it will recognise it as
  the body still? Is there some kind of work around for this?

  Thanks
  Mike

  On Aug 14, 5:42 pm, Wolf ventas.w...@gmail.com wrote:

   hi you have ask if the id is different, then dissappear the div o
   element

   $(body).click(function(){
       IF($(this).attr('id') !=FM_OPTIONS)
       {
         $(#FM_OPTIONS).fadeOut('fast');
       }

   });


[jQuery] Re: [treeview] Can I apply classes to async trees??

2009-08-24 Thread Jörn Zaefferer

You can use the classes property in the JSON response. These are
added to each node.

Jörn

On Mon, Aug 24, 2009 at 12:12 PM, nsbkpedro...@gmail.com wrote:

 Hi!

 I'm currently working on a project in wich I use a pair of trees. The
 thing is that one of them is too big and IE6 (it needs to be
 supported :s ) takes forever to process the tree so I want to load it
 asynchronously branch by branch using the async version of the tree.

 The problem is that I want the tree to be a filetree, but when created
 as async it displays with default style. Is it possible to create an
 async filetree (without applying the classes manually)??

 Here's my code:

 //js
        $(document).ready(function(){
                $(#tree).treeview({
                        url: MenuTree.aspx,animated: fast,collapsed: true, 
 unique: true
                })
        });
 //html

        ul id=tree class=filetree
        /ul

 Thanks in advance!

 -- nsbk



[jQuery] Callback Not Working

2009-08-24 Thread GLSmyth

I am looking to fade text out when the mouse passes over it and
replace it with text that is faded in. My understanding is that this
needs to be done through a callback, as the text needs to fade out
completely before fading in. However, when I try to implement this
idea the content does not fade in, so I must be doing something wrong.

My code is:

script type=text/javascript
var Tips = {
  ready: function() {
$('ul#SiteNav li').mouseover(
  function() {
$(this).find('div.SectionTitle').fadeOut('fast', function
() {
  $(this).find('div.Explanation').fadeIn('slow');
});
});
$('ul#SiteNav li').mouseout(
  function() {
$(this).find('div.Explanation').hide();
$(this).find('div.SectionTitle').show();
})
  }
};
$(document).ready(Tips.ready);
/script

I left the mouseout part unchanged, as that is an example of what I am
changing from. What happens is that the mouseover text fades out, but
the replaced text does not fade back in. Additionally, the shown text
flashes before fading out if the mouse rolls over the text (as opposed
to the containing box), which is not really a problem, but I am not
understanding why that is happening. All works fine with hide/show.

Full code can be found at http://dripinvesting.org/Default_test.asp.

I am apparently missing something basic, so a pointer to a beginner
would be appreciated.

Cheers -

george


[jQuery] Realtime ajax response

2009-08-24 Thread Josip Lazic

Hi,

can jQuery display response from .post request in realtime?

I force buffer flush in PHP with ob_start, and ob_flush, I know that I
can set target='iframeID' to my form, but I need ajax and target
should be div.

Thanks


[jQuery] [validate] Radios with empty values and required:true

2009-08-24 Thread Gordon

I'm working on a survey builder that lets people generate web forms
for collecting user data.  Form builders can create forms with various
controls on them.

At the moment I'm building in a jQuery validate layer (there is also a
server side validation layer, but I want to keep users from making
unnecessary submits).  I've run into a little problem with radio
buttons though.

If I have radio buttons that all have values (input type=radio
name=radioQuestion value=1, input type=radio
name=radioQuestion value=2, etc) then if I set up a required:true
rule and try to submit I get a validation error as expected.  However,
if there's a radio with no value in the group, such as input
type=radio name=radioQuestion value= then if the radio with no
value is selected, the validation check is passed.

Is there a way around this, other than simply not including a radio
button with no value?  I'd want this for questions that aren't set
required.


[jQuery] Re: [validate] Radios with empty values and required:true

2009-08-24 Thread Jörn Zaefferer

When a question isn't required, it shouldn't have the required-rule.

Jörn

On Mon, Aug 24, 2009 at 1:43 PM, Gordongrj.mc...@googlemail.com wrote:

 I'm working on a survey builder that lets people generate web forms
 for collecting user data.  Form builders can create forms with various
 controls on them.

 At the moment I'm building in a jQuery validate layer (there is also a
 server side validation layer, but I want to keep users from making
 unnecessary submits).  I've run into a little problem with radio
 buttons though.

 If I have radio buttons that all have values (input type=radio
 name=radioQuestion value=1, input type=radio
 name=radioQuestion value=2, etc) then if I set up a required:true
 rule and try to submit I get a validation error as expected.  However,
 if there's a radio with no value in the group, such as input
 type=radio name=radioQuestion value= then if the radio with no
 value is selected, the validation check is passed.

 Is there a way around this, other than simply not including a radio
 button with no value?  I'd want this for questions that aren't set
 required.


[jQuery] Re: trouble with 'url' in $.ajax

2009-08-24 Thread Jonathan Vanherpe (T T NV)


It's kinda hard to tell without seeing the site, but I think you could 
try finding out which url gets loaded and what response you get by using 
something like Fiddler ( http://www.fiddlertool.com/ ) or Wireshark ( 
http://www.wireshark.org/ ). Chrome also has a built-in debug thing, I 
believe.


Jonathan

ch2450 wrote:


Hi everybody,

I recently updated my website with url rewriting.
What I did was change the htaccess file so that every url is
redirected to an index.php file, which then parts this url ($_SERVER
['REQUEST_URI']) and 'include()' the corresponding files.

Since then, I've had several problems with absolute and relative paths
throughout the whole website, so I hardcoded every url and src tag
inside the code using the absolute path http://www.mysite.com/path/to/file
(instead of path/to/file/).
This has been working fine for every browser running on a Mac (Safari
and Firefox) and for Firefox on PC.
I didn't have the same luck with Chrome, Safari (PC) and IE for which
everything seems to work fine except the ajax requests. After several
days of testing, I am 95 percent sure that the problem comes from the
url's used by the $.ajax requests.
Although I wrote the absolute path for all of them (http://
www.mysite.com/path/to/file.php), the above-mentioned browsers don't
seem to find them.

Any idea what the problem could be ?
Any tips on how I could manage the absolute/relative path problem
better (for php and js) ?

Thank you for your help. Best,
-Clem.


Here is the entire content of my htaccess file :
IfModule mod_rewrite.c
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php
/IfModule

I use Dreamhost, if this is of any help.




--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Re: Realtime ajax response

2009-08-24 Thread Michael Lawson

Unless I'm mistaken in my understanding of your issue, this is kind of what
AJAX was really meant for.  You can certainly post something, and then do a
get on whatever it was you posted to to get a response.  You might want to
take a polling approach where you set a javascript timer or timeout to do
the get request after a certain amount of time to allow the service to do
its work.  You're just making two AJAX calls on the page, instead of one.
Here is an example for you, its a shoutbox module I wrote in PHP using
javascript.  It isn't using jQuery (to eliminate dependencies) but you can
get the idea


http://sourceforge.net/projects/easyshoutbox/files/easyshoutbox/Easy_shout_box_0.5/

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Josip Lazic jlaz...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/24/2009 08:19 AM  
   
  Subject:[jQuery] Realtime ajax response  
   






Hi,

can jQuery display response from .post request in realtime?

I force buffer flush in PHP with ob_start, and ob_flush, I know that I
can set target='iframeID' to my form, but I need ajax and target
should be div.

Thanks

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: setInterval()

2009-08-24 Thread solow

I really need this


[jQuery] Re: Jquery + ExtJS 3.0

2009-08-24 Thread mikfig

thanks,
that solved it :D

On Aug 23, 11:49 pm, Steven Yang kenshin...@gmail.com wrote:
 try switching the order of script type=text/javascript
 src=...ext-all.js/script
 script type=text/javascript src=...ext-jquery-adapter.js/script

 to
 script type=text/javascript src=...ext-jquery-adapter.js/script
 script type=text/javascript src=...ext-all.js/script


[jQuery] PHP IDE with support JQuery

2009-08-24 Thread s...@codelobster.com

Hi.

Let me introduce free PHP IDE with available JQuery plug-in (paid):

Codelobster PHP Edition (http://www.codelobster.com) - has all
standart abilities for editing code
- PHP/HTML/CSS/JavaScript highlighting, autocomplete, code structure
- PHP debugger
- code folding, tooltips, help and etc.

and it has special JQuery features:
- autocomplete for JQuery library
- context and dynamic help for JQuery library

We are waiting for your comments and suggestions.

Regards,
Codelobster Team.


[jQuery] Fwd: [jquery-ui] Re: Psychological Assessmet Tool Using JQuery and Personal Construct Theory

2009-08-24 Thread Joe Whitehurst
Perhaps someone on this forum will have a suggestion for me to try?

-- Forwarded message --
From: jQuery UI Support supp...@jqueryui.com
Date: Mon, Aug 24, 2009 at 3:47 AM
Subject: [jquery-ui] Re: Psychological Assessmet Tool Using JQuery and
Personal Construct Theory
To: jquery...@googlegroups.com


Is this actuallly related to jQuery UI? If not, please post to the jQuery
discussion list: http://groups.google.com/group/jquery-en

Otherwise, please provide a more specific description of your problem.

jQuery UI support team


On Sun, Aug 23, 2009 at 10:49 PM, Joe Whitehurst joewhitehu...@gmail.comwrote:

 I recently discovered Jquery and am quite excited about its capabilities.
  I'm working on a sophisticated online psychological assessment tool using
 Personal Construct Theory (go here:
 http://www.warpraptor.com/irannewuser.html. to see an example of its use
 in political polling using the 2009 Iranian Presidential debacle (and get
 links to learn more about Personal Construct Theory).
 What I'm trying to accomplish is to place three circles (images) in a
 rectangular box and allow a user to move each of the circles anywhere in
 this rectangular box--but be locked within the box--occupying about 70% of
 the screen.  I want to capture the amount of time each circle is selected
 (cumulative if they are selected multiple times) and the total distance each
 is moved--no matter how they zig and zag or circle.  I want to be able to
 calculate the distances between the center of each circle and the centers of
 the other two when they all have been moved where the user wants to place
 them finally (actually, I would really like to capture the distances
 continuously from the time a user starts until the user clicks finished, but
 I'll add this in version 2).  I have downloaded and tested  wz_dragdrop (
 http://www.walterzorn.com/dragdrop/dragdrop_e.htm), but I have not yet
 gotten it to work correctly.  But now I think Jquery is a better bet.   I
 want the circles to be fairly small but big enough to contain a recognizable
 image of a human face.  I also want them to be perfect circles including the
 background.  I have not been able to figure out to create an image with a
 perfectly circular background.  Circular images are no problem.  The closest
 I have come to circular backgrounds is squares with rounded edges.  If you
 come across something that might help with any of these please let me know








[jQuery] Re: PHP IDE with support JQuery

2009-08-24 Thread Michael Lawson

As a codeigniter fanboy, I'd be very anxious to mess around with the CI
plugin for your IDE.  the jQuery plugin also looks very cool!

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   s...@codelobster.com s...@codelobster.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/24/2009 09:45 AM  
   
  Subject:[jQuery] PHP IDE with support JQuery 
   






Hi.

Let me introduce free PHP IDE with available JQuery plug-in (paid):

Codelobster PHP Edition (http://www.codelobster.com) - has all
standart abilities for editing code
- PHP/HTML/CSS/JavaScript highlighting, autocomplete, code structure
- PHP debugger
- code folding, tooltips, help and etc.

and it has special JQuery features:
- autocomplete for JQuery library
- context and dynamic help for JQuery library

We are waiting for your comments and suggestions.

Regards,
Codelobster Team.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: setInterval()

2009-08-24 Thread Michael Lawson

'this' is undefined in the current scope

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   solow solow.wes...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/24/2009 09:31 AM  
   
  Subject:[jQuery] Re: setInterval()   
   






I really need this

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Scroll To After AJAX Request...

2009-08-24 Thread Ariel Flesler

Include jQuery.scrollTo[1] and then, everytime the Ajax response
arrives:

$.scrollTo(0, 1000);

Where 1000 is how many milliseconds to animate. You can of course add
more settings as needed.

[1] http://flesler.blogspot.com/2007/10/jqueryscrollto.html

--
Ariel Flesler

On Aug 23, 9:34 pm, Erik R. Peterson eriks...@mac.com wrote:
 Any one can help with a script to scroll to the top of the page AFTER  
 an AJAX REQUEST loading a div?

 Erik


[jQuery] Re: localscroll not working, help? could it be lightbox?

2009-08-24 Thread Ariel Flesler

It currently works for me, and yeah, don't spam ;)

--
Ariel Flesler

On Aug 23, 8:18 pm, Alice kikizi...@gmail.com wrote:
 problem can be seen here:http://unedible.com/alicewhite/

 it's just not scrolling. sometimes when i change the code around a
 bit, the anchor images stop working completely.
 i'm also using lightbox, could that be the issue?


[jQuery] Re: Scroll to top of page after AJAX load.....

2009-08-24 Thread Ariel Flesler

Ah, saw this one after the other.
Got a link to what you've been trying to achieve ?

--
Ariel Flesler

On Aug 23, 7:03 pm, Erik eriks...@mac.com wrote:
 Using AJAX to load content within a div.

 Need to find a way to scroll to the top of the page after loading
 content inside div on same page.

 After clicking on my bottom links, loading the html inside the div, I
 want the the parent window to scroll up to the top.

 scrollTo did not work.

 Help!

 Erik


[jQuery] Re: App like hangman

2009-08-24 Thread Boris Trivic

OK, again I need some help:

I can success print ui.draggable to console, but how to convert it to
string?
I need to write it into some element with .innerHTML and I will
probably use it in for loop...

Any your comment will be helpfull.

On Aug 24, 2:45 am, Boris Trivic trivu...@gmail.com wrote:
 Brett thanks for your help, I success founded solution deeper on link
 that you posted.
 If someone needs, here is code:

 $(.place).droppable({
 drop: function(e, ui) {
 console.log(ui.droppable);
 }

 });

 This code writes in console (if you use Firebug), which element is
 dragged (id of that el.). You can customize code for your needs...

 On Aug 20, 4:30 am, Brett Ritter swift...@swiftone.org wrote:

  On Wed, Aug 19, 2009 at 11:07 AM, Boris Trivictrivu...@gmail.com wrote:
   When I take on of draggable divs and put it on 3rd div (fixed), how I
   can get ID of that div which is dragged on 3rd div.

  Ah! Now I understand.  (Good examples).

  Sadly, Drag-and-drop is not something I've played with.  However, from
  looking at the jqueryUI docs, it appears what you are looking for is
  the Droppable plugin, which receives draggable objects:

 http://jqueryui.com/demos/droppable/

  Hope that helps!

  --
  Brett Ritter / SwiftOne
  swift...@swiftone.org


[jQuery] Re: Get inner class of event

2009-08-24 Thread Cesar Sanz


Sometimes it is good for us if you explain your solution..


- Original Message - 
From: Liam Potter radioactiv...@gmail.com

To: jquery-en@googlegroups.com
Sent: Friday, August 21, 2009 4:16 AM
Subject: [jQuery] Re: Get inner class of event




This happens to me quite often, so do what I do, write the group post, but 
don't send it, just go back to trying to solve it, if you can't solve it 
then click the send button :)


Michael Price wrote:


Hello again folks – as per usual, I managed to get this working five 
minutes later! So never mind, but thanks if you were going to take a look 
at it J


Regards,

Michael Price

*From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
*On Behalf Of *Michael Price

*Sent:* 21 August 2009 11:12
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] Get inner class of event

Hi all,

Got a div on a page, and we want something to happen when a user clicks 
on the div. However, within the div is a link and we want something 
DIFFERENT to happen if they click on the LINK rather than anything else 
in the div. Clicking the link is triggering the div click code as well – 
I need to stop this which I thought I could do with e.stopPropagation(); 
on the link click handler, but it doesn’t seem to be working.


Is there any way to pick up via the div click handler that it was 
actually the LINK, and react in there instead, or am I taking the wrong 
approach?


Regards,

Michael Price







[jQuery] Re: jCarousel Appears Vertical then Horizontal

2009-08-24 Thread Sparky12

Still got this problem ? Anyone else had any luck with it ?


[jQuery] $.ajax calls in firefox doesn't work

2009-08-24 Thread hosemaria

Hi to all.
I have problem with $.ajax call with Firefox. At all other browsers
works fine(Opera, IE6,Chrome)

My code:

$.ajax({
url : statistic_json.php,
type : post,
dataType : json,

success : function(data) {
statistic_data = data.occupied;
},
complete : function() {

},
error : function(xhr, ajaxOptions, thrownError) {
alert(error);
},
async : false
});

Response from Firefox(taken from Firebug console):
HTML
HEAD

TITLE400 Bad Request/TITLE

/HEAD
BODY BGCOLOR=#FF

H1400 Bad Request/H1
Your browser sent a request that this server could not understand.

/BODY
/HTML

Response from other browsers(Opera,Chrome,IE6)
{occupied:{data:[[1.247868e+12,1],[124795440,1],
[124804080,1]],label:some label}}

Firefox browser ver:
Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.13) Gecko/
2009073022 Firefox/3.0.13


[jQuery] Re: localscroll not working, help? could it be lightbox?

2009-08-24 Thread andy

Are you running WP?  If so some plugins CAN break scrollTo,
serialScroll etc depending on the syntax, etc, but in my experience
Lightbox is not one of them.

On Aug 23, 4:18 pm, Alice kikizi...@gmail.com wrote:
 problem can be seen here:http://unedible.com/alicewhite/

 it's just not scrolling. sometimes when i change the code around a
 bit, the anchor images stop working completely.
 i'm also using lightbox, could that be the issue?


[jQuery] Re: setInterval()

2009-08-24 Thread Nick Fitzsimons

2009/8/23 solow solow.wes...@gmail.com:
 function joinRoomFunction(roomId){
        $(#tables).load(pages/pages.php, {r: roomId}, function()
 {
                $(#myTable).tablesorter({widgets: ['zebra']});
                alert('loaded');
                 $('button#stopINTERVAAL').click(function()
 {intvarM=clearInterval(intvarM);});
        });
        }
    function joinRoom(roomId){
        var intvarM=window.setInterval(joinRoomFunction(+ roomId
 +),5000);
    }

A few points: you are assigning the interval identifier to intvarM
inside a function using var intvarM = setInterval The use of the
var keyword will make that variable local to that function. You need
to declare the variable in some outer scope, so that it is also
visible in the click handler you assign to the button.

Also, clearInterval does not return a value (or, to be absolutely
precise, the return value of clearInterval is undefined), so there
is probably no point assigning it to anything.

Finally, by assigning a string to setInterval you are basically
performing an eval, which is very inefficient. Creating a function
reference using a closure is the preferred approach.

Try this:

var intvarM; // as this is declared out here, it will be visible to
all the functions below

function joinRoomFunction(roomId){
$(#tables).load(pages/pages.php, {r: roomId}, function() {
$(#myTable).tablesorter({widgets: ['zebra']});
alert('loaded');
$('button#stopINTERVAAL').click(function() {
window.clearInterval(intvarM); // this method returns undefined
});
 });
}

function joinRoom(roomId){
intvarM = window.setInterval((function(roomId) {
return function() { // return a function to be used by the timer
joinRoomFunction(roomId);
}
})(roomId), 5000);
}

Regards,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/


[jQuery] Re: [validate] problem of defining custom rules

2009-08-24 Thread Jörn Zaefferer
firstname must refer to the name of a field. There is no field with
that name in your form, just class=firstname.

Jörn

On Mon, Aug 24, 2009 at 4:55 PM, davidmichaelg...@gmail.com wrote:

 i played with the example.html from jquery.validate 1.55 and wanted to
 make a custom rule firstname that is required, with the message please
 enter a firstname.
 My changes were in the validate :
 $(#commentForm).validate({
                rules: {
                        firstname: required
                        },
                messages: {
                        firstname: Enter your firstname
                }
        });

 and then        input id=cname name=name class=firstname
 minlength=2 /
 my problem is that it is shown as valid, even i don't enter nothing.
 i don't know what i am making wrong

 Thanks,
 David

 This is the code
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
 www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html;
 charset=ISO-8859-1 /
 titlejQuery validation plug-in - comment form example/title

 link rel=stylesheet type=text/css media=screen href=css/
 screen.css /

 script src=../lib/jquery.js type=text/javascript/script
 script src=../jquery.validate.js type=text/javascript/script

 !-- for styling the form --
 script src=js/cmxforms.js type=text/javascript/script

 script type=text/javascript
 $(document).ready(function() {
        $(#commentForm).validate({
                rules: {
                        firstname: required
                        },
                messages: {
                        firstname: Enter your firstname
                }
        });
 });
 /script

 style type=text/css
 #commentForm { width: 500px; }
 #commentForm label { width: 250px; }
 #commentForm label.error, #commentForm input.submit { margin-left:
 253px; }
 /style

 /head
 body

 form class=cmxform id=commentForm method=post action=
        fieldset
                legendPlease provide your name, email address (won't be 
 published)
 and a comment/legend
                p
                        label for=cnameName (required, at least 2 
 characters)/label
                        input id=cname name=name class=firstname 
 minlength=2 /
                p
                        label for=cemailE-Mail (required)/label
                        input id=cemail name=email class=required email 
 /
                /p
                p
                        label for=curlURL (optional)/label
                        input id=curl name=url class=url value= /
                /p
                p
                        label for=ccommentYour comment (required)/label
                        textarea id=ccomment name=comment 
 class=required/textarea
                /p
                p
                        input class=submit type=submit value=Submit/
                /p
        /fieldset
 /form

 /body
 /html


[jQuery] Re: $.ajax calls in firefox doesn't work

2009-08-24 Thread hosemaria

Important note:
It works under FX when script is at localhost(developer mashine-wamp
server). When I download it on linux server(hosting) the situation is
as described above.


[jQuery] Re: App like hangman

2009-08-24 Thread Brett Ritter

On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivictrivu...@gmail.com wrote:
 I can success print ui.draggable to console, but how to convert it to
 string?
 I need to write it into some element with .innerHTML and I will
 probably use it in for loop...

I think you are trying the hard way.

ui.draggable is not a string, but a jQuery element.  Use that as you see fit.

For Hangman you're probably looking to copy either the text  (
ui.draggable.text() ) or the html itself ( ui.draggable.html() ).  If
you need to clone the source you want ui.draggable.clone() (note that
any events bound to the original are not bound to the clone unless you
use live() )

Trying to convert a jQuery element to a string doesn't make sense
unless you say what string you want - the text, the html, the id,
these are all different strings.

-- 
Brett Ritter / SwiftOne
swift...@swiftone.org


[jQuery] Re: Cursor moves to start position in Opera Autocomplete Plugin

2009-08-24 Thread juanefren

Thank you already tested :)

On Aug 22, 4:07 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Just released version 1.1, which fixes this 
 issue:http://plugins.jquery.com/node/9879

 Jörn

 On Thu, Aug 20, 2009 at 9:29 PM,juanefrenjuanef...@gmail.com wrote:

  With the autocomplete plugin and using Opera; When the input value, is
  not found in the suggestions the cursor moves to the beginning of the
  text, does any body knows how to solve it ?

  Thanks in advance


[jQuery] Re: Quick check over these few lines ?

2009-08-24 Thread brian

On Sat, Aug 22, 2009 at 5:13 PM, MorningZmorni...@gmail.com wrote:

 The confusing bit is that you're instructing jQuery to make an AJAX
 request for each LI *as the page is loading*

 That is not true, as inside

 $(function() {
   ...
   ...
   ...
 })

 the page is already ready, all the li's will be where they should
 be

I realise that; it was a poor choice of words. What I meant was that
the AJAX requests will be fired--for each LI jQuery finds--at the time
the page loads and without any user input. I wonder if the OP really
wants this behaviour.


[jQuery] Re: $.inArray optimisation

2009-08-24 Thread Cesar Sanz


Does it works for every browser?

- Original Message - 
From: gurdiga gurd...@gmail.com

To: jQuery (English) jquery-en@googlegroups.com
Sent: Sunday, August 23, 2009 1:07 PM
Subject: [jQuery] $.inArray optimisation




Hello,

The $.inArray function is defined in 
http://jqueryjs.googlecode.com/svn/trunk/jquery/src/core.js

as:

inArray: function( elem, array ) {
for ( var i = 0, length = array.length; i  length; i++ ) {
if ( array[ i ] === elem ) {
return i;
}
}

return -1;
},

I'm wondering: would it be possible to take advantage of the built-in
indexOf method of the Array present in FF Javascript engines? Im
thinking of something like:

   if (typeof Array.prototype.indexOf === 'function') {
   return array.indexOf(elem);
   }

What do you think? 




[jQuery] Form got submitted when I hit enter on select the value in autocomplete box

2009-08-24 Thread pankaj sharma

Hi  All,

In my application,there are several autocomplte field is available.
When I type pank and then it list out the several matching in the
autocomplete field and select one and
then hit the enter then it submitted the entire form, which will cause
the error message. Because there are several
more mandatory field are there, which i need to fill up.

I was trying to restrict in this way, but i believe this is the wrong way.

The following will disable enter-to-submit for the entire form.

$(#myForm).bind(keypress, function(event) {
 if(event.keyCode == 13) {
  return false;
 }
});

Please help me how to resolve this issue in Jquery autocomplete
plugin, so that the should not sumbit on
hitting enter in autocomplete text box.

I am new to this forum, please let me know if you need any more info on this?

Thanks


[jQuery] Re: setInterval()

2009-08-24 Thread Michael Geary

 From: Nick Fitzsimons
 Finally, by assigning a string to setInterval you are 
 basically performing an eval, which is very inefficient. 
 Creating a function reference using a closure is the 
 preferred approach.

A function reference is the best way to do it, but not so much because of
efficiency.

If you're just evaling a single function call once every five seconds, you'd
never notice a difference in performance between eval and a function
reference.

For me, the real reason to use a function reference is because it makes the
code cleaner and it's easier to pass data back and forth.

 function joinRoom(roomId){
 intvarM = window.setInterval((function(roomId) {
 return function() { // return a function to be used by the timer
 joinRoomFunction(roomId);
 }
 })(roomId), 5000);
 }

Whoa, that's a lot more complicated than it has to be. It's using two
closures where one is enough.

You can write this code instead and it will do exactly the same thing:

  function joinRoom(roomId){
  intvarM = setInterval( function() {
  joinRoomFunction(roomId);
  }, 5000 );
  }

-Mike



[jQuery] IE 8 jquery corners problem

2009-08-24 Thread marksimon

This is inserting a white line in the middle of the div in IE8.
Problem doesn't exist in ff. Can you see a problem with my code?

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titlecorners/title

style type=text/css

.navoptionrow {
float:left;
font-size:.9em;
}
.navoptionrow ul {
float:left;
background-color: #CDCDCD;
width:890px;
overflow:visible;
}
.navoptionrow li {
float:left;
list-style-type:none;
margin-right:10px;
}

/style
script type=text/javascript src=../jquery/jquery.js/script
script type=text/javascript src=../jquery/corners.js/script
script type=text/javascript
$(function(){
$('.rounded').corners();
});
/script
/head

body
div class=navoptionrow
ul class=rounded
li
  h3Clients/h3
/li
li class=anavlinka href=../clientAdmin/
newclient.phpNew Client/a/li
li class=anavlinka href=../accountAdmin/
newAccount_1.phpNew Account/a/li
li class=anavlinka href=../accounts/index.phpAccounts/
a/li
li class=anavlinka href=../billing/
billingrequest.phpRequest Invoice/a/li
/ul
/div
/body
/html


[jQuery] Re: Safest way to test is a variable is a jQuery object?

2009-08-24 Thread KeeganWatkins

have you considered just checking for a jQuery method? seems like that
would be the cleanest, least intrusive way of doing your check, for
example:

 function get_object_from_id(variable)
{
// if the param has a attr property (which jQuery
objects do,
// but raw DOM nodes don't), use that. Otherwise,
assume
// an ID was passed and return the wrapped set
return variable.attr ? variable : jQuery(# +
variable);
};

NOTE: if you passed in a different type of object, and it contained a
attr property (or whatever jQuery method used for checking), this
would fall apart. However, if you know the param will either be a raw
DOM node OR a jQuery object, this should work fine.

On Aug 23, 5:53 pm, RyanZec bas...@gmail.com wrote:
 Well I think I am going to be going with a function as that was my
 first instinct.

 I see where your going with what you have however that would cause
 some issue if say an int or JSON object is passed as it is going to
 return that instead of an expected jQuery object.  The code I end up
 having is:

         function get_object_from_id(variable)
         {
                 if(typeof variable == 'string')
                 {
                         variable = $('#' + variable);
                 }
                 else if(variable instanceof jQuery)
                 {
                         //already a jQuery object so we need to do nothing
                 }
                 else
                 {
                         //error code
                 }

                 return variable;
         };

 Not sure how to handle the error (whether to throw an exception or
 just return null or what not) but this way I can handle it if
 something else is passed besides a string or jQuery object.

 And even tho I doubt the jQuery object are going to stop being an
 instance of jQuery any time soon, if it does, I have one location to
 change my code.

 Thanks for you advance.

 On Aug 23, 4:30 pm, Michael Geary m...@mg.to wrote:

  If all you need to do is distinguish a string from a jQuery object, and you
  want to insure that future revisions of jQuery will never break your code, I
  would just test for the string.

  I'd also put the logic in a function even if you only use it in one place,
  e.g.

      // Return a jQuery object given either a string id or
      // an existing jQuery object or DOM element
      function $fromID( id ) {
          if( typeof id == 'string' ) id = '#' + id;
          return $(id);
      }

  And then code:

      var $form = $fromID(form);

  -Mike

   From: Eridius

   I am wondering what is the safest way to test if a variable
   is a jQuery object.  I am building a function where I want to
   be able to pass in either the id of the form or the form
   object itself.  The current way I am doing this is

   var $form = (form instanceof jQuery ? form : $('#' + form));

   Is this the safest way that is not likely to change?  Would I
   be better offer wrapping this functionality into a function
   all by itself so incase this does change, I only need it to
   change in one spot (plan on building a complete UI type framework)?


[jQuery] Re: trouble with 'url' in $.ajax

2009-08-24 Thread James

Instead of using absolute URLs, could you use relative URLs that begin
with a slash (e.g. /path/to/file.php) to indicate the domain root?

Also, do you have any base href=... tag set? That could cause some
problems with AJAX too.

On Aug 24, 1:25 am, ch2450 clemhuygheba...@gmail.com wrote:
 Hi everybody,

 I recently updated my website with url rewriting.
 What I did was change the htaccess file so that every url is
 redirected to an index.php file, which then parts this url ($_SERVER
 ['REQUEST_URI']) and 'include()' the corresponding files.

 Since then, I've had several problems with absolute and relative paths
 throughout the whole website, so I hardcoded every url and src tag
 inside the code using the absolute pathhttp://www.mysite.com/path/to/file
 (instead of path/to/file/).
 This has been working fine for every browser running on a Mac (Safari
 and Firefox) and for Firefox on PC.
 I didn't have the same luck with Chrome, Safari (PC) and IE for which
 everything seems to work fine except the ajax requests. After several
 days of testing, I am 95 percent sure that the problem comes from the
 url's used by the $.ajax requests.
 Although I wrote the absolute path for all of them 
 (http://www.mysite.com/path/to/file.php), the above-mentioned browsers don't
 seem to find them.

 Any idea what the problem could be ?
 Any tips on how I could manage the absolute/relative path problem
 better (for php and js) ?

 Thank you for your help. Best,
 -Clem.

 Here is the entire content of my htaccess file :
 IfModule mod_rewrite.c
 Options +FollowSymLinks
 RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^.*$ index.php
 /IfModule

 I use Dreamhost, if this is of any help.


[jQuery] Re: Warning: file_get_contents error -- wtf?

2009-08-24 Thread James

This issue is unrelated to jQuery.

I'm not so surprised that the fail whale rears it's ugly butt once in
a while.
I suggest putting some error catching/suppression in your PHP code.

On Aug 23, 4:26 pm, TrixJo tri...@gmail.com wrote:
 Do any of you get this problem?

 Warning: file_get_contents(http://search.twitter.com/search.json?
 lang=enrpp=5q=District+9) [function.file-get-contents]: failed to
 open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/site/
 public_html/trendingtopics.php on line 51

 It tends to appear sporadically no pattern that is obvious

 Using LAMP


[jQuery] Re: Passing variables to .click

2009-08-24 Thread James

Since region is not a valid HTML attribute, other ways is to set an
ID on the element and use that as a reference to data stored elsewhere
(e.g. a Javascript array or object).
Depending on whether you have a lot of data or not. Assuming you have
many onclicks on your page, here's another way to do it.

script
// JS object
var myData = {id1:'US', id2:'Europe', id3:'Antarctica'};

$(div.clickme).click(function() {
   var id = this.id;  // 'id1' or 'id2' or 'id3'
   alert(myData.id);  // 'US' or 'Europe' or 'Antarctica'
   // alert(myData[id]);  // same as above
});
/script

div id=id1 class=clickmeText 1/div
div id=id2 class=clickmeText 2/div
div id=id3 class=clickmeText 3/div


On Aug 23, 2:40 pm, AMP ampel...@gmail.com wrote:
 This is the way I was thinking so could you give me another example
 without attributes (Just so I could learn a different way).
 Thnaks

 On Aug 23, 8:05 pm, MorningZ morni...@gmail.com wrote:

  MANY ways to do this, with this being one of them

  button id=parsetablebutton region=?php echo $Region ?Some
  Text/button

  then

  $(#parsetablebutton).click(function() {
          var region = $(this).attr(region);  //-- the value from
  PHP

  });

  again, that's just one way of many

  On Aug 23, 6:04 pm, AMP ampel...@gmail.com wrote:

   Hello,
   I was using this:
   onClick=parsetable('?php echo $Region ?')

   but now I want to use the JQuery:
   $(#parsetablebutton).click( function() {

   How do I pass the parameter to the function?
   Would I set an attribute and read it with[att=XXX] where the attribute
   is the echo'd $Region or is there a better way?
   Thanks- Hide quoted text -

  - Show quoted text -




[jQuery] loop/count

2009-08-24 Thread bombaru

I'm trying to add a navigational aid to a carousel that I'm working
on. Basically, I want to visually display the number of results in the
carousel and then highlight the result that is currently in the first
position as the user scrolls through the result set - providing a
visual cue to the user as to where they are in the result set. I've
seen this before on other carousels and it's sort of the same concept
that Apple uses in the iPhone and iPod screens. I know this can be
done rather easily with a bit of jQuery, but my brain is fried. You
can see a mock-up of what I'm trying to achieve here:

http://rule13.com/development/carousel.gif

I'm trying to loop through the result set and count how many items are
returned... then display something like the image above.  As a user
navigates through the carousel, an active state is added to the visual
cue.  The code I am working with for the visual cue section is
currently just a bunch of span tags (I'm open to alternate
approaches).  The number of span tags returned would be the same
number of results returned in the carousel.

div class=visual-cue
pspan/spanspan/spanspan class=active/
spanspan/spanspan/spanspan/spanspan/spanspan/
spanspan/spanspan/span/p
  /div

Here's the CSS:

/* visual cue */
#accessorize div.visual-cue {height:16px; line-height:16px;
position:absolute; right:0; width:266px; top:-40px;}
#accessorize div.visual-cue p {text-align:right; line-height:16px;
float:right;}
#accessorize div.visual-cue p span {display:block; background:#fff;
width:10px; height:10px; border:2px solid #EFEFEF; margin-left:2px;
float:left;}
#accessorize div.visual-cue p span.active {background:#D3D3D3; border:
2px solid #D3D3D3;}

Does anyone know how I can achieve this or can someone steer me in the
right direction?

Thanks.


[jQuery] Getting incorrect returned results

2009-08-24 Thread Benjamin Sterling

Hey all,
Here's the issue, I am pulling in an XML doc, storing it in a global
var and through out the app I am transversing it to grab certain
info.  Up till 1.2.6 it's been working fine, but when I upgraded 1.3.2
I get bad results.

Here are my two test pages:
http://ietracker.staging.informationexperts.com/framework/test/results.1.2.6.html
http://ietracker.staging.informationexperts.com/framework/test/results.1.3.2.html

My guess is the it has something to do with Sizzle but I can't place
exactly where the issue may be happening. But not sure, any
suggestions would be helpful.


[jQuery] Animating Border Color

2009-08-24 Thread phpn1b

Is it possible to animate an element's border color? I tried $
('#foo').animate({ borderColor: '#ff'}, 1000); and $
('#foo').animate({ 'border-color': '#ff'}, 1000); with no success.


[jQuery] Re: Form Plugin issue

2009-08-24 Thread Lay András

Hello!

On Mon, Aug 24, 2009 at 9:46 AM, kostjazzme.russ...@gmail.com wrote:

 Hi All,

 I also experience the very same problem.

 I also found that when it happens it submits the form twice.

For me not need to submit twice the form, only one submit enough to
produce the error.

 I haven't tried upgrading the version but the one I'm using is 2.10
 (05/08/2008)

I'm using the latest 2.28 (10-MAY-2009) version.

Lay


[jQuery] Re: loop/count

2009-08-24 Thread James

So basically you just want to know how many span tags there are?
If so, something like this could work (untested):

var count = $(div.visual-cue span).length;

On Aug 24, 10:31 am, bombaru bomb...@gmail.com wrote:
 I'm trying to add a navigational aid to a carousel that I'm working
 on. Basically, I want to visually display the number of results in the
 carousel and then highlight the result that is currently in the first
 position as the user scrolls through the result set - providing a
 visual cue to the user as to where they are in the result set. I've
 seen this before on other carousels and it's sort of the same concept
 that Apple uses in the iPhone and iPod screens. I know this can be
 done rather easily with a bit of jQuery, but my brain is fried. You
 can see a mock-up of what I'm trying to achieve here:

 http://rule13.com/development/carousel.gif

 I'm trying to loop through the result set and count how many items are
 returned... then display something like the image above.  As a user
 navigates through the carousel, an active state is added to the visual
 cue.  The code I am working with for the visual cue section is
 currently just a bunch of span tags (I'm open to alternate
 approaches).  The number of span tags returned would be the same
 number of results returned in the carousel.

 div class=visual-cue
         pspan/spanspan/spanspan class=active/
 spanspan/spanspan/spanspan/spanspan/spanspan/
 spanspan/spanspan/span/p
       /div

 Here's the CSS:

 /* visual cue */
 #accessorize div.visual-cue {height:16px; line-height:16px;
 position:absolute; right:0; width:266px; top:-40px;}
 #accessorize div.visual-cue p {text-align:right; line-height:16px;
 float:right;}
 #accessorize div.visual-cue p span {display:block; background:#fff;
 width:10px; height:10px; border:2px solid #EFEFEF; margin-left:2px;
 float:left;}
 #accessorize div.visual-cue p span.active {background:#D3D3D3; border:
 2px solid #D3D3D3;}

 Does anyone know how I can achieve this or can someone steer me in the
 right direction?

 Thanks.


[jQuery] Re: Getting incorrect returned results

2009-08-24 Thread James

In Firefox 3.5 they both look exactly the same:
$('topics topic',lessons) == 4

In IE6, it differs, with:
$('topics topic',lessons) == 48

I think this is related to an issue where with IE and jQuery it is not
reading the returned data as XML because the response type is not text/
xml. If you do a search on it you'll find some solutions. The most
common solution is to force the response type of the returned XML
(tos.xml) to be text/xml, if possible.

On Aug 24, 10:38 am, Benjamin Sterling
benjamin.sterl...@kenzomedia.com wrote:
 Hey all,
 Here's the issue, I am pulling in an XML doc, storing it in a global
 var and through out the app I am transversing it to grab certain
 info.  Up till 1.2.6 it's been working fine, but when I upgraded 1.3.2
 I get bad results.

 Here are my two test 
 pages:http://ietracker.staging.informationexperts.com/framework/test/result...http://ietracker.staging.informationexperts.com/framework/test/result...

 My guess is the it has something to do with Sizzle but I can't place
 exactly where the issue may be happening. But not sure, any
 suggestions would be helpful.


[jQuery] Re: loop/count

2009-08-24 Thread bombaru

Thanks James...

Here's what I've got working:

$('.item-list ul li').each(function(i) {
  $('.visual-cue p').append(span/span);
});
$('.visual-cue p span:first').addClass('active');
$('#carousel-next').click(function () {
$('.visual-cue p 
span.active').removeClass('active').next().addClass
('active');
});
$('#carousel-prev').click(function () {
$('.visual-cue p 
span.active').removeClass('active').prev().addClass
('active');
});

I'm sure there is a more efficient way of writing this, but for now,
at least it's working the way I envisioned it.  It's going through,
counting the number of li tags that are returned, and then appending
the same number of span tags.  I'm then adding an active class to
the first span tag and changing that with the click function.

The problem I am now having is looping through the results correctly.
The carousel loops, but the above function does not.  I need this to
start over at the beginning when it reaches the last one if the user
is clicking the next button, and vice-versa if the user is using the
previous button action.

Thanks again for your help.

On Aug 24, 5:04 pm, James james.gp@gmail.com wrote:
 So basically you just want to know how many span tags there are?
 If so, something like this could work (untested):

 var count = $(div.visual-cue span).length;

 On Aug 24, 10:31 am, bombaru bomb...@gmail.com wrote:

  I'm trying to add a navigational aid to a carousel that I'm working
  on. Basically, I want to visually display the number of results in the
  carousel and then highlight the result that is currently in the first
  position as the user scrolls through the result set - providing a
  visual cue to the user as to where they are in the result set. I've
  seen this before on other carousels and it's sort of the same concept
  that Apple uses in the iPhone and iPod screens. I know this can be
  done rather easily with a bit of jQuery, but my brain is fried. You
  can see a mock-up of what I'm trying to achieve here:

 http://rule13.com/development/carousel.gif

  I'm trying to loop through the result set and count how many items are
  returned... then display something like the image above.  As a user
  navigates through the carousel, an active state is added to the visual
  cue.  The code I am working with for the visual cue section is
  currently just a bunch of span tags (I'm open to alternate
  approaches).  The number of span tags returned would be the same
  number of results returned in the carousel.

  div class=visual-cue
          pspan/spanspan/spanspan class=active/
  spanspan/spanspan/spanspan/spanspan/spanspan/
  spanspan/spanspan/span/p
        /div

  Here's the CSS:

  /* visual cue */
  #accessorize div.visual-cue {height:16px; line-height:16px;
  position:absolute; right:0; width:266px; top:-40px;}
  #accessorize div.visual-cue p {text-align:right; line-height:16px;
  float:right;}
  #accessorize div.visual-cue p span {display:block; background:#fff;
  width:10px; height:10px; border:2px solid #EFEFEF; margin-left:2px;
  float:left;}
  #accessorize div.visual-cue p span.active {background:#D3D3D3; border:
  2px solid #D3D3D3;}

  Does anyone know how I can achieve this or can someone steer me in the
  right direction?

  Thanks.


[jQuery] Re: $.ajax calls in firefox doesn't work

2009-08-24 Thread James

Maybe there's corrupted header/cookie data being sent with the request
that the server doesn't like. Try viewing the request headers with
Firebug to see if you see anything odd.
Then try clearing your Firefox cookies for that domain to see if that
helps.

On Aug 24, 5:47 am, hosemaria hosema...@gmail.com wrote:
 Important note:
 It works under FX when script is at localhost(developer mashine-wamp
 server). When I download it on linux server(hosting) the situation is
 as described above.


[jQuery] How to make it remove class show, and add class hide.

2009-08-24 Thread StefanCandan

Okay, so I'm working on this site, currently I have this jquery code:

  $(a.show).click(function(event){
$(a.show[id=+this.id+]).removeClass(show)
$(a[id=+this.id+]).addClass(hide)
$(div[title!=+this.id+][class=news]).hide(500)
$(div[title=+this.id+][class=news]).show(500)
event.preventDefault();
  });

it doesn't seem to remove the show class, and add the hide class.


[jQuery] Re: How to make it remove class show, and add class hide.

2009-08-24 Thread James

Have you tried something like:

  $(a.show).click(function(event){
$(this).removeClass(show).addClass(hide);
$(div[title!=+this.id+][class=news]).hide(500);
$(div[title=+this.id+][class=news]).show(500);
event.preventDefault();
  });

On Aug 24, 11:37 am, StefanCandan onlyo...@live.nl wrote:
 Okay, so I'm working on this site, currently I have this jquery code:

           $(a.show).click(function(event){
                 $(a.show[id=+this.id+]).removeClass(show)
                 $(a[id=+this.id+]).addClass(hide)
                 $(div[title!=+this.id+][class=news]).hide(500)
                 $(div[title=+this.id+][class=news]).show(500)
                 event.preventDefault();
           });

 it doesn't seem to remove the show class, and add the hide class.


[jQuery] Re: How to make it remove class show, and add class hide.

2009-08-24 Thread marksimon

$(function(){
$('a.show').toggle(
var $id=$(this).element('id');
function(){
$('#+$id).removeClass('hide');

},
function(){
$('#+$id).addClass('hide');

}
);
});

Not exactly sure if that's what your trying to do. But this should
show/hide a div with the same id as the link id on the click event.
You will also need a css class of .hide { display:none; }

On Aug 24, 2:37 pm, StefanCandan onlyo...@live.nl wrote:
 Okay, so I'm working on this site, currently I have this jquery code:

           $(a.show).click(function(event){
                 $(a.show[id=+this.id+]).removeClass(show)
                 $(a[id=+this.id+]).addClass(hide)
                 $(div[title!=+this.id+][class=news]).hide(500)
                 $(div[title=+this.id+][class=news]).show(500)
                 event.preventDefault();
           });

 it doesn't seem to remove the show class, and add the hide class.


[jQuery] Re: How to make it remove class show, and add class hide.

2009-08-24 Thread StefanCandan

Thats not what I wanted, I wanted to make the link show a hidden div.
And once the div is shown, it should change the link to hide the div
again once its clicked. but hiding/showing it with the hide  show
animation.

On Aug 25, 12:24 am, marksimon zen...@gmail.com wrote:
 $(function(){
         $('a.show').toggle(
                 var $id=$(this).element('id');
                 function(){
                         $('#+$id).removeClass('hide');

                 },
                         function(){
                         $('#+$id).addClass('hide');

                         }
                 );

 });

 Not exactly sure if that's what your trying to do. But this should
 show/hide a div with the same id as the link id on the click event.
 You will also need a css class of .hide { display:none; }

 On Aug 24, 2:37 pm, StefanCandan onlyo...@live.nl wrote:

  Okay, so I'm working on this site, currently I have this jquery code:

            $(a.show).click(function(event){
                  $(a.show[id=+this.id+]).removeClass(show)
                  $(a[id=+this.id+]).addClass(hide)
                  $(div[title!=+this.id+][class=news]).hide(500)
                  $(div[title=+this.id+][class=news]).show(500)
                  event.preventDefault();
            });

  it doesn't seem to remove the show class, and add the hide class.


[jQuery] Re: How to make it remove class show, and add class hide.

2009-08-24 Thread StefanCandan

I have tried the exact same setup as yours, but it did not work.

On Aug 25, 12:14 am, James james.gp@gmail.com wrote:
 Have you tried something like:

           $(a.show).click(function(event){
                 $(this).removeClass(show).addClass(hide);
                 $(div[title!=+this.id+][class=news]).hide(500);
                 $(div[title=+this.id+][class=news]).show(500);
                 event.preventDefault();
           });

 On Aug 24, 11:37 am, StefanCandan onlyo...@live.nl wrote:

  Okay, so I'm working on this site, currently I have this jquery code:

            $(a.show).click(function(event){
                  $(a.show[id=+this.id+]).removeClass(show)
                  $(a[id=+this.id+]).addClass(hide)
                  $(div[title!=+this.id+][class=news]).hide(500)
                  $(div[title=+this.id+][class=news]).show(500)
                  event.preventDefault();
            });

  it doesn't seem to remove the show class, and add the hide class.


[jQuery] Superfish v1.4.8 clashes with SWF?

2009-08-24 Thread jim

Trying to use superfish / jquery navigation on a site. Works great on
my Mac (Safari  Firefox), but in IE (not sure of the version) the
drop-downs go behind the SWFs that sit just below the nav. Here's a
link to the site:

http://www.baitcreative.com/rolling_hills/

Is there an easy fix for this?


[jQuery] Problem Jquery Multiple Uploads

2009-08-24 Thread marco souza

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


[jQuery] Flash effect with show/hide

2009-08-24 Thread guidebook

Hello,

(Sorry for my english, it isn't my native language.)

I would want to show a div (the information about the song) when the
visitor hover on a cover art on a radio website but this div overlap
the cover art with an opacity of 0.7

You can see an example here: http://www.cestici.info/test.jpg

The problem is that when the information div appears, the mouse
pointer isn't on the cover art div anymore for the navigator so the
information div disappears, and so on... resulting in a flash effect.

How can I do this without the flash effect?

Thanks for your help :)


[jQuery] Problem in circular scrolling

2009-08-24 Thread Adnan Ahmed

Great tool. I am using circular feacture of this library. I am getting
one problem of delaying. Open “examples/special_circular.html” file
and add
scroll: ‘5′,
visible: ‘5′,
in

jQuery(document).ready(function() {
jQuery(’#mycarousel’).jcarousel({
wrap: ‘circular’,
scroll: ‘5′,
visible: ‘5′,
itemVisibleInCallback: {onBeforeAnimation:
mycarousel_itemVisibleInCallback},
itemVisibleOutCallback: {onAfterAnimation:
mycarousel_itemVisibleOutCallback}
});
});

Now open skin.css of ie7 and find the class
“.jcarousel-skin-ie7 .jcarousel-clip-horizontal”
and change the width “500px”
Now after these settings the scrolling takes a lot time on third
click. Even something my browser does not respond.
Beside back button works fine with these setting.

Any idea. I really need fix of this.


[jQuery] Re: $.ajax calls in firefox doesn't work

2009-08-24 Thread hosemaria

Clearing Cookies doesn't work

I am newbee with analyzing headers responses. This are info taken from
Fiddler debuger (FX responses). If you could help me to find something
odd I will be grateful.

Request Header:

POST /manager/www/admin/parking_cfg.php HTTP/1.1
Host: www.somedomain.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.13)
Gecko/2009073022 Firefox/3.0.13
Accept: application/json, text/javascript, */*
Accept-Language: pl,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Referer: http://www.somedomain.com/manager/www/admin/index2.php?page=parking
Cookie: PHPSESSID=86cd59b9c6377608ca601713e53e357b
Pragma: no-cache
Cache-Control: no-cache

Response header:
HTTP/1.1 400 Bad Request
Server: IdeaWebServer/v0.60
Date: Mon, 24 Aug 2009 22:48:12 GMT
Content-Type: text/html
Content-Length: 191
Connection: close

HTML
HEAD

TITLE400 Bad Request/TITLE

/HEAD
BODY BGCOLOR=#FF

H1400 Bad Request/H1
Your browser sent a request that this server could not understand.

/BODY
/HTML


parking_cfg.php returns JSON correctly if you type into FX browser
address   http://www.somedomain.com/manager/www/admin/parking_cfg.php

Greetings


[jQuery] Return Query Results From $.ajax POST

2009-08-24 Thread sdtacoma

Is it possible to return Query results from a jquery $.ajax POST call?
It seems as though it will only return one value. What am I missing?


var formval = { preceptname:$(this) .val()};
$.ajax({
  type: POST,
  url: request_processor.cfm,
  dataType: text,
  data: formval,
  success: function(response){
$('#contentdiv').fadeIn(2000).html(response);
}
});
});


[jQuery] Re: Callback Not Working

2009-08-24 Thread Aaron Gundel

Hi George,

It appears that your code isn't working because the context of your
this pointer changes in the callback inside of your fadeout effect.
it becomes your section title.  So when you do a find on it, you find
only children of the section title that are of the class explanation
-- which don't exist, hence your problem.  Using siblings should
solve the issue.  Try the following code.  Note that I've changed your
mouseove to a mouseleave, since mouseover appears to fire too
frequently.  Hope this helps, or at least gets you on your way

function() {
$('li').mouseover(
  function() {
$(this).find('div.SectionTitle').fadeOut('fast', function() {
  $(this).siblings('div.Explanation').fadeIn('slow');
});
});
$('li').mouseleave(
  function() {
$(this).find('div.Explanation').fadeOut('fast', function () {
$(this).siblings('div.SectionTitle').fadeIn('slow'); });
});
  }

Aaron

On Mon, Aug 24, 2009 at 5:16 AM, GLSmythgeorge.sm...@gmail.com wrote:

 I am looking to fade text out when the mouse passes over it and
 replace it with text that is faded in. My understanding is that this
 needs to be done through a callback, as the text needs to fade out
 completely before fading in. However, when I try to implement this
 idea the content does not fade in, so I must be doing something wrong.

 My code is:

    script type=text/javascript
    var Tips = {
      ready: function() {
        $('ul#SiteNav li').mouseover(
          function() {
            $(this).find('div.SectionTitle').fadeOut('fast', function
 () {
              $(this).find('div.Explanation').fadeIn('slow');
            });
        });
        $('ul#SiteNav li').mouseout(
          function() {
            $(this).find('div.Explanation').hide();
            $(this).find('div.SectionTitle').show();
        })
      }
    };
    $(document).ready(Tips.ready);
    /script

 I left the mouseout part unchanged, as that is an example of what I am
 changing from. What happens is that the mouseover text fades out, but
 the replaced text does not fade back in. Additionally, the shown text
 flashes before fading out if the mouse rolls over the text (as opposed
 to the containing box), which is not really a problem, but I am not
 understanding why that is happening. All works fine with hide/show.

 Full code can be found at http://dripinvesting.org/Default_test.asp.

 I am apparently missing something basic, so a pointer to a beginner
 would be appreciated.

 Cheers -

 george


[jQuery] Re: [autocomplete] how to query for words with special (UTF-8 encoded) characters?

2009-08-24 Thread Adriano Varoli Piazza

On 7 ago, 06:06, Christer Bygdestam christer.bygdes...@gmail.com
wrote:
 Hi,

 I'm trying to get Joerns awesomeautocomplete-plugin to work with
 UTF-8 but I've had no luck in making it work. Has anyone managed to
 query the backend using UTF-8 encodendcharacters?

 Right now I'm trying my best to decode the incoming string ie
 q=Östman but nothing happens? Do I need to encode the returned
 string as well?

 Any thoughts are greatly appreciated!

 Christer

I'd like to bump this up. I'm trying to implement a dynamic form, and
I need to query for words containing (in this particular case) ñ.

Example:
I want to query for the city 'Añatuya'.
- typing in 'aña' doesn't find it.
- typing in 'ana' displays the word, but without the 'aña' sequence
highlighted. (other returned strings that do contain 'ana' are
properly highlighted).

- firebug tells me the query string sent is
http://localhost/alabern/autocomplete/prov.php?q=a%C3%B1alimit=1000timestamp=1251146094589

Any solutions or pointers? I'm not really javascript-savvy enough to
actually start picking the plugin apart by myself.

--
Saludos
Adriano


[jQuery] Re: How to make it remove class show, and add class hide.

2009-08-24 Thread StefanCandan

Got it working, with the animation too.

$(function(){
$('a.show').toggle(
function(){
var $id=$(this).attr('href');
   $('#'+$id).show(500);
} ,
function(){
var $id=$(this).attr('href');
  $('#'+$id).hide(500);
}
);
});

On Aug 25, 12:45 am, marksimon zen...@gmail.com wrote:
 head
 meta http-equiv=Content-Type content=text/html; charset=utf-8 /
 titleUntitled Document/title
 style
 .hide {
         display:none;
         }
 /style
 script type=text/javascript src=../jquery/jquery.js/script
 script type=text/javascript
 $(function(){
         $('a.show').toggle(
                                 function(){
                                 var $id=$(this).attr('href');
                        $('#'+$id).removeClass('hide');
                         } ,
                             function(){
                                 var $id=$(this).attr('href');
                                           $('#'+$id).addClass('hide');
                 }
         );});

 /script
 /head

 body
 a class=show href=3 showhide/a

 div id=3 class=hide
 div 3
 div class=newsnews/div

 /div

 /body
 not sure about the animation

 On Aug 24, 3:33 pm, StefanCandan onlyo...@live.nl wrote:

  Thats not what I wanted, I wanted to make the link show a hidden div.
  And once the div is shown, it should change the link to hide the div
  again once its clicked. but hiding/showing it with the hide  show
  animation.

  On Aug 25, 12:24 am, marksimon zen...@gmail.com wrote:

   $(function(){
           $('a.show').toggle(
                   var $id=$(this).element('id');
                   function(){
                           $('#+$id).removeClass('hide');

                   },
                           function(){
                           $('#+$id).addClass('hide');

                           }
                   );

   });

   Not exactly sure if that's what your trying to do. But this should
   show/hide a div with the same id as the link id on the click event.
   You will also need a css class of .hide { display:none; }

   On Aug 24, 2:37 pm, StefanCandan onlyo...@live.nl wrote:

Okay, so I'm working on this site, currently I have this jquery code:

          $(a.show).click(function(event){
                $(a.show[id=+this.id+]).removeClass(show)
                $(a[id=+this.id+]).addClass(hide)
                $(div[title!=+this.id+][class=news]).hide(500)
                $(div[title=+this.id+][class=news]).show(500)
                event.preventDefault();
          });

it doesn't seem to remove the show class, and add the hide class.


[jQuery] Re: PHP IDE with support JQuery

2009-08-24 Thread Marcel Pociot

You can also take a look at Aptana Studio at http://www.aptana.com/
It's free, based upon Eclipse and has a PHP IDE as well as support of
the major javascript libraries (jquery,mootools,ect.)

On 24 Aug., 15:48, Michael Lawson mjlaw...@us.ibm.com wrote:
 As a codeigniter fanboy, I'd be very anxious to mess around with the CI
 plugin for your IDE.  the jQuery plugin also looks very cool!

 cheers

 Michael Lawson
 Development Lead, Global Solutions, ibm.com
 Phone:  1-276-206-8393
 E-mail:  mjlaw...@us.ibm.com

 'Whether one believes in a religion or not,
 and whether one believes in rebirth or not,
 there isn't anyone who doesn't appreciate kindness and compassion..'

   From:       s...@codelobster.com s...@codelobster.com                   
                                                  

   To:         jQuery (English) jquery-en@googlegroups.com                 
                                                  

   Date:       08/24/2009 09:45 AM                                             
                                                  

   Subject:    [jQuery] PHP IDE with support JQuery                            
                                                 

 Hi.

 Let me introduce free PHP IDE with available JQuery plug-in (paid):

 Codelobster PHP Edition (http://www.codelobster.com) - has all
 standart abilities for editing code
 - PHP/HTML/CSS/JavaScript highlighting, autocomplete, code structure
 - PHP debugger
 - code folding, tooltips, help and etc.

 and it has special JQuery features:
 - autocomplete for JQuery library
 - context and dynamic help for JQuery library

 We are waiting for your comments and suggestions.

 Regards,
 Codelobster Team.

  graycol.gif
  1 KBAnzeigenHerunterladen

  ecblank.gif
  1 KBAnzeigenHerunterladen


[jQuery] Problem with Ajax Cross-Domain

2009-08-24 Thread Alexander Cabezas

Hi.

When i try to make an ajax request like:
$.get( http:localhost:3001/account/create.json, SignUp.onComplete );

I get the following error in the firebug ( Net ):
OPTIONS - 405 Method Not Allowed

Is it related to cross-domain request?.


[jQuery] Advice clone and live

2009-08-24 Thread Julien

Hi,

i'm trying to clone a row in a table with events attached to it.

I initialy have the following html code to duplicate :

tr
td
input type=text id=users name=users[] class=users /
/td
 td
 input type=text id=expiration name=expiration[]
class=expirationDate /
 a class=addUser+/a
 /td
/tr

On the users input i have the autocomplete plugin and on
expirationDate the datepicker one.

When i started cloning, i had the html code alright but not the
events. So i surrounded the original functions with this :  $
(.users).live(click,function(){ ending up with this :

$(.users).live(click,function(){
$(.users).autocomplete('/contactSearch.html', {
width: 300,
multiple: true
});
});
$(.expirationDate).live(click,function(){
$(.expirationDate).datepicker({
  dateFormat: 'dd/mm/yy'
});
});

Despite the fact that it doesn't sound optimized, this work with the
autocomplete plugin but no so well with datepicker.

My question really is : there must be a better way, isn't there?

I just need to clone the element with the javascript exactly has it is
when loaded.

Thanks!


[jQuery] Need some ideas for starting a recommendation widget

2009-08-24 Thread Mr. Tunes

Hi, i've read through a lot of documentation and tutorials, but i'm
still kind of stumped as to how i would get this project started. I'd
like to make a small application that basic sorts images based on two
criteria that are selected by the user. eventually i would like those
criteria to be decided using a scroll bar, but in the meantime i just
need to know how to show and hide the images.

so if i gave you the example of a recipe suggestor, there would be a
collection of dishes stored with unique divs or classes. if the person
switched the first option from hot or cold, only the foods dishes that
meet that criteria would show up. then on the second slider they would
pick which part of the world it came from, thereby narrowing down the
choices even more.

is there a plugin which has this functionality built in already? i
know there is the jquery ui slider element which could be of a help.

thanks!


[jQuery] Re: Animating Border Color

2009-08-24 Thread Richard D. Worth
It seems this is working in the latest jQuery UI Effects development branch:
http://jquery-ui.googlecode.com/svn/branches/dev/effects/ui/effects.core.js

example: http://jsbin.com/ogono

Give that a shot. If you find any issues, please bring them up here:

http://groups.google.com/group/jquery-ui-dev

We're working on moving this into the trunk for the next jQuery UI release,
1.8a2. Thanks.

- Richard

On Mon, Aug 24, 2009 at 4:34 PM, phpn1b alv...@gmail.com wrote:


 Is it possible to animate an element's border color? I tried $
 ('#foo').animate({ borderColor: '#ff'}, 1000); and $
 ('#foo').animate({ 'border-color': '#ff'}, 1000); with no success.


[jQuery] Re: How to make it remove class show, and add class hide.

2009-08-24 Thread marksimon

head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleUntitled Document/title
style
.hide {
display:none;
}
/style
script type=text/javascript src=../jquery/jquery.js/script
script type=text/javascript
$(function(){
$('a.show').toggle(
function(){
var $id=$(this).attr('href');
   $('#'+$id).removeClass('hide');
} ,
function(){
var $id=$(this).attr('href');
  $('#'+$id).addClass('hide');
}
);
});
/script
/head

body
a class=show href=3 showhide/a

div id=3 class=hide
div 3
div class=newsnews/div

/div

/body
not sure about the animation

On Aug 24, 3:33 pm, StefanCandan onlyo...@live.nl wrote:
 Thats not what I wanted, I wanted to make the link show a hidden div.
 And once the div is shown, it should change the link to hide the div
 again once its clicked. but hiding/showing it with the hide  show
 animation.

 On Aug 25, 12:24 am, marksimon zen...@gmail.com wrote:

  $(function(){
          $('a.show').toggle(
                  var $id=$(this).element('id');
                  function(){
                          $('#+$id).removeClass('hide');

                  },
                          function(){
                          $('#+$id).addClass('hide');

                          }
                  );

  });

  Not exactly sure if that's what your trying to do. But this should
  show/hide a div with the same id as the link id on the click event.
  You will also need a css class of .hide { display:none; }

  On Aug 24, 2:37 pm, StefanCandan onlyo...@live.nl wrote:

   Okay, so I'm working on this site, currently I have this jquery code:

             $(a.show).click(function(event){
                   $(a.show[id=+this.id+]).removeClass(show)
                   $(a[id=+this.id+]).addClass(hide)
                   $(div[title!=+this.id+][class=news]).hide(500)
                   $(div[title=+this.id+][class=news]).show(500)
                   event.preventDefault();
             });

   it doesn't seem to remove the show class, and add the hide class.


[jQuery] Re: Animating Border Color

2009-08-24 Thread phpn1b

Ah got it. I assumed it was part of jquery core and didn't need UI.
Thanks.

On Aug 24, 7:13 pm, Richard D. Worth rdwo...@gmail.com wrote:
 It seems this is working in the latest jQuery UI Effects development 
 branch:http://jquery-ui.googlecode.com/svn/branches/dev/effects/ui/effects.c...

 example:http://jsbin.com/ogono

 Give that a shot. If you find any issues, please bring them up here:

 http://groups.google.com/group/jquery-ui-dev

 We're working on moving this into the trunk for the next jQuery UI release,
 1.8a2. Thanks.

 - Richard

 On Mon, Aug 24, 2009 at 4:34 PM, phpn1b alv...@gmail.com wrote:

  Is it possible to animate an element's border color? I tried $
  ('#foo').animate({ borderColor: '#ff'}, 1000); and $
  ('#foo').animate({ 'border-color': '#ff'}, 1000); with no success.


[jQuery] Re: Return Query Results From $.ajax POST

2009-08-24 Thread James

If you use the dataType:'json', you can return the data in JSON
format, which you can use in Javascript just like a Javascript object.
This will allow you to store more data in one response. Other options
are HTML and XML as the respose type, but may require more parsing
work to get the data you want. JSON is highly recommended.

On Aug 24, 10:21 am, sdtacoma jbres...@gmail.com wrote:
 Is it possible to return Query results from a jquery $.ajax POST call?
 It seems as though it will only return one value. What am I missing?

 var formval = { preceptname:$(this) .val()};
 $.ajax({
           type: POST,
           url: request_processor.cfm,
           dataType: text,
           data: formval,
           success: function(response){
                 $('#contentdiv').fadeIn(2000).html(response);
                         }
                 });
         });


[jQuery] Re: Advice clone and live

2009-08-24 Thread James

clone(true) should do the trick. Though before there was a bug with
this function where the events would not be cloned (in IE, I think). I
don't know if that issues still exists, but try it out.
Documentation: http://docs.jquery.com/Manipulation/clone#bool

On Aug 24, 7:10 am, Julien tux...@gmail.com wrote:
 Hi,

 i'm trying to clone a row in a table with events attached to it.

 I initialy have the following html code to duplicate :

 tr
     td
         input type=text id=users name=users[] class=users /
     /td
      td
          input type=text id=expiration name=expiration[]
 class=expirationDate /
          a class=addUser+/a
      /td
 /tr

 On the users input i have the autocomplete plugin and on
 expirationDate the datepicker one.

 When i started cloning, i had the html code alright but not the
 events. So i surrounded the original functions with this :  $
 (.users).live(click,function(){ ending up with this :

 $(.users).live(click,function(){
         $(.users).autocomplete('/contactSearch.html', {
             width: 300,
             multiple: true
         });});

 $(.expirationDate).live(click,function(){
         $(.expirationDate).datepicker({
           dateFormat: 'dd/mm/yy'
         });

 });

 Despite the fact that it doesn't sound optimized, this work with the
 autocomplete plugin but no so well with datepicker.

 My question really is : there must be a better way, isn't there?

 I just need to clone the element with the javascript exactly has it is
 when loaded.

 Thanks!


[jQuery] Re: Superfish v1.4.8 clashes with SWF?

2009-08-24 Thread Charlie





try setting your wmode on flash to 

param name="wmode" value="transparent" /


jim wrote:

  Trying to use superfish / jquery navigation on a site. Works great on
my Mac (Safari  Firefox), but in IE (not sure of the version) the
drop-downs go behind the SWFs that sit just below the nav. Here's a
link to the site:

http://www.baitcreative.com/rolling_hills/

Is there an easy fix for this?

  






[jQuery] Re: $.ajax calls in firefox doesn't work

2009-08-24 Thread James

Does it work if you change your AJAX submit method type to GET,
instead of POST?

On Aug 24, 12:58 pm, hosemaria hosema...@gmail.com wrote:
 Clearing Cookies doesn't work

 I am newbee with analyzing headers responses. This are info taken from
 Fiddler debuger (FX responses). If you could help me to find something
 odd I will be grateful.

 Request Header:

 POST /manager/www/admin/parking_cfg.php HTTP/1.1
 Host:www.somedomain.com
 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.13)
 Gecko/2009073022 Firefox/3.0.13
 Accept: application/json, text/javascript, */*
 Accept-Language: pl,en-us;q=0.7,en;q=0.3
 Accept-Encoding: gzip,deflate
 Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
 Keep-Alive: 300
 Connection: keep-alive
 X-Requested-With: XMLHttpRequest
 Referer:http://www.somedomain.com/manager/www/admin/index2.php?page=parking
 Cookie: PHPSESSID=86cd59b9c6377608ca601713e53e357b
 Pragma: no-cache
 Cache-Control: no-cache

 Response header:
 HTTP/1.1 400 Bad Request
 Server: IdeaWebServer/v0.60
 Date: Mon, 24 Aug 2009 22:48:12 GMT
 Content-Type: text/html
 Content-Length: 191
 Connection: close

 HTML
 HEAD

         TITLE400 Bad Request/TITLE

 /HEAD
 BODY BGCOLOR=#FF

         H1400 Bad Request/H1
         Your browser sent a request that this server could not understand.

 /BODY
 /HTML

 parking_cfg.php returns JSON correctly if you type into FX browser
 address  http://www.somedomain.com/manager/www/admin/parking_cfg.php

 Greetings


[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-24 Thread Michael Geary

What happens if you take your URL:

http:localhost:3001/account/create.json

and paste it into the address bar in Firefox and then hit Enter?

Do you see it add something that was missing? :-)

BTW, I assume your app is running on localhost:3001, is that right? I'd
suggest using a relative URL instead, e.g.:

/account/create.json

That way you won't have to change your code if you move your app to a
different server.

-Mike

 From: Alexander Cabezas
 
 Hi.
 
 When i try to make an ajax request like:
 $.get( http:localhost:3001/account/create.json, SignUp.onComplete );
 
 I get the following error in the firebug ( Net ):
 OPTIONS - 405 Method Not Allowed
 
 Is it related to cross-domain request?.



[jQuery] Re: Form Plugin issue

2009-08-24 Thread kostjazz

It looks like the problem is that the form is submitted into generated
Iframe, which doesn't have references to jquery or other JS libraries
that you might be using.

I'm not too sure if there is an easy way around it as my JS/jquery
skills are far from perfect. One of the dodgy solutions that come to
my head would be escaping JS in your response and then when you copy
it from iframe to the page remove the escaping. But i guess I'll
better refactor my code to use json response and will see if it
works...

Cheers
Kostya


[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-24 Thread Dhruva Sagar
Michael,
From his last statement / question , it seems to me that he is making the
ajax request from a different server than the application itself.
Hence I don't think he can use the relative URL that you're suggesting.

Now coming to the error, I am not sorry but I don't have a very good idea
about the error, haven't seen it before, but I think I would really like to
know myself!

Thanks  Regards,
Dhruva Sagar.


Ted Turner http://www.brainyquote.com/quotes/authors/t/ted_turner.html  -
Sports is like a war without the killing.

On Tue, Aug 25, 2009 at 7:09 AM, Michael Geary m...@mg.to wrote:


 What happens if you take your URL:

 http:localhost:3001/account/create.json

 and paste it into the address bar in Firefox and then hit Enter?

 Do you see it add something that was missing? :-)

 BTW, I assume your app is running on localhost:3001, is that right? I'd
 suggest using a relative URL instead, e.g.:

 /account/create.json

 That way you won't have to change your code if you move your app to a
 different server.

 -Mike

  From: Alexander Cabezas
 
  Hi.
 
  When i try to make an ajax request like:
  $.get( http:localhost:3001/account/create.json, SignUp.onComplete );
 
  I get the following error in the firebug ( Net ):
  OPTIONS - 405 Method Not Allowed
 
  Is it related to cross-domain request?.




[jQuery] Variable in :eq() with jquery.calculation

2009-08-24 Thread betweenbrain

Hi All,

I'm trying to use jquery.calculation to calculate some text inputs
versus a selected field. I'm running into an issue with using
variables to select information from the same row. Here's what I have
so far. Any help would be greatly appreciated:

script type=text/javascript
$(document).ready(
function (){
$(input[name^=module-]).bind(keyup, recalc);
$(input[name='input-positions']).bind(click, 
recalc);
recalc();
}
);

function recalc(){
var i = $(this)[0].rowIndex;
$([id=total-positions-left]).calc(avail - (used * qty),
{   avail: 
$([name='input-positions']:checked).val(),
used: $([td.item-qty-pos-reqd'].eq(i)),
qty: $(input[id^='module-qty'].eq(i))
}),
i = ++
$(#total-positions-left).text($this.sum()
);
}
/script


[jQuery] get the hover color of a link

2009-08-24 Thread Dale Larsen

I need to get the css hover color of an element. Since hover is a
pseudo class of a class or id, I do not see a way of returning the
color.

I tried:

$('.contentArea a:hover').css('color');

but it does not return the hover color.

I understand that jQuery probably traverses the inline styles and
there is no way to set the hover  pseudo class inline, hence the
reason for the .hover function.

Is it possible to find and return the hover color with jQuery. If so
how?


[jQuery] Superfish menu help!

2009-08-24 Thread Dinney

Hi,

I am trying to use this menu on my website - i bought this template
and im trying to implement the superfish menu on it, but its giving me
major problems. I can see there is a drop down there that shows up on
hover BUT its hidden and cut because of the table? i dont know - i
tried to fix it with z-index solutions but maybe im not putting that
property in the right place? any help would be GREAT - please help!

http://www.dinzign.com/mace/  (its the menu on top with the red
background)



[jQuery] [validate] default messages for an instance of jquery.validator

2009-08-24 Thread carneiro

Hello, i was trying to set some default messages for an instance of
jquery.validator. Saw that i can set only global default messages,
but not per instance... so i found a way of doing i but i need to add
a line on jquery.validate.js file:

@line 548 (jquery.validate.js):

defaultMessage: function( element, method) {
return this.findDefined(
this.customMessage( element.name, method ),
this.customMetaMessage( element, method ),
this.settings.messages[method], // added this 
for default instance
messages
// title is never undefined, so handle empty 
string as undefined
!this.settings.ignoreTitle  element.title || 
undefined,
$.validator.messages[method],
strongWarning: No message defined for  + 
element.name + /
strong
);
},

and i set the messages like this:
...
var _messages = {
required: O campo {0} é de preenchimento obrigatório!,
email: O campo {0} deve conter um e-mail válido!
};
for(var name in _messages){
_this.validator.settings.messages[name] = _messages[name];
}
...

It worked perfectly, but i really dont like to change the api js. If
anyone knows how to do it without changing the original js, please let
me know.

thanks


[jQuery] Re: Invalid Argument Line 12 1.3.2 IE 7 and 8rc1

2009-08-24 Thread matt

I know this has been solved but thought I might add my own solution to
a similar problem causing the same error message in IE, in case it's
helpful to anyone.

It was the DTD declaration - make sure it's first thing in the file
and make sure it's correct! Some how, something had been inserted
above the DTD and that broke IE and caused the error.

Cheers.



On Jul 28, 2:58 pm, kyleduncan kyledun...@hotmail.com wrote:
 I have fixed this issue:

 Ie6, 7 and 8 were getting an invalid argument error because of CSS
 padding: once padding was removed fro mthe textareas completely in a
 separate IE stylesheet, IE6 and 7 and 8 all worked fine with multiple
 textareas and no errors

 Opera was fixed by this problem also (it was showing the boxes very
 high by default), although im not sure exactly what caused Opera to
 correct - but it works fine now too!

 hope this helps others

 On Jul 22, 4:20 am, kyleduncan kyledun...@hotmail.com wrote:



  It is caused byautogrow.js, but i have no idea how to fix it!autogrowisnt 
  even working for me in IE6 and 7, when you click inside
  atextareait shrinks down to one line high and then doesnt expand as
  you type. and when you click in the secondtextareaon my page nothing
  happens at all (as ifautogrowdoesnt even activate).

  On Jun 18, 1:13 pm, kitafe er...@ict-network.com wrote:

   Does anyone have a solution. I have the same problem and I use jquery
   1.3.2 and ui 1.7. I've tried both the minified and the none minified
   versions.
   With ui accordion  version 1.6rc2 i have no problem. But I then the
   collapsible wont work.

   On Apr 26, 8:06 pm, sabrinax sunse...@gmail.com wrote:

I did, yes.  You can see my sample page here:www.tattoozu.net/trial
to see the problem

On Apr 26, 12:57 pm, dhtml dhtmlkitc...@gmail.com wrote:

 On Mar 9, 3:43 am, phipps_73 phipp...@googlemail.com wrote:

  Hi,

  I have just upgraded one of our development sites to 1.3.2 and ui 
  1.7.
  I have also updated all of the plugins
  (forms,validate,thickbox,calculation,blockUI,autogrow) to the latest
  versions which should all be compatible with 1.3.2 and the site is
  working perfectly in Firefox 3 on OS X and XP.

  However on IE8rc1 and inIE7compat mode I am getting an Invalid
  Argument error reported at line 12 of jquery-1.3.2.min.js. That is 
  the
  usual really helpfulIEerror message and I have been unable to track
  down the source of the problem.

 Do you get the same error with the normal, non-minified version?

 Garrett


[jQuery] Re: Need some ideas for starting a recommendation widget

2009-08-24 Thread Justin

It seems to me the first step would be getting your data into your
item list.Something like:

div id=recipeList
div class=recipe hot italianPizza/div
div class=recipe hot italianSpaghetti/div
div class=recipe cold frenchPastry/div
div class=recipe hot frenchSnails/div
/div

Once you know what your data is then you can code the hide/show part.

In the about example you would have events on the user controls that
show/hide items using a selector, so
$('#recipeList .hot').show(); // Shows all hot food.

With two criteria you would need to come up with selector that takes
both into account, so
$('#recipeList .recipe').hide(); // hide everything
$('#recipeList .hot').add('#recipeList .italian').show(); // Show
everything that is hot OR italian





[jQuery] Loading jQuery - Need a black screen while it loads

2009-08-24 Thread scotthaslehurst

I am designing a site that is jquery heavy.

When the site loads it takes a while for all the scripts to load and
then the images to settle down - more so in IE, naturally.

I would ideally like to display a black screen or cover everything
with a div while it settles down. I have tried a few Timeout scripts
but they appear to be conflicting and don't work.

Any body got any ideas how I can either display a blank screen while
it all settles down or just avoid the problem all together.

The site I'm talking about is here:

http://www.mintinnovation.com/draft2/



[jQuery] Re: Loading jQuery - Need a black screen while it loads

2009-08-24 Thread Nathan Bubna

if you used the loading plugin:   http://plugins.jquery.com/project/loading

$.loading(true, {mask:true, maskCss:{background:'#000', opacity:1}});

and when all is ready:

$.loading(false);

See the demo page for the project to get a feel for more options and
also some nice CSS you can use to make the loading message prettier.

On Mon, Aug 24, 2009 at 9:13 PM,
scotthaslehurstscotthaslehu...@gmail.com wrote:

 I am designing a site that is jquery heavy.

 When the site loads it takes a while for all the scripts to load and
 then the images to settle down - more so in IE, naturally.

 I would ideally like to display a black screen or cover everything
 with a div while it settles down. I have tried a few Timeout scripts
 but they appear to be conflicting and don't work.

 Any body got any ideas how I can either display a blank screen while
 it all settles down or just avoid the problem all together.

 The site I'm talking about is here:

 http://www.mintinnovation.com/draft2/




[jQuery] Re: Loading jQuery - Need a black screen while it loads

2009-08-24 Thread scotthaslehurst

Hi,

That's perfect. Thanks.

Just to follow up. Is it enough to use just the jquery.loading.js? Or
must I also source the other scripts below that the demo uses? The
documentation is not clear

script type=text/javascript src=../../jquery.1.3.2.js/
script
script type=text/javascript src=../../trunk/
jquery.values.js/script
script type=text/javascript src=../log/log.js/script



On Aug 25, 11:25 am, Nathan Bubna nbu...@gmail.com wrote:
 if you used the loading plugin:  http://plugins.jquery.com/project/loading

 $.loading(true, {mask:true, maskCss:{background:'#000', opacity:1}});

 and when all is ready:

 $.loading(false);

 See the demo page for the project to get a feel for more options and
 also some nice CSS you can use to make the loading message prettier.

 On Mon, Aug 24, 2009 at 9:13 PM,

 scotthaslehurstscotthaslehu...@gmail.com wrote:

  I am designing a site that is jquery heavy.

  When the site loads it takes a while for all the scripts to load and
  then the images to settle down - more so in IE, naturally.

  I would ideally like to display a black screen or cover everything
  with a div while it settles down. I have tried a few Timeout scripts
  but they appear to be conflicting and don't work.

  Any body got any ideas how I can either display a blank screen while
  it all settles down or just avoid the problem all together.

  The site I'm talking about is here:

 http://www.mintinnovation.com/draft2/


[jQuery] jQuery lightbox

2009-08-24 Thread Ram...

Hi,

Lightbox is not showing on prod site, but its working  on local box
and internet.

Any idea what may be the problem?

Thank you,
Ramanjaneyulu