[jQuery] Re: How to pass variables between jQuery plugins?

2009-02-21 Thread Stephan Veigl

Hi Vic,

the global anArray works fine see:
http://jsbin.com/ukesa/edit

The problem is that you have to wait until the ASYNCHRONOUS callback
of your get() function has been called.

1) minor style remark
You could declare anArray outside of the ready function with a var
statement. This makes the code more readable IMHO, but it's just
personal style.
  var anArray = [ ];
  $(function () {...}

2) wait for the callback
Try the jsbin link.
The alerts
The first alert is empty, even it is called after the get functions.
The second alert is falled from a callback and has one payload data.
The third alert is falled from the other callback and has 2 data.

When you press the show button the current data of anArray are shown.
If you press it _before_ the callbacks are finished you will see that
the alert is empty. But for that you would have to be really fast. I
doubt that this is possible with a reasonable fast Internet connection
:-)
If you press the button _after_ the callbacks has been called, you
will see that anArray has some data.

3) wait for more than one callback
(again in the jsbin example)

Use a global counter that is increased in every callback. (For
simplicity, the example is for 2 callbacks - simply replace 2 by 3
for your problem.)
If the counter is 2, call your process (showGraph() ) function from
_every_ callback. Just remember the first A in AJAX - Asynchronous,
so you cannot say which callback is executed as first, second or last.


by(e)
Stephan

2009/2/20 Vic vics...@gmail.com:

 Thanks Stephan for jumping in.

 anArray near the end of the callback function within $.get() now has
 the correct values I want from the csv file. I understand what you
 said about doing everything from the callback function. But in my case
 I have 3 csv files to open and I'd like to perform some graphing
 functions (via jQuery plugin flot) after all 3 have been read.

 What's unusual (at least to me anyway) is that the global variable
 anArray never gets filled with the csv file values outside of the
 callback function within $.get(). So I think I must be doing something
 wrong.

 Thanks again in advance,
 Vic

 On Feb 20, 5:33 am, Stephan Veigl stephan.ve...@gmail.com wrote:
 Hi Vic,

 I guess the problem is that get is an asynchronous function. So
 anArray exists outside of your get-callback function (since you use it
 as global variable) but the value is not set when the get function
 returns since your callback has not been executed yet.
 So whenever you access anArray you have to take care that it's already
 filled with the right values. The easiest way would be to do
 everything in your callback function, or write a data handling
 function you call from the callback function if you want to make your
 code more readable and modular.

 by(e)
 Stephan

 2009/2/20 Vic vics...@gmail.com:



  Hopefully this won't sound too silly, although it probably is. I've
  been scratching my head about how to get 2 jQuery plugins to be aware
  of the same array variable.

  Situation:

  $(function () {
 anArray = [ ];
  // Instead of hardcoding the values in an array like below:
  //   anArray = [ [A,1], [B,2], [C,3]   ];
  // I want to read it from a csv file 
  usinghttp://plugins.jquery.com/project/csv.
  So I put in:
 $.get(a1b2c3.csv, function(data) {
   anArray  = $.csv() (data);
   alert(anArray);   // this works just fine. File
  is read. anArray is set. Everything's great.
 });

 // but outside of the $.get function, anArray is undefined. And i
  can't pass it out no matter what I try!

// ... passing anArray to jQuery flot plugin to plot a graph,
  among other things ..

  }

  I'm sure I'll get a big duh! from someone on this mailing list. But
  alas, I admit, I'm new to jQuery.

  Thanks in advance,
  Vic


[jQuery] Re: Jquery Ajax one request, multiple answers problem

2009-02-21 Thread Jsbeginner
Thanks, I haven't tested it much yet but it seems to have solved the 
problem :)


ricardobeat a écrit :

set cache: false in your $.ajax call to disable cacheing of responses.
You can also add a random query parameter to the URL if that doesn't
work.

- ricardo

On Feb 20, 8:53 am, Jsbeginner jsbegin...@monarobase.net wrote:
  

Hello,

I've been working on a jquery projet (with the lastest stable version of
jquery) that retrieves information using json from a php script that
requests information from an API.
The script lists all the different extensions with a status colomn that
says what it's doing (waiting, searching or result).
The script gets the list of extensions form an input select drop down
that's generated by PHP (this allows me to manage extensions using a
database). It then launches the search for the selected extension and
when the search is finished it launches the search for all the other
extensions.

I need one answer per query but it seems that the ajax success function
is launched more than once which is not what I want, also sometimes it
seems to keep some sort of memory of what the answer was last time (if I
add a sleep function to the php script sometimes it gets the first
answer befor the sleep is over) ...

I've got a php script to check whois servers that replys with either
taken, available or error.

When the whois servers answer quickly there are no visible problems, but
when they are slow the ajax request seems to be launched a second time
and sometimes a third time when they are very slow.

So I might see for example : domain.com, status : available, and then 2
seconds later it will be replaced by domain.com, status : error and
sometimes then replaced by domain.com, status : available.

In order to test this I replaced .html( by .append( and I can then
see all the different results...

Of course I could check that the html id contains the searching text
and if not to not change it's value, but I would like to stop it
launching the search more than once ... !

Is this a bug or an error in my code ? should I try it with an earlier
version of jquery ?

Here is my javascript code :

function CheckWhois() {
$('#domchk').submit(function() {
ls = Array();
$(#dextoption).each(function(i){
i = i+1;
ls[i] = $(this).val();  
});

var ndom = $('#ndom').val();
var dext = $('#dext').val();
$(#domresult).html(table
id=\domtab\trthSel./ththDomain/ththstatus/th/trtrtd
colspan=\4\Chose TLD/td/trtr class=\chosen\tdinput
type=\checkbox\ name=\sel\ value=\+ndom+dext+\
//tdtd+ndom+dext+/tdtd id=\chosenstatus\img
src=\images/domload.gif\ alt=\en cours ...\ //td/trtrtd
colspan=\4\Autres Extensions/td/tr/table);
for ( var e in ls) {
if (dext != ls[e]) {
$(#domtab).append(tr class=\+ls[e]+\tdinput
type=\checkbox\ name=\sel\ value=\+ndom+ls[e]+\
//tdtd+ndom+ls[e]+/tdtd id=\status+e+\img
src=\images/domball.gif\ alt=\waiting ...\ //td/tr);
}  
}

$.ajax({
url : scripts/ajaxwhois.php,
type : POST,
data : domain=+ndom+ext=+dext,
dataType : json,
error : function (xhr, desc, exception)
{$(#chosenstatus).html(Error); },
success : function (data) {
if(data.error) {
extd.html(Erreur);
} else {
$(#chosenstatus).html(data.status);
for ( var e in ls) {
var extd = $(#status+e);
if (dext != ls[e]) {
extd.html(img
src=\images/domload.gif\ alt=\searching ...\ /);
GetWhois(ndom,ls[e],e);
}
}
}
}
});

return false;
});


}

function GetWhois(ndom,ls,e){
$.ajax({
url : scripts/ajaxwhois.php,
type : POST,
data : domain=+ndom+ext=+ls+num=+e,
dataType : json,
error : function (xhr, desc, exception) {
$(#status+e).html(Error);},
success : function (data) {
if(data.error) {
$(#status+e).html(Error);
} else {
$(#status+data.num).append(data.status);
}
}
});

}

$(document).ready(function(){
CheckWhois();

});

Thankyou !



  




[jQuery] Disaster with Png fix

2009-02-21 Thread David .Wu

IE6 doesn't support transparent png file, so people usually use
javascript to fix it.

This is what I choose
http://www.twinhelix.com/css/iepngfix/

but when I use it with ui such as $.dialog() in IE6, the effect become
pretty slow

for example
http://www.yuri.com.tw/member_register.php

This is a member registration page,
出生年月日 means birthday, I put ui datepicker here, in IE7 or Firefox or
any other browser works well, but in IE6 it's like a disaster

does any one have better solution to make it6 use both png fix and
jQuery ui well?


[jQuery] How to loop through JSON data

2009-02-21 Thread newkid85

If I have JSON data like this:

{ 9: { title: Event 1, style: rock }, 11: { title:
Event 2, style: pop }, 15: { title: Event 3, style:
house }, 16: { title: Event 4, style: metal} }

How can I loop through each item grabbing each key/value pair for
outputting? Is this possible with $.each?
I tried the following:

var event = '';
$.each(results, function(title, style) {
   event += 'div' + title + ' ' + style +  '\/div';
});
$('#events').html(event);

But it returned

9 [object Object]
11 [object Object]
15 [object Object]
16 [object Object]

I'm guessing my syntax is wrong or I am misusing the function. Any
help appreciated.


[jQuery] Re: How to loop through JSON data

2009-02-21 Thread Thomas Jaggi

Your Loop should probably look like this:

$.each(results, function(key,val) {
event += 'div' + val.title + ' ' + val.style +  '\/div';
});




On 21 Feb., 12:51, newkid85 newki...@googlemail.com wrote:
 If I have JSON data like this:

 { 9: { title: Event 1, style: rock }, 11: { title:
 Event 2, style: pop }, 15: { title: Event 3, style:
 house }, 16: { title: Event 4, style: metal} }

 How can I loop through each item grabbing each key/value pair for
 outputting? Is this possible with $.each?
 I tried the following:

 var event = '';
 $.each(results, function(title, style) {
                event += 'div' + title + ' ' + style +  '\/div';});

 $('#events').html(event);

 But it returned

 9 [object Object]
 11 [object Object]
 15 [object Object]
 16 [object Object]

 I'm guessing my syntax is wrong or I am misusing the function. Any
 help appreciated.


[jQuery] Re: How to loop through JSON data

2009-02-21 Thread Alain Roger
Hi,
first i would rather suggest to not use numbers as array name... in your
example you will have problem while debuggin code and i'm not sure that it
will work correctly.
so i would suggest instead of using 9 to use something else but with
characters.

you can do something like that (where myarray is corresponding to your 9:

for (i in myarray)
{
   var _title = myarray[i].title;
   var _style = myarray[i].style;
   ...
}

HTH,

Alain


On Sat, Feb 21, 2009 at 12:51 PM, newkid85 newki...@googlemail.com wrote:


 If I have JSON data like this:

 { 9: { title: Event 1, style: rock }, 11: { title:
 Event 2, style: pop }, 15: { title: Event 3, style:
 house }, 16: { title: Event 4, style: metal} }

 How can I loop through each item grabbing each key/value pair for
 outputting? Is this possible with $.each?
 I tried the following:

 var event = '';
 $.each(results, function(title, style) {
   event += 'div' + title + ' ' + style +  '\/div';
 });
 $('#events').html(event);

 But it returned

 9 [object Object]
 11 [object Object]
 15 [object Object]
 16 [object Object]

 I'm guessing my syntax is wrong or I am misusing the function. Any
 help appreciated.




-- 
Alain
---
Windows XP x64 SP2 / Fedora 10 KDE 4.2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008


[jQuery] Loop through JSON data and check for each option specified

2009-02-21 Thread Thomas Jaggi

Let's say I have on object with my options:
options = jQuery.extend({
title: 'xy',
date: 'xy'
}, opts);

And some JSON data:
({ items: [
{
title: IMGP3817,
date: 2008-10-18T10:35:17-08:00
},
{
title: IMGP3826,
date: 2008-10-18T11:18:19-08:00
}
] })

Now I want to loop through each item and check for each option (e.g.
with indexOf). How to do this?

This doesn't work:
$.getJSON(wheremydatais, function(data){
$.each(data.items, function(i,item){
$.each(options, function(key,val){
if (item.key.indexOf(options.key) != -1) {
console.log('everything ok');
}
});
});
});


[jQuery] Re: Loop through JSON data and check for each option specified

2009-02-21 Thread Thomas Jaggi

Sorry, I mean if (item.key.indexOf(val) != -1) {.

But anyway, any ideas? I know my approach probably makes no sense at
all...


[jQuery] Re: Queuing jQuery animations

2009-02-21 Thread paul.mac

Thanks nik although I ended up using

function(){$(this).css(z-index ,24);});

paul

On Feb 20, 7:33 pm, Nikola nik.cod...@gmail.com wrote:
 I made a typo it's 'zIndex' not 'zindex' - disregard the quotes
 there...

 On Feb 20, 2:32 pm, Nikola nik.cod...@gmail.com wrote:

  You can use a callback which will be executed when the animation is
  finished, like this:

  $(#i2).animate({left: +=110px}, 1500, function(){ $(this).css
  ({zindex:19}); } );

  On Feb 20, 7:06 am, paul.mac paul.mcma...@uuconstruct.co.uk wrote:

   Hi, A newie to jQuery although I do have quiet a lot of JavaScript
   experience.

   I can't seem to grasp the queuing of animations in jQuery

   I have the following code

      $(#right).click(function(){
        ...
         $(#tv2).animate({left: +=110px}, 1500).animate({left: -
   =110px}, 0);
         $(#i2).animate({left: +=110px}, 1500);
        ...
      });

   which both execute at the same time - exactly what I want - and what I
   would like to do is change the z-index of i2 after the animation has
   stopped. I tried appending .css(z-index, 19) to the end of the #i2
   line (before the semi colon) but it seems to execute it straight away.

   (There are some more bits to the code but they will only clutter
   things up)

   Thanks

   paul.mac


[jQuery] how to use sortable and dragable on the same element?

2009-02-21 Thread Vincent Nguyen
I'm reading about http://jqueryui.com/demos/droppable/#photo-manager
When i try to use sortable in the same element!
I can not make it happen! When i move element to other place to sort it, the
original element alwasy got back to original place! When i remove
.dragable(), i can use .sortable!
Does anyone know how to use sortable and dragable on the same element?





-- 
/*
@name Quoc Vinh Nguyen
@email ku...@urbanjar.info
@alias Vincent Nguyen
@phone (84) 98 43 34 98
@site Axcoto.Info
*/


[jQuery] Re: Something broke in IE7

2009-02-21 Thread oliver.pra...@googlemail.com

Thanks Carol,

that at least gives me a good feeling, I'm not the only one :-)

If I find any solution with my as good as none experience in jQuery,
or just through pure luck I will off course not hesitate to post it.

Oliver Prater

On Feb 21, 12:16 am, carol carolgjenk...@hotmail.com wrote:
 Oliver,

 I am having the very same problem...the content in my greybox does not
 show in IE7.  It's driving me nuts!  Have you found a solution?

 Thanks!
 Carol

 On Feb 20, 3:03 pm, oliver.pra...@googlemail.com

 oliver.pra...@googlemail.com wrote:
  Hi guys after I finally got my code working in FF, IE7 is killing me!

  I never programed in javascript bevor so take it easy on me please.

  Using the DEBUGGER has helped me a lot, but now there are no more
  debug messages and I don't know what the hell I can do to get it work!

  I am guessing that my code is broken since the plugins are working
  great!

  The code I wrote in jQuery:http://code-bin.homedns.org/242

  Now to the problem:
  Please note that the behavior I want is already working fine in FF so
  just open it with FF to see what I created it to do.

  The main problem is the pulled up content ... and the format of the
  data after you push the community button.

  Without 
  hiding:http://www.vonderdecken.net/index.php?option=com_contentview=categor...
  (it works perfectly in both IE7 and FF)

  Now starts the strange part in IE7: (This all works in FF like I
  expected it too)
  1.) The pull up works with silverlight player, but if you push
  community you get a mess.
  Link:http://www.vonderdecken.net/

  2.) The pull up doesnt work and its hard to get a hands on of the
  YouTube player, which only loads in the maincontent (shows after you
  press community), well since the pulling up didn't work strangly the
  main content is perfect. (pretty much vice versa the other player)
  Link:http://www.vonderdecken.net/index.php?option=com_contentview=article...

  3.) The gallery pulls up the back, but not the slide show. The show
  seems intact if you hit community but vanishes 1 sec later ...
  Link:http://www.vonderdecken.net/index.php?option=com_morfeoshowtask=view...

  I'm open to really any hints you give to solve this!
  I don't know what roll the jQuery functions and css plays...

  Oliver Prater


[jQuery] how can i close cluetips without using crose button.

2009-02-21 Thread abu

hi all,
i m submitting a form inside cluetips and want to close cluetips after
submitting the form
please suggest me as soon as possible

thanks,
abrar


[jQuery] JQuery star rating plugin - how to disable stars after submission

2009-02-21 Thread planetjones

Hi,

I'm using the JQuery star rating plugin (v2.61) from
http://www.fyneworks.com/jquery/star-rating/.  Everything's going
well, but I'd like to disable the stars when a user has voted.

Currently my users select their rating and click the mouse.  This
updates my database through an AJAX call.  The star rater changes to
show the user's selection, with the stars displayed in red.  However
if the user rolls their mouse over the stars they are still active and
they can submit another vote.  I'm stopping this duplicate voting
server side, but from a usability point of view I'd like the stars to
be disabled after the user's click.

(I guess I could reload the div or something with JQuery to show a
read only version of the stars, but I was hoping there was some more
elegant and simpler solution).

Thanks.


[jQuery] Ajax tabs in non JavaScript browsers

2009-02-21 Thread Playtime

Dear all,

I'm new to jquery and am just started to use the Ajax tabs in a site I
am building. However I do notice that if I disable javascript the tabs
just open the pages normally, which is no good as then inserted pages
don't contain any navigation or other elements.

Is there a way to get the tabs to still work without javascript, I
have seen some sites that still manage to do this and am unsure of
how?


Thanks,

Phil


[jQuery] Re: Loop through JSON data and check for each option specified

2009-02-21 Thread Mike

 This doesn't work:
 $.getJSON(wheremydatais, function(data){
         $.each(data.items, function(i,item){
                 $.each(options, function(key,val){
                         if (item.key.indexOf(options.key) != -1) {
                                 console.log('everything ok');
                         }
                 });
         });

 });

What is key?  That's not in either one of your data structs.


[jQuery] Re: how can i close cluetips without using crose button.

2009-02-21 Thread Karl Swedberg
In the submit handler of the form, you could trigger a click on the  
close link. Something like this:


$('yourform').submit(function() {
  // do your business here.
  $('#cluetip-close').trigger('click')
});

--Karl


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




On Feb 21, 2009, at 2:26 AM, abu wrote:



hi all,
i m submitting a form inside cluetips and want to close cluetips after
submitting the form
please suggest me as soon as possible

thanks,
abrar




[jQuery] Re: Loop through JSON data and check for each option specified

2009-02-21 Thread Mike

 What is key?  That's not in either one of your data structs.

Oops, sorry, didn't look closely enough.  But you can't use 'key' that
way.  Try this:

if (item[key].indexOf(options[key]) != -1)

Not sure what you're after with the indexOf though.


[jQuery] Re: how to use sortable and dragable on the same element?

2009-02-21 Thread Richard D. Worth
I wonder if this demo helps:

http://jqueryui.com/demos/draggable/#sortable

Rather than calling .draggable() and .sortable() on the same element, you
can connect draggables to sortables. No need to call .draggable() on the
sortable as they're already draggable.

Also note: There's a separate mailing list specifically for jQuery UI:

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

- Richard

On Sat, Feb 21, 2009 at 8:03 AM, Vincent Nguyen kureik...@gmail.com wrote:

 I'm reading about http://jqueryui.com/demos/droppable/#photo-manager
 When i try to use sortable in the same element!
 I can not make it happen! When i move element to other place to sort it,
 the original element alwasy got back to original place! When i remove
 .dragable(), i can use .sortable!
 Does anyone know how to use sortable and dragable on the same element?





 --
 /*
 @name Quoc Vinh Nguyen
 @email ku...@urbanjar.info
 @alias Vincent Nguyen
 @phone (84) 98 43 34 98
 @site Axcoto.Info
 */



[jQuery] Stringing functions within a click event

2009-02-21 Thread paul.mac

Hi,

I have a group of animations, which once they are finished I would
like to change all the image ids and then the src attribute. My code
is as follows:

   $(#right).click(function(){
  $(#i0).fadeIn(1500);
  $(#i1).animate({width: '98px', left: +=86px}, 1500);
  ...
  $(#i6).animate({width: 75px, left: +=110px}, 1500);
  $(#i7).fadeOut(1500);
})

I don't know how to string a function to this above one so that it
executes after all the animations have finished. Basically I want to
take the existing ids ( i1, i2 ... and change and change them to i0,
i1 etc.


Thanks in advance

paul


[jQuery] Re: Loop through JSON data and check for each option specified

2009-02-21 Thread Thomas Jaggi

Great, that's it. Thanks a lot!

The indexOf is just an example. The options are actually some kind of
filters and I want to check each item against each filter. Depending
on the filter It could be indexOf.



On 21 Feb., 14:44, Mike mal...@gmail.com wrote:
  What is key?  That's not in either one of your data structs.

 Oops, sorry, didn't look closely enough.  But you can't use 'key' that
 way.  Try this:

 if (item[key].indexOf(options[key]) != -1)

 Not sure what you're after with the indexOf though.


[jQuery] Re: Ajax tabs in non JavaScript browsers

2009-02-21 Thread Matt Quackenbush
The 'j' in Ajax is 'JavaScript'.  Bottom line is, if the browser has
JavaScript disabled, you cannot use Ajax.


[jQuery] Re: Stringing functions within a click event

2009-02-21 Thread Thomas Jaggi

You could use the callback function (http://docs.jquery.com/Effects/
animate#paramsdurationeasingcallback).

$(#right).click(function(){
$(#i1).animate({width: '98px', left: +=86px}, 1500, function
(){
var id = $(this).attr('id').split('i')[1];
id = id -1;
$(this).attr('id',id)
});
})



On 21 Feb., 15:15, paul.mac paul.mcma...@uuconstruct.co.uk wrote:
 Hi,

 I have a group of animations, which once they are finished I would
 like to change all the image ids and then the src attribute. My code
 is as follows:

    $(#right).click(function(){
       $(#i0).fadeIn(1500);
       $(#i1).animate({width: '98px', left: +=86px}, 1500);
       ...
       $(#i6).animate({width: 75px, left: +=110px}, 1500);
       $(#i7).fadeOut(1500);
     })

 I don't know how to string a function to this above one so that it
 executes after all the animations have finished. Basically I want to
 take the existing ids ( i1, i2 ... and change and change them to i0,
 i1 etc.

 Thanks in advance

 paul


[jQuery] Re: Ajax tabs in non JavaScript browsers

2009-02-21 Thread Thomas Jaggi

You have to solve this on the server side. If you put a normal link on
the tab you can deliver an appropriate site on reloading.



On 21 Feb., 13:26, Playtime p@btopenworld.com wrote:
 Dear all,

 I'm new to jquery and am just started to use the Ajax tabs in a site I
 am building. However I do notice that if I disable javascript the tabs
 just open the pages normally, which is no good as then inserted pages
 don't contain any navigation or other elements.

 Is there a way to get the tabs to still work without javascript, I
 have seen some sites that still manage to do this and am unsure of
 how?

 Thanks,

 Phil


[jQuery] Re: Stringing functions within a click event

2009-02-21 Thread paul.mac

Thanks - would it not be easier to set up a loop that is executed
after all the animations have been finished? As I have 8 numbered form
0 to 8, will there not be a conflict when you end up with 2 objects
with id1?

Thanks

paul



On Feb 21, 2:29 pm, Thomas Jaggi thomas.ja...@gmail.com wrote:
 You could use the callback function (http://docs.jquery.com/Effects/
 animate#paramsdurationeasingcallback).

 $(#right).click(function(){
     $(#i1).animate({width: '98px', left: +=86px}, 1500, function
 (){
         var id = $(this).attr('id').split('i')[1];
         id = id -1;
         $(this).attr('id',id)
     });

 })

 On 21 Feb., 15:15, paul.mac paul.mcma...@uuconstruct.co.uk wrote:

  Hi,

  I have a group of animations, which once they are finished I would
  like to change all the image ids and then the src attribute. My code
  is as follows:

     $(#right).click(function(){
        $(#i0).fadeIn(1500);
        $(#i1).animate({width: '98px', left: +=86px}, 1500);
        ...
        $(#i6).animate({width: 75px, left: +=110px}, 1500);
        $(#i7).fadeOut(1500);
      })

  I don't know how to string a function to this above one so that it
  executes after all the animations have finished. Basically I want to
  take the existing ids ( i1, i2 ... and change and change them to i0,
  i1 etc.

  Thanks in advance

  paul


[jQuery] Re: Stringing functions within a click event

2009-02-21 Thread Thomas Jaggi

I'm not sure if this is a problem since all the animations are
executed at the same time (as far as I know).


On 21 Feb., 15:42, paul.mac paul.mcma...@uuconstruct.co.uk wrote:
 Thanks - would it not be easier to set up a loop that is executed
 after all the animations have been finished? As I have 8 numbered form
 0 to 8, will there not be a conflict when you end up with 2 objects
 with id1?

 Thanks

 paul

 On Feb 21, 2:29 pm, Thomas Jaggi thomas.ja...@gmail.com wrote:

  You could use the callback function (http://docs.jquery.com/Effects/
  animate#paramsdurationeasingcallback).

  $(#right).click(function(){
      $(#i1).animate({width: '98px', left: +=86px}, 1500, function
  (){
          var id = $(this).attr('id').split('i')[1];
          id = id -1;
          $(this).attr('id',id)
      });

  })

  On 21 Feb., 15:15, paul.mac paul.mcma...@uuconstruct.co.uk wrote:

   Hi,

   I have a group of animations, which once they are finished I would
   like to change all the image ids and then the src attribute. My code
   is as follows:

      $(#right).click(function(){
         $(#i0).fadeIn(1500);
         $(#i1).animate({width: '98px', left: +=86px}, 1500);
         ...
         $(#i6).animate({width: 75px, left: +=110px}, 1500);
         $(#i7).fadeOut(1500);
       })

   I don't know how to string a function to this above one so that it
   executes after all the animations have finished. Basically I want to
   take the existing ids ( i1, i2 ... and change and change them to i0,
   i1 etc.

   Thanks in advance

   paul


[jQuery] Re: Stringing functions within a click event

2009-02-21 Thread Thomas Jaggi

But It would probably be better changing the class instead of the id.



On 21 Feb., 15:42, paul.mac paul.mcma...@uuconstruct.co.uk wrote:
 Thanks - would it not be easier to set up a loop that is executed
 after all the animations have been finished? As I have 8 numbered form
 0 to 8, will there not be a conflict when you end up with 2 objects
 with id1?

 Thanks

 paul

 On Feb 21, 2:29 pm, Thomas Jaggi thomas.ja...@gmail.com wrote:

  You could use the callback function (http://docs.jquery.com/Effects/
  animate#paramsdurationeasingcallback).

  $(#right).click(function(){
      $(#i1).animate({width: '98px', left: +=86px}, 1500, function
  (){
          var id = $(this).attr('id').split('i')[1];
          id = id -1;
          $(this).attr('id',id)
      });

  })

  On 21 Feb., 15:15, paul.mac paul.mcma...@uuconstruct.co.uk wrote:

   Hi,

   I have a group of animations, which once they are finished I would
   like to change all the image ids and then the src attribute. My code
   is as follows:

      $(#right).click(function(){
         $(#i0).fadeIn(1500);
         $(#i1).animate({width: '98px', left: +=86px}, 1500);
         ...
         $(#i6).animate({width: 75px, left: +=110px}, 1500);
         $(#i7).fadeOut(1500);
       })

   I don't know how to string a function to this above one so that it
   executes after all the animations have finished. Basically I want to
   take the existing ids ( i1, i2 ... and change and change them to i0,
   i1 etc.

   Thanks in advance

   paul


[jQuery] Success Callback Method is not firing.

2009-02-21 Thread Prasenjit

Hi,

I am using jQuery Form Plugin's ajaxForm method to upload a file to a
third party server. Uploading is working fine, using this approach as
I am able to see the file uploaded in the third party server. But I
need to get hold of the response coming back from the server as I need
to save some response data at my side. So I am using a success
callback method. But problem is everytime it is calling my error
callback method instead of the success callback method. Can anybody
help me what am I doing wrong?

Here is how I call the ajaxForm method:

script type=text/javascript
$(function() {

var options = {
url: 'http://api.kickapps.com/rest/upload/photo/
27970',
type: 'post',
iframe: true,
dataType: 'json',
success: function (data, status)
{
alert(status);
if(typeof(data.error) != 'undefined')
{
if(data.error != '')
{
alert(data.error);
}else
{
alert(data.msg);
}
}
}, // post-submit success callback

error: function (data, status, e)
{
alert(status);
//alert(e);
} // post-submit error callback
};

//ajax form submit
$('#form2').ajaxForm(options);

});

Thanks
Prasenjit


[jQuery] Re: Something broke in IE7

2009-02-21 Thread Paul Mills

Hi Oliver,
Your switch statement looks a bit strange to me - I've never coded one
that way before.
Try redoing it as a couple of if {} else {} statements.

IE is must fussier about syntax than FF so I always check for syntax
errors when IE starts misbehaving.

Hope that helps.
Paul

On Feb 21, 1:04 pm, oliver.pra...@googlemail.com
oliver.pra...@googlemail.com wrote:
 Thanks Carol,

 that at least gives me a good feeling, I'm not the only one :-)

 If I find any solution with my as good as none experience in jQuery,
 or just through pure luck I will off course not hesitate to post it.

 Oliver Prater

 On Feb 21, 12:16 am, carol carolgjenk...@hotmail.com wrote:

  Oliver,

  I am having the very same problem...the content in my greybox does not
  show in IE7.  It's driving me nuts!  Have you found a solution?

  Thanks!
  Carol

  On Feb 20, 3:03 pm, oliver.pra...@googlemail.com

  oliver.pra...@googlemail.com wrote:
   Hi guys after I finally got my code working in FF, IE7 is killing me!

   I never programed in javascript bevor so take it easy on me please.

   Using the DEBUGGER has helped me a lot, but now there are no more
   debug messages and I don't know what the hell I can do to get it work!

   I am guessing that my code is broken since the plugins are working
   great!

   The code I wrote in jQuery:http://code-bin.homedns.org/242

   Now to the problem:
   Please note that the behavior I want is already working fine in FF so
   just open it with FF to see what I created it to do.

   The main problem is the pulled up content ... and the format of the
   data after you push the community button.

   Without 
   hiding:http://www.vonderdecken.net/index.php?option=com_contentview=categor...
   (it works perfectly in both IE7 and FF)

   Now starts the strange part in IE7: (This all works in FF like I
   expected it too)
   1.) The pull up works with silverlight player, but if you push
   community you get a mess.
   Link:http://www.vonderdecken.net/

   2.) The pull up doesnt work and its hard to get a hands on of the
   YouTube player, which only loads in the maincontent (shows after you
   press community), well since the pulling up didn't work strangly the
   main content is perfect. (pretty much vice versa the other player)
   Link:http://www.vonderdecken.net/index.php?option=com_contentview=article...

   3.) The gallery pulls up the back, but not the slide show. The show
   seems intact if you hit community but vanishes 1 sec later ...
   Link:http://www.vonderdecken.net/index.php?option=com_morfeoshowtask=view...

   I'm open to really any hints you give to solve this!
   I don't know what roll the jQuery functions and css plays...

   Oliver Prater


[jQuery] problem finding all atributes, attributes length, retrieve all attributes

2009-02-21 Thread RotinPain

After searching the web with no answer, I really need some help about
attributes in jquery

Here's the plan:
I want to retrieve ALL the attributes from a tag for applying them to
another tag.

Problem#1: i don't know how many attributes the tag will possess.
Problem#2: i don't know what attributes will be used.

For example i will have a sample tag like that (attributes can vary) :
table border=1 width=760 cellspacing=2 cellpadding=3 id=t

I want to take all the attributes and apply them to another empty
table tag.

Using DOM manipulation without jquery, it works fine :
[code]
html
  head
script type=text/javascript language=javascript
window.onload = function () {
var contbl = document.getElementsByTagName('table')[0];
table = document.createElement(table);
for (i=0;icontbl.attributes.length;i++){
if (contbl.attributes[i].specified)
table.setAttribute(contbl.attributes[i].nodeName,
contbl.attributes[i].nodeValue);
}
rowA = table.insertRow(0); cell = rowA.insertCell(0);
cell.innerText = New table;
document.body.appendChild(table);
}
/script
  /head
  body
  table border=1 width=760 cellspacing=2 cellpadding=3
  tbody
  tr
  tdFirst table/td
  /tr
  /tbody
  /table
  /body
/html
[/code]

But when I try to reproduce such manipulation using jquery i can't
find no solution!

I hope that one of you could give me a tip about converting this to
jquery, or maybe it's not possible ? Thanx for your help


[jQuery] Re: Ajax tabs in non JavaScript browsers

2009-02-21 Thread Jsbeginner


You can use PHP or most other languages to manage your tabs.

For example you could do something like this :

tab links :

http://yoursite.com?t=1 For tab 1
http://yoursite.com?t=2 For tab 2
http://yoursite.com?t=3 For tab 3


and an simple PHP code :

?php
if($_GET['t'] == 3){ ?
h2This is tab3 contents/h2
pTab 3 contents/p
?php
} else if ($_GET['t'] == 2) { ?
h2This is tab 2 contents/h2
pTab 2 contents/p
?php } else { ?
h2This is tab 1 contents/h2
pTab 1 contents/p
?php } ?

Of course with jquery you simply desactivate the links... (return 
FALSE;) so your page either uses PHP if javascript is not activated or 
your javascript if it is activated.


Playtime a écrit :

Dear all,

I'm new to jquery and am just started to use the Ajax tabs in a site I
am building. However I do notice that if I disable javascript the tabs
just open the pages normally, which is no good as then inserted pages
don't contain any navigation or other elements.

Is there a way to get the tabs to still work without javascript, I
have seen some sites that still manage to do this and am unsure of
how?


Thanks,

Phil

  





[jQuery] How check ready state for ajax request

2009-02-21 Thread sunix

I am building a ajax website i am showing a status of request as
request moves from readystate 1,2,3,4(complete), now uptil now i was
not using jquery for sending request , now i am planning move to
jquery but i seen jquery $.ajax function which provides declaration of
only one callback method which gets called on readystate 4 i.e.
complete ,is there any way to observe ready state 1,2,3,4 ??? please
help


[jQuery] Re: (a)slideshow in IE

2009-02-21 Thread and80

I think it's choking on the following statement, telling me Object
doesn't support this property or method :

slide=a.find('.slideshow-content  *:eq('+c+')');

Any ideas?


On Feb 20, 3:21 pm, Mike mal...@gmail.com wrote:
  I'm trying to implement the jQuery (a)Slideshow plugin 
  (http://slideshow.hohli.com/
  ) on a site; it works great in everything except IE; both IE7 and IE8
  beta 2 don't show the slideshow at all; I can't figure out why; the
  demos for the plugin work in IE; I downloaded the source; it works in
  IE. But even when I copy the code from the demo to my page, it doesn't
  work!  IE gives me the error : Object doesn't support this property
  or method. I know I have everything set up right, because it works in
  Firefox, Chrome,  Safari (haven't tried Opera yet). I've tried with
  both jQuery 1.2.6 and 1.3.1. Here's a link to the page; I'd appreciate
  any help on what to try!

 http://develop.treasuredtruth.ca

  TIA,
  Andrew

 In IE8 use the debug tools to find out exactly what object and
 property it is complaining about.


[jQuery] Re: (a)slideshow in IE

2009-02-21 Thread and80

I think this is the line IE is choking on; it says Object doesn't
support this property or method:

slide=a.find('.slideshow-content  *:eq('+c+')');

I can't seem to find this string in any of the javascript files; any
Ideas?

On Feb 20, 3:21 pm, Mike mal...@gmail.com wrote:
  I'm trying to implement the jQuery (a)Slideshow plugin 
  (http://slideshow.hohli.com/
  ) on a site; it works great in everything except IE; both IE7 and IE8
  beta 2 don't show the slideshow at all; I can't figure out why; the
  demos for the plugin work in IE; I downloaded the source; it works in
  IE. But even when I copy the code from the demo to my page, it doesn't
  work!  IE gives me the error : Object doesn't support this property
  or method. I know I have everything set up right, because it works in
  Firefox, Chrome,  Safari (haven't tried Opera yet). I've tried with
  both jQuery 1.2.6 and 1.3.1. Here's a link to the page; I'd appreciate
  any help on what to try!

 http://develop.treasuredtruth.ca

  TIA,
  Andrew

 In IE8 use the debug tools to find out exactly what object and
 property it is complaining about.


[jQuery] How can I specify what $(this) is within a function?

2009-02-21 Thread Nikola

Hello,

I've written a simple function for a hover event but I can't seem to
specify what $(this) is properly.  Here's a little example I put
together, any input would be great.

Thanks..

http://jsbin.com/ezeye/edit


[jQuery] Re: problem finding all atributes, attributes length, retrieve all attributes

2009-02-21 Thread mkmanning

Wow, I just uploaded a simple plugin that does this:
http://plugins.jquery.com/project/getAttributes and then saw your
post.


On Feb 21, 9:07 am, RotinPain rotinpain@gmail.com wrote:
 After searching the web with no answer, I really need some help about
 attributes in jquery

 Here's the plan:
 I want to retrieve ALL the attributes from a tag for applying them to
 another tag.

 Problem#1: i don't know how many attributes the tag will possess.
 Problem#2: i don't know what attributes will be used.

 For example i will have a sample tag like that (attributes can vary) :
 table border=1 width=760 cellspacing=2 cellpadding=3 id=t

 I want to take all the attributes and apply them to another empty
 table tag.

 Using DOM manipulation without jquery, it works fine :
 [code]
 html
   head
     script type=text/javascript language=javascript
     window.onload = function () {
         var contbl = document.getElementsByTagName('table')[0];
         table = document.createElement(table);
         for (i=0;icontbl.attributes.length;i++){
             if (contbl.attributes[i].specified)
                 table.setAttribute(contbl.attributes[i].nodeName,
 contbl.attributes[i].nodeValue);
         }
         rowA = table.insertRow(0); cell = rowA.insertCell(0);
 cell.innerText = New table;
         document.body.appendChild(table);
     }
     /script
   /head
   body
       table border=1 width=760 cellspacing=2 cellpadding=3
           tbody
               tr
                   tdFirst table/td
               /tr
           /tbody
       /table
   /body
 /html
 [/code]

 But when I try to reproduce such manipulation using jquery i can't
 find no solution!

 I hope that one of you could give me a tip about converting this to
 jquery, or maybe it's not possible ? Thanx for your help


[jQuery] whether the structure of the jQuery object like this

2009-02-21 Thread Alex

whether the structure of the jQuery object  like this :

$('p')

if the tag p only one,  the structure is :


 [  [attr = value   ]]


if the tag p has two , the structure is :


[ [ attr = value], [attr = value] ]



Thanks


Alex

[jQuery] Re: Something broke in IE7

2009-02-21 Thread oliver.pra...@googlemail.com

@Paul: I changed the switch to if{} statements, but got the same
result so changed it back. The bug is somewhere else ...

The code that does the exact same as my switch. (It works in FF just
like the switch but in IE still the same bugs come up)
code: ---
$j(#infotainmentbox div.video).empty();
if(!(MOVIE_PLAYER === null)) { //Start movie
$j(#infotainmentbox).empty().append(MOVIE_PLAYER);
$j(#infotainmentbox).before('div 
id=infotainmentboxMenubtn2a
href=# onClick=history.go(-1); onfocus=this.blur()img src=/
templates/melle4/images/goback.png title=Go Back height=29px
width=189px border=0 //a/div');
}
if(!(PHOTO_PLAYER === null)) { // Start gallerie
$j(#infotainmentbox).empty().append(PHOTO_PLAYER);
$j(#infotainmentbox).before(PHOTO_BACK);
$j(#backtogallery2).hide();
}
code: ---
The reason I code switches like that is that it puts all the logic in
one nice block, and sowhere I read that they run faster than if{}
elseif{} else{} and a lot faster than a couple of if{} statements.

Anyway thanks for the suggestion

Oliver Prater

On Feb 21, 5:23 pm, Paul Mills paul.f.mi...@gmail.com wrote:
 Hi Oliver,
 Your switch statement looks a bit strange to me - I've never coded one
 that way before.
 Try redoing it as a couple of if {} else {} statements.

 IE is must fussier about syntax than FF so I always check for syntax
 errors when IE starts misbehaving.

 Hope that helps.
 Paul

 On Feb 21, 1:04 pm, oliver.pra...@googlemail.com

 oliver.pra...@googlemail.com wrote:
  Thanks Carol,

  that at least gives me a good feeling, I'm not the only one :-)

  If I find any solution with my as good as none experience in jQuery,
  or just through pure luck I will off course not hesitate to post it.

  Oliver Prater

  On Feb 21, 12:16 am, carol carolgjenk...@hotmail.com wrote:

   Oliver,

   I am having the very same problem...the content in my greybox does not
   show in IE7.  It's driving me nuts!  Have you found a solution?

   Thanks!
   Carol

   On Feb 20, 3:03 pm, oliver.pra...@googlemail.com

   oliver.pra...@googlemail.com wrote:
Hi guys after I finally got my code working in FF, IE7 is killing me!

I never programed in javascript bevor so take it easy on me please.

Using the DEBUGGER has helped me a lot, but now there are no more
debug messages and I don't know what the hell I can do to get it work!

I am guessing that my code is broken since the plugins are working
great!

The code I wrote in jQuery:http://code-bin.homedns.org/242

Now to the problem:
Please note that the behavior I want is already working fine in FF so
just open it with FF to see what I created it to do.

The main problem is the pulled up content ... and the format of the
data after you push the community button.

Without 
hiding:http://www.vonderdecken.net/index.php?option=com_contentview=categor...
(it works perfectly in both IE7 and FF)

Now starts the strange part in IE7: (This all works in FF like I
expected it too)
1.) The pull up works with silverlight player, but if you push
community you get a mess.
Link:http://www.vonderdecken.net/

2.) The pull up doesnt work and its hard to get a hands on of the
YouTube player, which only loads in the maincontent (shows after you
press community), well since the pulling up didn't work strangly the
main content is perfect. (pretty much vice versa the other player)
Link:http://www.vonderdecken.net/index.php?option=com_contentview=article...

3.) The gallery pulls up the back, but not the slide show. The show
seems intact if you hit community but vanishes 1 sec later ...
Link:http://www.vonderdecken.net/index.php?option=com_morfeoshowtask=view...

I'm open to really any hints you give to solve this!
I don't know what roll the jQuery functions and css plays...

Oliver Prater


[jQuery] Re: How can I specify what $(this) is within a function?

2009-02-21 Thread Alex

$(this) is no problem.

hover_in() and hover_out() should place in each method.

if hover_in() and hover_out() placed outside each method,   $this in  
hover_in() and hover_out()  is  all li tag.



are u understand ?

you should write like this :

=

$.fn.simpleFunction = function(options) {

var options = jQuery.extend( {colorOne:'#660066',  
colorTwo:'#808080'},options);




this.each(function() {
  var $this = $(this);

  function hover_in()  
{$this.css({backgroundColor:options.colorOne});};
  function hover_out()  
{$this.css({backgroundColor:options.colorTwo});};


$(this).hover(function () {
hover_in();
},function(){
hover_out();
});
});

return this;
};
$(.hover_me).simpleFunction();


});


===










On 2009-2-22, at 上午3:06, Nikola wrote:



Hello,

I've written a simple function for a hover event but I can't seem to
specify what $(this) is properly.  Here's a little example I put
together, any input would be great.

Thanks..

http://jsbin.com/ezeye/edit




[jQuery] Re: How can I specify what $(this) is within a function?

2009-02-21 Thread 浩翔
sorry for my poor english,  i hope you can understand my mean.

On Feb 22, 5:12 am, Alex blackange...@gmail.com wrote:
 $(this) is no problem.

 hover_in() and hover_out() should place in each method.

 if hover_in() and hover_out() placed outside each method,   $this in  
 hover_in() and hover_out()  is  all li tag.

 are u understand ?

 you should write like this :

 =

 $.fn.simpleFunction = function(options) {

          var options = jQuery.extend( {colorOne:'#660066',  
 colorTwo:'#808080'},options);

          this.each(function() {
            var $this = $(this);

            function hover_in()  
 {    $this.css({backgroundColor:options.colorOne});    };
            function hover_out()  
 {    $this.css({backgroundColor:options.colorTwo});    };

              $(this).hover(function () {
                  hover_in();
                  },function(){
                  hover_out();
              });
          });

          return this;};

      $(.hover_me).simpleFunction();

 });

 ===

 On 2009-2-22, at 上午3:06, Nikola wrote:



  Hello,

  I've written a simple function for a hover event but I can't seem to
  specify what $(this) is properly.  Here's a little example I put
  together, any input would be great.

  Thanks..

 http://jsbin.com/ezeye/edit

[jQuery] Re: How can I specify what $(this) is within a function?

2009-02-21 Thread Nikola

Oh

Thank you!  I've tried so many different things, like defining _this
after the event but I never thought of writing it this way.  Thanks
much, this explains it.

On Feb 21, 4:18 pm, 浩翔 blackange...@gmail.com wrote:
 sorry for my poor english,  i hope you can understand my mean.

 On Feb 22, 5:12 am, Alex blackange...@gmail.com wrote:

  $(this) is no problem.

  hover_in() and hover_out() should place in each method.

  if hover_in() and hover_out() placed outside each method,   $this in  
  hover_in() and hover_out()  is  all li tag.

  are u understand ?

  you should write like this :

  =

  $.fn.simpleFunction = function(options) {

           var options = jQuery.extend( {colorOne:'#660066',  
  colorTwo:'#808080'},options);

           this.each(function() {
             var $this = $(this);

             function hover_in()  
  {    $this.css({backgroundColor:options.colorOne});    };
             function hover_out()  
  {    $this.css({backgroundColor:options.colorTwo});    };

               $(this).hover(function () {
                   hover_in();
                   },function(){
                   hover_out();
               });
           });

           return this;};

       $(.hover_me).simpleFunction();

  });

  ===

  On 2009-2-22, at 上午3:06, Nikola wrote:

   Hello,

   I've written a simple function for a hover event but I can't seem to
   specify what $(this) is properly.  Here's a little example I put
   together, any input would be great.

   Thanks..

  http://jsbin.com/ezeye/edit


[jQuery] Re: How can I specify what $(this) is within a function?

2009-02-21 Thread 浩翔


no problem !
you could be more careful next time.  :)

On Feb 22, 5:20 am, Nikola nik.cod...@gmail.com wrote:
 Oh

 Thank you!  I've tried so many different things, like defining _this
 after the event but I never thought of writing it this way.  Thanks
 much, this explains it.

 On Feb 21, 4:18 pm, 浩翔 blackange...@gmail.com wrote:

  sorry for my poor english,  i hope you can understand my mean.

  On Feb 22, 5:12 am, Alex blackange...@gmail.com wrote:

   $(this) is no problem.

   hover_in() and hover_out() should place in each method.

   if hover_in() and hover_out() placed outside each method,   $this in  
   hover_in() and hover_out()  is  all li tag.

   are u understand ?

   you should write like this :

   =

   $.fn.simpleFunction = function(options) {

            var options = jQuery.extend( {colorOne:'#660066',  
   colorTwo:'#808080'},options);

            this.each(function() {
              var $this = $(this);

              function hover_in()  
   {    $this.css({backgroundColor:options.colorOne});    };
              function hover_out()  
   {    $this.css({backgroundColor:options.colorTwo});    };

                $(this).hover(function () {
                    hover_in();
                    },function(){
                    hover_out();
                });
            });

            return this;};

        $(.hover_me).simpleFunction();

   });

   ===

   On 2009-2-22, at 上午3:06, Nikola wrote:

Hello,

I've written a simple function for a hover event but I can't seem to
specify what $(this) is properly.  Here's a little example I put
together, any input would be great.

Thanks..

   http://jsbin.com/ezeye/edit


[jQuery] Re: How can I specify what $(this) is within a function?

2009-02-21 Thread Nikola

Thanks again, I understand what's happening now and I've been able to
correct my code.  The plugin I'm working on is functioning perfectly -
I no longer need to filter out results or toggle classes.

On Feb 21, 4:20 pm, Nikola nik.cod...@gmail.com wrote:
 Oh

 Thank you!  I've tried so many different things, like defining _this
 after the event but I never thought of writing it this way.  Thanks
 much, this explains it.

 On Feb 21, 4:18 pm, 浩翔 blackange...@gmail.com wrote:

  sorry for my poor english,  i hope you can understand my mean.

  On Feb 22, 5:12 am, Alex blackange...@gmail.com wrote:

   $(this) is no problem.

   hover_in() and hover_out() should place in each method.

   if hover_in() and hover_out() placed outside each method,   $this in  
   hover_in() and hover_out()  is  all li tag.

   are u understand ?

   you should write like this :

   =

   $.fn.simpleFunction = function(options) {

            var options = jQuery.extend( {colorOne:'#660066',  
   colorTwo:'#808080'},options);

            this.each(function() {
              var $this = $(this);

              function hover_in()  
   {    $this.css({backgroundColor:options.colorOne});    };
              function hover_out()  
   {    $this.css({backgroundColor:options.colorTwo});    };

                $(this).hover(function () {
                    hover_in();
                    },function(){
                    hover_out();
                });
            });

            return this;};

        $(.hover_me).simpleFunction();

   });

   ===

   On 2009-2-22, at 上午3:06, Nikola wrote:

Hello,

I've written a simple function for a hover event but I can't seem to
specify what $(this) is properly.  Here's a little example I put
together, any input would be great.

Thanks..

   http://jsbin.com/ezeye/edit


[jQuery] Working examle of UI/Uploader

2009-02-21 Thread Joac

Pleas AnyBody send me Working examle of UI/Uploader on php.

 UI/Uploader hsn't any docs


[jQuery] How can i bind different functions for each remote tab?

2009-02-21 Thread Paidz

Hello,

I'm using the following versions of jquery:
- jquery-1.3.1.min.js
- jquery-ui-personalized-1.6rc6.min.js

Can somebody help me with this?
I can't figure out how to bind different functions for multiple remote
tabs.

Iam adding remote tabs by clicking a link on my page like in this
example.

*
1. Adding Remote Tab User
*
$(a.administration_user).click(function () {

$(#content).tabs(add, 'portal/user/user.php', 'User').bind
('tabsload', function(e, ui) {

.. here i add my functions , like add / delete / edit user.. etc.

})

*
2. Adding Remote Tab Store
*
$(a.administration_store).click(function () {

$(#content).tabs(add, 'portal/store/store.php', 'Store').bind
('tabsload', function(e, ui) {

.. here i add my functions , like add / delete / edit store.. etc.

})
*

Now my problem is for example if i click on the user remote tab, the
content from all remote tabs is loaded again. But i want only to load
the user remote content. Is there a method of binding functions to the
just added remote tab?

Thank you for help,
michael


[jQuery] Re: problem finding all atributes, attributes length, retrieve all attributes

2009-02-21 Thread RotinPain

Yeeaha! you're great !

Thanx for posting this ( at the right moment :D ) it's really what i
needed and after some testing, my attributes problem is totally
solved !! thank you very much for this essential plugin.
I won't forget to use it anytime i'll work with attributes!!!

On 21 fév, 20:15, mkmanning michaell...@gmail.com wrote:
 Wow, I just uploaded a simple plugin that does 
 this:http://plugins.jquery.com/project/getAttributesand then saw your
 post.

 On Feb 21, 9:07 am, RotinPain rotinpain@gmail.com wrote:



  After searching the web with no answer, I really need some help about
  attributes in jquery

  Here's the plan:
  I want to retrieve ALL the attributes from a tag for applying them to
  another tag.

  Problem#1: i don't know how many attributes the tag will possess.
  Problem#2: i don't know what attributes will be used.

  For example i will have a sample tag like that (attributes can vary) :
  table border=1 width=760 cellspacing=2 cellpadding=3 id=t

  I want to take all the attributes and apply them to another empty
  table tag.

  Using DOM manipulation without jquery, it works fine :
  [code]
  html
    head
      script type=text/javascript language=javascript
      window.onload = function () {
          var contbl = document.getElementsByTagName('table')[0];
          table = document.createElement(table);
          for (i=0;icontbl.attributes.length;i++){
              if (contbl.attributes[i].specified)
                  table.setAttribute(contbl.attributes[i].nodeName,
  contbl.attributes[i].nodeValue);
          }
          rowA = table.insertRow(0); cell = rowA.insertCell(0);
  cell.innerText = New table;
          document.body.appendChild(table);
      }
      /script
    /head
    body
        table border=1 width=760 cellspacing=2 cellpadding=3
            tbody
                tr
                    tdFirst table/td
                /tr
            /tbody
        /table
    /body
  /html
  [/code]

  But when I try to reproduce such manipulation using jquery i can't
  find no solution!

  I hope that one of you could give me a tip about converting this to
  jquery, or maybe it's not possible ? Thanx for your help- Masquer le texte 
  des messages précédents -

 - Afficher le texte des messages précédents -


[jQuery] Re: Working examle of UI/Uploader

2009-02-21 Thread Shedokan

I think it does:
http://docs.jquery.com/UI/Uploader

On 21 פברואר, 22:01, Joac ja.sor...@gmail.com wrote:
 Pleas AnyBody send me Working examle of UI/Uploader on php.

  UI/Uploader hsn't any docs


[jQuery] Re: jQuery 1.3.2 Released

2009-02-21 Thread Mario Moura
var Jquery = 1.3.2

$(this).amazing({

// thanks John Resig

});

Cheers

Mario
macm



2009/2/20 James james.gp@gmail.com


 Thanks! So far it seems to be working without issues on my projects,
 including those with UI 1.6rc6. :)

 On Feb 20, 4:01 pm, John Resig jere...@gmail.com wrote:
   Awesome, thanks John. So UI 1.7 should be around the corner as well?
 
  Let's hope so! You'll have to ask the UI team :-) I think they're
  getting real close, though.
 
  --John



[jQuery] Re: Working examle of UI/Uploader

2009-02-21 Thread Richard D. Worth
On Sat, Feb 21, 2009 at 5:28 PM, Shedokan shedo...@yahoo.com wrote:


 I think it does:
 http://docs.jquery.com/UI/Uploader


That's a really old page and will be removed as Uploader is not a jQuery UI
plugin. See

http://jquery.webunity.nl/jQuery.uploader/landing

- Richard




 On 21 פברואר, 22:01, Joac ja.sor...@gmail.com wrote:
  Pleas AnyBody send me Working examle of UI/Uploader on php.
 
   UI/Uploader hsn't any docs



[jQuery] jQuery and Dreamweaver CS4

2009-02-21 Thread Evelyn Lee Barney



Hi - I'm new to the group.  This is my first post.  I'm a tech writer 
who's just starting to move into web development.

I use Dreamweaver - but some complain that Spry Widgets are lame - and 
aren't as accessible to keyboard navigation as they should be.  I had 
hoped that by leaning jQuery I could come up with some options. Any 
advice on where to begin?

Thanks,

Ev


[jQuery] jQuery 1.3.2 + Dialog + Tabs = Bug

2009-02-21 Thread mgl

Hi all,

I've found a bug in jQuery 1.3.2 (or maybe Dialog/Tabs in UI 1.6rc6).

In my application, I have a dialog with tabs inside of it.  I create
the dialog and build/setup the elements inside it before it is
displayed to the user.  Up to jQuery 1.3.1 I haven't had a problem
with this.  Depending on what sequence of actions activates the
dialog, a different tab will be selected by default, using the .tabs
('select',[tabid]) method.  In some cases, this may happen before the
dialog is displayed - this is where I've found a bug with jQuery
1.3.2.  Basically, I get two tabs displayed.  Here's an example:
http://jsbin.com/umihi/edit

If there are only two tabs, there's no way to fix it (in the example
linked above, you can click on the 3rd, and it's okay after that).

Is there any chance this has something to do with the latest changes
to the Sizzle library?


[jQuery] Re: jquery.corners.js peformance issue

2009-02-21 Thread Davis

appericate for anyone comments/many thanks.


[jQuery] Re: hoverIntent and Accordion

2009-02-21 Thread zac

Hmmm... I guess I did something wrong.. looks good in Firefox but
doesnt work at all in IE and I got this warning with firebug:

reference to undefined property opt.queue
parent = elem.parentNode;

Can anyone spot what is wrong with this script??

$(document).ready(function(){
$(dd).hide();
var overFn = function(){
 $(dd:visible).slideUp(slow);
 $(this).parent().next().slideDown(slow);
 return false;
};
var outFn = function(){};

$(dt a).hoverIntent({
over: overFn,
sensitivity: 3,
interval: 150,
out: outFn,
});
});


On Feb 20, 9:44 pm, zac zacharyf...@gmail.com wrote:
 Yes that is just what I needed.  Thank you very much! This is actually
 starting to make sense to me  :^ )

 On Feb 20, 6:14 pm, Brian Cherne br...@cherne.net wrote:

  The hoverIntent plugin assumes you're sending it either:

  a) both over and out functions, or
  b) a single configuration object.

  When you send it only one function it assumes that that's the configuration
  object. As you are only interested in using an over function, I'd recommend
  sending an anonymous function for the out function. You could name your
  functions and use them directly in the method, or as part of the
  configuration object:

  var overFn = function(){
       $(dd:visible).slideUp(slow);
       $(this).parent().next().slideDown(slow);
       return false;

  };

  var outFn = function(){};

  $(dt a).hoverIntent( overFn, outFn );

  // OR //

  $(dt a).hoverIntent({
      over: overFn,
      out: outFn

  });

  Let me know if this helps,
  Brian.

  On Fri, Feb 20, 2009 at 3:57 PM, zac zacharyf...@gmail.com wrote:

   I am trying to add the hoverIntent plugin to this basic accordion menu
   such as this:

   $(dd).hide();
                  $(dt a).hover(function(){
                          $(dd:visible).slideUp(slow);
                          $(this).parent().next().slideDown(slow);
                          return false;
                  });

   I am confused about how to call those functions for over and out:

          $(dt a).hoverIntent({
                                  sensitivity: 3,
                                  interval: 200,
                                  over: ?,
                                  timeout: 500,
                                  out: ?,

                          });

   The plugin says it is interchangeable with hover but when I try this:

   $(dd).hide();
                  $(dt a).hoverIntent(function(){
                          $(dd:visible).slideUp(slow);
                          $(this).parent().next().slideDown(slow);
                          return false;
                  });

   I get errors because I did not define the over and out.  How do I
   define these?

   Thanks for any help with this.


[jQuery] Re: Form Plugin with file upload

2009-02-21 Thread Susie Sahim
Thank you Mike for taking the time to trouble shoot this with me. I really
appreciate it.


Susie BogusRed Sahim
http://www.PaperDemon.com



On Thu, Feb 19, 2009 at 3:58 AM, Mike Alsup mal...@gmail.com wrote:


  Hooray! I'm so happy its fixed!!!

 Excellent, Susie.  So glad to hear it!



[jQuery] include multiple css, js ,html on demand with jQuery

2009-02-21 Thread a.karimzadeh

by using the includeMany 1.0.0 plugin you can add multiple files with
different callbacks for each one and also a global callback after all
are loaded
check it here:
http://www.arashkarimzadeh.com/index.php/jquery/17-includemany-jquery-include-many.html

Arash Karimzadeh
http://www.arashkarimzadeh.com


[jQuery] Re: whether the structure of the jQuery object like this

2009-02-21 Thread 浩翔


Anybody ?

On Feb 22, 4:04 am, Alex blackange...@gmail.com wrote:
 whether the structure of the jQuery object  like this :

 $('p')

 if the tag p only one,  the structure is :

   [      [    attr = value   ]    ]

 if the tag p has two , the structure is :

 [ [ attr = value], [attr = value] ]

 Thanks

 Alex