[jQuery] Input Element Focus Dancing

2009-01-14 Thread stephen

Hi,

I have a text input that when it receives the text RESET and a tab,
the form should reset and the focus should go to the first text input
element. But something weird happens, instead the focus goes to the
first element (I have seen this by placing an alert in the right
place) and then ends up on the second text input. I have no idea why,
as the last 'command' is to focus on the first input element. Any
ideas. A bit of code:

$(input#serial_number).focus(function () {
  var serial_number = ;

  // Captures the tab event
  $(input#serial_number).keypress(function(event){

  // Captures the tab event and so counts as a save
  if(event.which == 0){
  // Get the current value
  serial_number = $(input#serial_number).val();

  // Check to see if the user wants to reset the form
  if(serial_number == RESET){
// Reset the form.
$(form# + form_id)[0].reset();

$(input[tabindex=1]).focus();
  }
  } // end if
  });
});

I have also tried doing this using the blur event, but that did not
work either. Also, a reset button is not desirable.

Thanks
Stephen


[jQuery] Re: Issue with loading content once using AJAX and display it as a SimpleModal (plugin)

2009-01-14 Thread Beres Botond

I think the most likely issue is that you are doing an ajax request
(load), but manipulate the same div without waiting for the request to
complete.
So the modal is created before .load is finished.
Try moving $(#content).modal(); to a callback of .load. This is a
golden rule of ajax request, if you want to do something with returned
data/html, then need to add your logic to a callback.

$(#content).load(settings.htm, {}, function() {
  $(#content).modal();
});


On Jan 13, 9:10 pm, mh.karls...@gmail.com mh.karls...@gmail.com
wrote:
 I'm using AJAX to load content into a DIV and display it as a simple
 modal (using the SimpleModal plugin). In order to limit the requests
 to the server I would like to only load the content once, but that's
 when I run into trouble. Let me show you the code and then I will
 explain what happens.

 HTML:
 div id=sidebar
    a id=settings href=# class=settingsSettings/a
    a id=options href=# class=testTest/a
 /div
 div id=contentDefault Text/div

 JAVASCRIPT:
 var isLoaded = false;

 $(document).ready(function () {
         // click event handler for 'settings'
         $('#sidebar a.settings').click(function (e) {
                 if (!isLoaded) {
                         $(#content).load(settings.htm);
                         isLoaded = true;
                 }
                 $(#content).modal();
         }
         // click event handler for 'test'
         $('#sidebar a.test').click(function (e) {
                 $(#content).modal();
         }

 }

 function hideModal(){
         $.modal.close();

 }

 The first time I click on the link 'Settings' the content from
 'settings.htm' is correctly displayed as a simple modal. But each time
 I click on the link after that it will display the DIV's initial text
 (Default Text). However, if I remove the following line;

 $(#content).modal();

 from the event handler for the link 'settings' and then use the 'test'
 link instead it displays correctly each time. I can't find the reason
 why this wouldn't work in the event handler for 'settings'? By viewing
 the rendered HTML I can confirm that content of the 'settings.htm' is
 correctly injected to the content div after the initial click. But I
 can't figure out what happens after that and how the default text make
 it back in there. I'm pretty new to jQuery so if anyone can shed some
 light on this issue I would really appreciate it.

 Thanks, Martin


[jQuery] Re: createElement, get its value

2009-01-14 Thread CrustyDOD

Thank for the link!

On Jan 14, 2:41 am, Kean shenan...@gmail.com wrote:
 Hmmm, you must understand event listener(bind) does not work like CSS
 where DOM nodes added in the future cannot be listened right now.
 That's where event delegation comes it.

 http://www.learningjquery.com/2008/03/working-with-events-part-1

 On Jan 13, 4:58 pm, sam sam.from.hackern...@gmail.com wrote:

  $('#grabMe') will search the document for an element with ID grabMe

  Have you added grabMe to the document?

  On Jan 13, 6:00 pm, CrustyDOD anze.stok...@gmail.com wrote:

   Hey!

   I've created one div with FlyDOM plugin which uses createElement
   function to add stuff to DOM. Now the problem is that once i add the
   element, i cannot access it in anyway.

   For example with FlyDOM plugin i create:
   div id=grabMeIt works!/div

   After the JS for creating element i have this:
   $('#grabMe').click(function() {
       alert($(this).html());

   });

   It doesn't work.

   There are no errors shown in Firebug, the element is in DOM, id is
   set. It's all there.

   Am i missing something here? I'm confused :S

   Using jquery 1.2.6


[jQuery] Re: @name deprecated?

2009-01-14 Thread Jörn Zaefferer

The release will feature a complete changelog with links to updated
and new documentation. I'll also release an update to the validation
plugin for compability with both 1.2.6 and 1.3, just after the
official announcment. jQuery UI 1.6 will be released in a few days,
too, with compability to 1.3. I hope that is good enough for now :-)

Jörn

On Wed, Jan 14, 2009 at 6:19 AM, MorningZ morni...@gmail.com wrote:

 I ask of absolutely nothing of John i simply stated that i was
 disappointed by the sparse change log, and that i was holding off on
 upgrading my important projects until i knew more in depth what to
 look for.

 and rest assured that i do not sit here and think i know everything
 about jQuery i just do the best i can to help (and learn from)
 others


 On Jan 14, 12:15 am, Rick Faircloth r...@whitestonemedia.com
 wrote:
 Well, I'm sure John will run all his documentation by you to make
 sure it's up to your standards.

 And while I may not be able to offer you any specific knowledge
 concerning jQuery, since you obviously know everything and never
 have any questions that you can't find answers to, I most certainly
 can comment on your approach to understanding new releases.

 You see to have to same lack of commitment to finding information
 for yourself that you accuse me of.

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
  Behalf Of MorningZ
  Sent: Wednesday, January 14, 2009 12:10 AM
  To: jQuery (English)
  Subject: [jQuery] Re: @name deprecated?

  Rick... you are the last person in the world who should give me, or
  anyone else for that matter, ANY jQuery-related advice

  And i personally was/am disappointed by the lack of documentation for
  my purposes  i wasn't saying everyone felt this way, just me
  and if that doesn't matter much... oh f__cking well...  i'll continue
  using 1.2.6, which i'm perfectly content with

  On Jan 14, 12:02 am, Rick Faircloth r...@whitestonemedia.com
  wrote:
   MorningZ...

   It would be appreciated if you would bother to read the change logs
   before asking questions or making any commentary.  Obviously, as John
   suggested, you haven't bothered to read what has been offered, so what
   you have likely done if a more comprehensive change log had been
   created...you would have had more opportunity to understand the situation
   that you could ignore.

   And concerning new releases, it's not John's responsibility to make sure
   you understand all the code that might be affected.  Any professional
   developer would set up a test bed to run the new releases through and
   check for problems in advance.

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
On Behalf Of MorningZ
Sent: Tuesday, January 13, 2009 11:44 PM
To: jQuery (English)
Subject: [jQuery] Re: @name deprecated?

So 5 things changed in this release?

I was hoping for a more comprehensive change log.  i've wanted to
see sizzle in action on a very busy site i have jQuery running on,
but the bottom line is i was/still-am scared to death to make the
change from 1.2.6 to 1.3 because i have no idea what has changed to
look out for (for instance, Jorn's validation plugin no longer working
as someone posted).

It's all good though, i'm just one person..  if you've got plenty
of feedback from posting about 5 changes, then more power to ya

On Jan 13, 11:34 pm, John Resig jere...@gmail.com wrote:
  Why disappointingly?

  Because 1.2 to 1.3 is a big major release... and there's a few 
  post to
  test test test, but there's no indication of what to test for..
  what's changed  what could break

 Huh? Did you miss the beta 1 post where we outlined everything that
 could've 
 broken?http://blog.jquery.com/2008/12/22/help-test-jquery-13-beta-1/

 I think we outlined it there fairly well - and we've gotten some 
 great feedback.

 --John


[jQuery] Re: [validate plugin] Conflict in using validation plugin with custom submit code

2009-01-14 Thread Jörn Zaefferer

Could you post a complete testpage? Looks like your extracts are
missing something...

Jörn

On Wed, Jan 14, 2009 at 12:00 AM, Fledder ferdy.christ...@gmail.com wrote:

 hi,

 Like others I seem to have ran into the double-click to submit
 problem. Allow me to explain:

 I have a registration form which validates just fine using the
 excellent validate plugin. It's working perfectly. However, I now want
 to run some custom code after the validation event. Specifically, I
 want to disable the submit button when validation is passed. After
 that, a normal post should follow to the server, no Ajax post.

 My first try was to do this:

 // disable the submit button upon submit event
 $(#frmEditUser).submit(
function()  {
   $(#submSave).attr(disabled,true).attr(value, Updating,
 please wait...);
}
 );

 // validation code follows here
 $(#frmEditUser).validate({
 ..

 This indeed changes the submit button and validation still works.
 However, it does not submit the form to the server, instead, nothing
 happens. My 2nd try was to use the validation plugin's submitHandler.
 Mind you this code is a bit long, but I think only the bottom part is
 relevant:

 $(#frmEditUser).validate({
onkeyup:false,
rules: {
username: {
required:true,
minlength:5,
maxlength:45,
validChars:true,

 usernameCheck:[$(#username).val(),oldusername]// remote check
 for duplicate username
}
},
messages: {
username: {
required: username is required.,
minlength: jQuery.format(username must be at 
 least {0} characters
 in length.),
maxlength: jQuery.format(username can not 
 exceed {0} characters
 in length.),
validChars: please supply valid characters 
 only.,
usernameCheck:this username is already in 
 use.
}
}
,
submitHandler: function(form) {
// do other stuff for a valid form
$(#submSave).attr(disabled,true).attr(value, 
 Updating,
 please wait...);
form.submit();
}

});

 This approach I have seen elsewhere in the forum, but it does not work
 for me. Validation runs fine, yet when the form is valid it once more
 does not actually post it to the server. It does post when I double-
 click (only when I uncomment the button-disabling code, otherwise I
 cannot double-click).

 So my question in general is: how can I have my own custom submit code
 that does not conflict with the validation plugin and that does an
 actual post? I thoroughly looked through the forum but I still do not
 see the solution.

 I will be very grateful for a solution, I've spent so many precious
 hours on accomplishing such a small thing (disabling a submit button).
 Thanks in advance!



[jQuery] Display Loading Image While Ajax Content Loads

2009-01-14 Thread jinscoe

Hello - I'm sorry if this posts twiceits been about 30 minutes or
so since I last attempted and I still haven't seen my discussion pop
up.

I would guess this is a fairly easy task and I'm just missing the
boat, because you see loading images everywhere with ajax loading.

Here is my situation. I have a webpage that is set up a lot like a
basic slide show - forward and back controls at the bottom a header at
the top and an ajax loading window in the middle. I am using this
function to make the ajax call:

$.get('/sourcefiles/example.html', function(innerHtml){
$('#ajax_content').html(innerHtml);
});

So right now I'm just getting the html and popping it into my
ajax_content div. I would like to make it so that it waits until the
entire content of the html (images and all) loads before displaying
anything. Currently it seems to wait for the just the html (text) to
load and then continues to load the images on screen.

I would like to just make a class called .loading or something, put
a loading background image on it and strip that off once everything is
loaded.

Hopefully I have been clear enough. Let me know if anything needs more
explaining and thanks in advance for any help!


[jQuery] Selector problem with $( a[ajax\\:id='46'] )

2009-01-14 Thread naden

I'm using jQuery 1.2.6 and having an a element with the attribute
ajax:id=46

a href=# ajax:id=46Test Link/a

According to http://docs.jquery.com/Selectors/attributeEquals#attributevalue
you have to escape : with double backslash like:

alert( $( a[ajax\\:id='46'] ).attr( 'href' ) );

I tried a lot, but it's not working?

Any hint would be appreciated!

thanks


[jQuery] Using position

2009-01-14 Thread Russ

I have this function (below) which im using to show a div (progress)
and center it over another div (diary) on my page as some ajax is
called.

It all works, except that it always pops an alert showing the
position jquery function. Anyone else had this problem using
position??


function ShowProgress() {
var diaryTop = $(#diary).position()[top];
var diaryLeft = $(#diary).position()[left];
var diaryWidth = $(#diary).width();
var diaryHeight = $(#diary).height();
var progressWidth = $(#progress).width();
var progressHeight = $(#progress).height();
var x = (Math.round(diaryWidth / 2) - Math.round(progressWidth /
2)) + diaryLeft;
var y = (Math.round(diaryHeight / 2) - Math.round(progressHeight /
2)) + diaryTop;
$(#progress).css({ position:absolute,left: x, top:y });
$(#progress).toggle();
}


[jQuery] Superfish - problem with supersubs plugin

2009-01-14 Thread simon

Hi all,

When I have a lot of nodes in the superfish menu it loads very slow
(even from the harddrive). Anyone having the same problem? To me it
seems that it is the first each() loop in the supersubs.js file which
executes slow.

Any tips on maybe another plugin I can use, since I dont want to lose
the functionality?

The code I'm using is from the following site:
http://users.tpg.com.au/j_birch/plugins/superfish/

Thanks,
Simon


[jQuery] select() not working

2009-01-14 Thread ocptime

Hello There,

I want to dynamically add a select option to an existing select
dropdown when a new country is added. This i was able to do using:

  $jQ(#country_id option[value='new']).before(option value=' +
value + '+ name + /option);

After that i want to get selected the just now appended country option
and must change from the --New Country-- . For that i used the select
() as below:

$jQ(#country_id option[value=' + value + ']).select();

This seems to be not working.

Even if i put a static value this is not changing:

 $jQ(#country_id option[value='144']).select();

Any pointers ?

Thanks in Advance,

Regards
ocptime


[jQuery] syntax selector problem

2009-01-14 Thread Matt caron

If I have:

$(div).click(function(){

 //How do I do the following
 $(this +   p).show();

});

I want to select the child p of the div I clicked, and I know there's
proper syntax to it, but I am completely brainfarting on it.

Thanks!
Matt


[jQuery] Display Loading Image While Ajax Content Loads

2009-01-14 Thread jinscoe

This seems like it should just be trivial to implement, because you
see it everywhere...but I'm just not having much luck.

I have a website that is setup, pretty much like a slideshow - I have
a forward and back button and the div in which they load is right
above. I am using this bit of code to load the external html file:

.get('sourcefiles/example.html', function(innerHtml){
$('#ajax_content').html(innerHtml);
});


I would like to show a loading image that waits for everything to load
completely.

It seems that it already waits for the HTML to get get loaded, but the
image files still continue to load on screen. I know I would pop a
hidden div in with the loading image and just toggle it on and off
before and after loading, but I just can't figure out how to make
jquery wait for the images to load before toggling the loading image
off.

Hopefully thats clear enough, thanks in advance for any help


[jQuery] jQuery selector question - Having : in attribute name

2009-01-14 Thread naden

I'm using jQuery 1.2.6 and having an a element with the attribute
ajax:id=46

a href=# ajax:id=46Test Link/a

According to http://docs.jquery.com/Selectors/attributeEquals#attributevalue
you have to escape : with double backslash like I did.

alert( $( a[ajax\\:id='46'] ).attr( 'href' ) );

I tried a lot, but it's not working?

Any hint would be appreciated!

thanks


[jQuery] Wiki Error trying to access Tabs, Datepicker on docs.jquery.com

2009-01-14 Thread michael.hasenst...@googlemail.com

Subject says it. When I try to access the online docs all I get is the
message below. Is there an alternative location, especially something
downloadable? I'd be grateful for such a link.

Michael


MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database
error has occurred
Query: BEGIN
Function: Database::begin
Error: 2006 MySQL server has gone away (localhost)
' in /home/jquery/en/docs/includes/Database.php:694


[jQuery] Cluetip ajax call returns gibberish (utf-8, greek)

2009-01-14 Thread ion

Hi,
I'm using cluetip in the following way:

$('#content div.product_photo a.load-local').cluetip({
 cursor:'pointer',
 cluetipClass:'rounded',
 dropShadow:false,
 width:'260px',
 hoverIntent: {
  sensitivity:  1,
  interval: 100,
  timeout:  200
  },
 fx: {
  open:   'fadeIn',
  openSpeed:  ''
}
});

I have several links that when are hovered cluetip is activated and
makes an ajax get call to
a php file. The call is like: file.php?var1=dfsvar2=sfdvar3=238479

The problem is that the result is gibberish!!
All files are utf-8 (saved like that and the meta content-type)
Database is in the utf-general format.
What is even weirdest is that the result in Safari works fine however
in firefox  explorer it does not.

Also, if you view the page source the characters look fine but when
the call is viewed through firebug
it is full of gibberish.

You can test it here: http://www.deliverde.gr/shop
Choose a product with greek name and hover over the image. The result
should be the above.
Please any help would be appreciated

ion


[jQuery] Re: select() not working

2009-01-14 Thread Beres Botond


It seems you don't know what .select() should be used for. It has
absolutely nothing to do with selecting and option of a select box.
Read the docs carefully.
http://docs.jquery.com/Events/select

Try this instead (assuming that #country_id is a select box):

$jQ(#country_id]).value(my_value)


ocptime wrote:
 Hello There,

 I want to dynamically add a select option to an existing select
 dropdown when a new country is added. This i was able to do using:

   $jQ(#country_id option[value='new']).before(option value=' +
 value + '+ name + /option);

 After that i want to get selected the just now appended country option
 and must change from the --New Country-- . For that i used the select
 () as below:

 $jQ(#country_id option[value=' + value + ']).select();

 This seems to be not working.

 Even if i put a static value this is not changing:

  $jQ(#country_id option[value='144']).select();

 Any pointers ?

 Thanks in Advance,

 Regards
 ocptime


[jQuery] Re: jQuery 1.3rc2 Ready

2009-01-14 Thread I-CRE8

Does this release address the cleartype issue in IE internally or do
we still need to work around this in our code ?

Thanks,

Dave Buchholz


[jQuery] Re: select() not working

2009-01-14 Thread jQuery Lover

*type: $jQ(#country_id).val(my_value);

-
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 4:24 PM, Beres Botond boton...@gmail.com wrote:


 It seems you don't know what .select() should be used for. It has
 absolutely nothing to do with selecting and option of a select box.
 Read the docs carefully.
 http://docs.jquery.com/Events/select

 Try this instead (assuming that #country_id is a select box):

 $jQ(#country_id]).value(my_value)


 ocptime wrote:
 Hello There,

 I want to dynamically add a select option to an existing select
 dropdown when a new country is added. This i was able to do using:

   $jQ(#country_id option[value='new']).before(option value=' +
 value + '+ name + /option);

 After that i want to get selected the just now appended country option
 and must change from the --New Country-- . For that i used the select
 () as below:

 $jQ(#country_id option[value=' + value + ']).select();

 This seems to be not working.

 Even if i put a static value this is not changing:

  $jQ(#country_id option[value='144']).select();

 Any pointers ?

 Thanks in Advance,

 Regards
 ocptime


[jQuery] Re: syntax selector problem

2009-01-14 Thread naden

If there is only one p do $(this).children('p').show();
if you just want to show the rirst do  $(this).children
('p:first').show();

On 14 Jan., 02:10, Matt caron matt.ca...@gmail.com wrote:
 If I have:

 $(div).click(function(){

  //How do I do the following
  $(this +   p).show();

 });

 I want to select the child p of the div I clicked, and I know there's
 proper syntax to it, but I am completely brainfarting on it.

 Thanks!
 Matt


[jQuery] Re: select() not working

2009-01-14 Thread Beres Botond

Ah yeah, sorry I didn't pay enough attention there :p

On Jan 14, 1:37 pm, jQuery Lover ilovejqu...@gmail.com wrote:
 *type: $jQ(#country_id).val(my_value);

 -
 Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



 On Wed, Jan 14, 2009 at 4:24 PM, Beres Botond boton...@gmail.com wrote:

  It seems you don't know what .select() should be used for. It has
  absolutely nothing to do with selecting and option of a select box.
  Read the docs carefully.
 http://docs.jquery.com/Events/select

  Try this instead (assuming that #country_id is a select box):

  $jQ(#country_id]).value(my_value)

  ocptime wrote:
  Hello There,

  I want to dynamically add a select option to an existing select
  dropdown when a new country is added. This i was able to do using:

    $jQ(#country_id option[value='new']).before(option value=' +
  value + '+ name + /option);

  After that i want to get selected the just now appended country option
  and must change from the --New Country-- . For that i used the select
  () as below:

  $jQ(#country_id option[value=' + value + ']).select();

  This seems to be not working.

  Even if i put a static value this is not changing:

   $jQ(#country_id option[value='144']).select();

  Any pointers ?

  Thanks in Advance,

  Regards
  ocptime


[jQuery] Re: syntax selector problem

2009-01-14 Thread jQuery Lover

Alternatively

$(div).click(function(){
  // all child p's
  $(p, this).show();

  // first child p
  $(p:first, this).show();

  // another way to select first child p
  $(p:eq(0), this).show();

 // etc. Other ways to select first child... :)
});

-
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 4:40 PM, naden n...@naden.de wrote:

 If there is only one p do $(this).children('p').show();
 if you just want to show the rirst do  $(this).children
 ('p:first').show();

 On 14 Jan., 02:10, Matt caron matt.ca...@gmail.com wrote:
 If I have:

 $(div).click(function(){

  //How do I do the following
  $(this +   p).show();

 });

 I want to select the child p of the div I clicked, and I know there's
 proper syntax to it, but I am completely brainfarting on it.

 Thanks!
 Matt


[jQuery] Re: select() not working

2009-01-14 Thread jQuery Lover

OFFTOP:

Ups, I meant *typo not *type (made a typo myself :) )

Sorry.

-
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 4:44 PM, Beres Botond boton...@gmail.com wrote:

 Ah yeah, sorry I didn't pay enough attention there :p


[jQuery] slideViewer (slides via image click)

2009-01-14 Thread GianCarlo Mingati

Hello List,
during the last year i received lots of emails (literally tens, sign
that the plugin is widely used) requiring to slide the gallery in
slideViewer by clicking (also) on the images and not only on the
generated UI.
This morning i implemented such functionality.
Since it is a minor change (in terms of chars of code :-)) i decided
to leave the version the same: 1.1

Enjoy
GC


[jQuery] Re: jQuery selector question - Having : in attribute name

2009-01-14 Thread jQuery Lover

You can not have special character in attribute names. (it's not valid markup)

Documentation is saying that your should escape VALUE bit if it
contains special characters.

-
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 2:11 PM, naden n...@naden.de wrote:

 I'm using jQuery 1.2.6 and having an a element with the attribute
 ajax:id=46

 a href=# ajax:id=46Test Link/a

 According to http://docs.jquery.com/Selectors/attributeEquals#attributevalue
 you have to escape : with double backslash like I did.

 alert( $( a[ajax\\:id='46'] ).attr( 'href' ) );

 I tried a lot, but it's not working?

 Any hint would be appreciated!

 thanks



[jQuery] slideViewer (advance via image click)

2009-01-14 Thread GianCarlo Mingati

Hello List,
during the last year i received lots of emails (literally tens, sign
that the plugin is widely used) requiring the possibility to slide the
galleries (generated via slideViewer), also by clickin' on the images
and not only on the generated UI.
This morning i implemented such functionality.
Since it is a minor change (in terms of chars of code :-)) i decided
to leave the version unchanged: 1.1

Enjoy
GC


[jQuery] Re: Wiki Error trying to access Tabs, Datepicker on docs.jquery.com

2009-01-14 Thread jQuery Lover

I'm not getting this error. I remember a post that says that the doc's
are hosted on different servers. So I guess I'm getting mine from not
crushed server.

I was quite interested of getting offline/downloadable version of jquery docs.

Michael, maybe you find jquery cheatsheets useful:
http://www.google.com/search?q=jquery+cheatsheet

-
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 2:50 PM, michael.hasenst...@googlemail.com
michael.hasenst...@googlemail.com wrote:

 Subject says it. When I try to access the online docs all I get is the
 message below. Is there an alternative location, especially something
 downloadable? I'd be grateful for such a link.

 Michael


 MediaWiki internal error.

 Original exception: exception 'DBQueryError' with message 'A database
 error has occurred
 Query: BEGIN
 Function: Database::begin
 Error: 2006 MySQL server has gone away (localhost)
 ' in /home/jquery/en/docs/includes/Database.php:694



[jQuery] Re: Event code in different .js files

2009-01-14 Thread Krommenaas

strange, but I should have checked. thanks!


[jQuery] Re: In this code, what would $(this) in the success part refer to?

2009-01-14 Thread donb

I don't know what can be more discouraging that the standard 'use
google' or 'that question has been asked/answered too many times'
discussion.  Folks, this is a discussion forum.  People range from
novice to expert.  The experts eventually get tired of answering a
novice question and get testy about it.  And it invariable degrades
into name-calling.  Besides, searching for 'this' will be a futile
exercise because the word is just too common..

Searching is only going to be successful when you can formulate a good
search query.  But as pointed out, there usually are a bunch of
'answers' that may be misleading, create further questions, are just
wrong, or they may appear to be nonapplicable for some reason.  Even
when the answer is found, it may not be recognized.  The documentation
is not perfect and I find the examples are often quite trivial and
sometimes ambiguous.  And often we have people whose primary language
is not English and they may struggle (or fail) to translate those
answers into their own language. (Yes, I know this is the jQuery-
English forum)

There's no need to lecture anyone on 'proper' use of the forum,
particularly when the lecture/lecturer also goes contrary to decent
and/or proper use of the forum.  As has been shown above, the effort
it takes to lecture typically far exceeds the effort it takes to
assist.

Still a good motto: 'if you can't say something nice then don't say
anything at all.'



[jQuery] Re: select() not working

2009-01-14 Thread ocptime

Hi all,

It works.

Thanks for the help.

ocptime

On Jan 14, 4:46 pm, jQuery Lover ilovejqu...@gmail.com wrote:
 OFFTOP:

 Ups, I meant *typo not *type (made a typo myself :) )

 Sorry.

 -
 Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com

 On Wed, Jan 14, 2009 at 4:44 PM, Beres Botond boton...@gmail.com wrote:

  Ah yeah, sorry I didn't pay enough attention there :p


[jQuery] Re: Cluetip ajax call returns gibberish (utf-8, greek)

2009-01-14 Thread jQuery Lover

Did you change anything, because it works and shows nicely on my browser.

PS. I would suggest not printing all products on the same page (you've
got at lease 100 items there).

-
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 1:31 PM, ion ikasso...@yahoo.co.uk wrote:

 Hi,
 I'm using cluetip in the following way:

 $('#content div.product_photo a.load-local').cluetip({
  cursor:'pointer',
  cluetipClass:'rounded',
  dropShadow:false,
  width:'260px',
  hoverIntent: {
   sensitivity:  1,
   interval: 100,
   timeout:  200
   },
  fx: {
  open:   'fadeIn',
   openSpeed:  ''
 }
 });

 I have several links that when are hovered cluetip is activated and
 makes an ajax get call to
 a php file. The call is like: file.php?var1=dfsvar2=sfdvar3=238479

 The problem is that the result is gibberish!!
 All files are utf-8 (saved like that and the meta content-type)
 Database is in the utf-general format.
 What is even weirdest is that the result in Safari works fine however
 in firefox  explorer it does not.

 Also, if you view the page source the characters look fine but when
 the call is viewed through firebug
 it is full of gibberish.

 You can test it here: http://www.deliverde.gr/shop
 Choose a product with greek name and hover over the image. The result
 should be the above.
 Please any help would be appreciated

 ion



[jQuery] Re: jQuery selector question - Having : in attribute name

2009-01-14 Thread naden

Your right. The docs said:

Note: if you wish to use any of the meta-characters described above
as a literal part of a name, you must escape the character with two
backslashes (\). For example:

#foo\\:bar
#foo\\[bar\\]
#foo\\.bar

and so I did. I used \\: to escape the :

or I'm gettin you wrong?

On 14 Jan., 12:54, jQuery Lover ilovejqu...@gmail.com wrote:
 You can not have special character in attribute names. (it's not valid markup)

 Documentation is saying that your should escape VALUE bit if it
 contains special characters.

 -
 Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com

 On Wed, Jan 14, 2009 at 2:11 PM, naden n...@naden.de wrote:

  I'm using jQuery 1.2.6 and having an a element with the attribute
  ajax:id=46

  a href=# ajax:id=46Test Link/a

  According tohttp://docs.jquery.com/Selectors/attributeEquals#attributevalue
  you have to escape : with double backslash like I did.

  alert( $( a[ajax\\:id='46'] ).attr( 'href' ) );

  I tried a lot, but it's not working?

  Any hint would be appreciated!

  thanks


[jQuery] Re: jQuery selector question - Having : in attribute name

2009-01-14 Thread jQuery Lover

Slightly :)

You can not have special character in your html ATTRIBUTES.

You should rename ajax:id to something else. Ex: ajax_id or ajaxId.

-
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 5:16 PM, naden n...@naden.de wrote:

 Your right. The docs said:

 Note: if you wish to use any of the meta-characters described above
 as a literal part of a name, you must escape the character with two
 backslashes (\). For example:

 #foo\\:bar
 #foo\\[bar\\]
 #foo\\.bar

 and so I did. I used \\: to escape the :

 or I'm gettin you wrong?


[jQuery] Re: Selector problem with $( a[ajax\\:id='46'] )

2009-01-14 Thread jQuery Lover

Duplicate.

See: 
http://groups.google.com/group/jquery-en/browse_thread/thread/e47ce13098a16ef/606e652153c624a2#606e652153c624a2

-
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 3:32 PM, naden n...@naden.de wrote:

 I'm using jQuery 1.2.6 and having an a element with the attribute
 ajax:id=46

 a href=# ajax:id=46Test Link/a

 According to http://docs.jquery.com/Selectors/attributeEquals#attributevalue
 you have to escape : with double backslash like:

 alert( $( a[ajax\\:id='46'] ).attr( 'href' ) );

 I tried a lot, but it's not working?

 Any hint would be appreciated!

 thanks



[jQuery] Re: Superfish - problem with supersubs plugin

2009-01-14 Thread jQuery Lover

I suggest you use Stu's CSS only dropdown menu:
http://www.cssplay.co.uk/menus/final_drop.html

-
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 3:11 PM, simon simon@gmail.com wrote:

 Hi all,

 When I have a lot of nodes in the superfish menu it loads very slow
 (even from the harddrive). Anyone having the same problem? To me it
 seems that it is the first each() loop in the supersubs.js file which
 executes slow.

 Any tips on maybe another plugin I can use, since I dont want to lose
 the functionality?

 The code I'm using is from the following site:
 http://users.tpg.com.au/j_birch/plugins/superfish/

 Thanks,
 Simon



[jQuery] Re: createElement, get its value

2009-01-14 Thread jQuery Lover

OFFTTOP:

The live() function will reduce so much questions on this mailing list :)


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 6:52 AM, Kean shenan...@gmail.com wrote:

 using jQuery 1.3

 This will most probably work.

 $('#grabMe').live('click', function() {
alert($(this).html());
 });

 On Jan 13, 5:41 pm, Kean shenan...@gmail.com wrote:
 Hmmm, you must understand event listener(bind) does not work like CSS
 where DOM nodes added in the future cannot be listened right now.
 That's where event delegation comes it.

 http://www.learningjquery.com/2008/03/working-with-events-part-1

 On Jan 13, 4:58 pm, sam sam.from.hackern...@gmail.com wrote:

  $('#grabMe') will search the document for an element with ID grabMe

  Have you added grabMe to the document?

  On Jan 13, 6:00 pm, CrustyDOD anze.stok...@gmail.com wrote:

   Hey!

   I've created one div with FlyDOM plugin which uses createElement
   function to add stuff to DOM. Now the problem is that once i add the
   element, i cannot access it in anyway.

   For example with FlyDOM plugin i create:
   div id=grabMeIt works!/div

   After the JS for creating element i have this:
   $('#grabMe').click(function() {
   alert($(this).html());

   });

   It doesn't work.

   There are no errors shown in Firebug, the element is in DOM, id is
   set. It's all there.

   Am i missing something here? I'm confused :S

   Using jquery 1.2.6


[jQuery] Re: jQuery selector question - Having : in attribute name

2009-01-14 Thread naden

That sucks. jQuery has no problem with $( 'a' ).attr( 'ajax:id' );
Therefore it would be nice to use it in the selector too.

thanks anyway have to change it.

On 14 Jan., 14:05, jQuery Lover ilovejqu...@gmail.com wrote:
 Slightly :)

 You can not have special character in your html ATTRIBUTES.

 You should rename ajax:id to something else. Ex: ajax_id or ajaxId.

 -
 Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com

 On Wed, Jan 14, 2009 at 5:16 PM, naden n...@naden.de wrote:

  Your right. The docs said:

  Note: if you wish to use any of the meta-characters described above
  as a literal part of a name, you must escape the character with two
  backslashes (\). For example:

  #foo\\:bar
  #foo\\[bar\\]
  #foo\\.bar

  and so I did. I used \\: to escape the :

  or I'm gettin you wrong?


[jQuery] Re: Cluetip and Firefox 3.0.5

2009-01-14 Thread Karl Swedberg


On Jan 14, 2009, at 2:01 AM, Charlie Griefer wrote:
I'm going to change my identity and move far, far, away after this,  
but i figured some people might be wondering what's up, and you all  
deserve an answer.


i was helping a friend troubleshoot some JS earlier, and disabled  
javascript in Firefox.


It's been nice knowing you.  Gotta go pack :)



Charlie,

Let me know where you're headed, because I'll have to move there, too.  
Seriously, that's the sort of thing I do all the time.


Thanks a lot for keeping us in the loop about what the problem was (as  
humbling as it might have been).


cheers,

--Karl


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



[jQuery] Re: Input Element Focus Dancing

2009-01-14 Thread jQuery Lover

You missed the [0]. The focus code must be:

$(input[tabindex=1])[0].focus();


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 1:10 PM, stephen barto...@gmail.com wrote:

 Hi,

 I have a text input that when it receives the text RESET and a tab,
 the form should reset and the focus should go to the first text input
 element. But something weird happens, instead the focus goes to the
 first element (I have seen this by placing an alert in the right
 place) and then ends up on the second text input. I have no idea why,
 as the last 'command' is to focus on the first input element. Any
 ideas. A bit of code:

 $(input#serial_number).focus(function () {
  var serial_number = ;

  // Captures the tab event
  $(input#serial_number).keypress(function(event){

  // Captures the tab event and so counts as a save
  if(event.which == 0){
  // Get the current value
  serial_number = $(input#serial_number).val();

  // Check to see if the user wants to reset the form
  if(serial_number == RESET){
// Reset the form.
$(form# + form_id)[0].reset();

$(input[tabindex=1]).focus();
  }
  } // end if
  });
 });

 I have also tried doing this using the blur event, but that did not
 work either. Also, a reset button is not desirable.

 Thanks
 Stephen


[jQuery] Re: Display Loading Image While Ajax Content Loads

2009-01-14 Thread Beres Botond

Maybe you'll have more luck with this.

// display loading animation here

$(#ajax_content).load('/sourcefiles/example.html', {}, function() {
   // hide loading animation here

});

However I'm still not sure if it will actually wait till images are
downloaded.

On Jan 14, 7:14 am, jinscoe jackins...@gmail.com wrote:
 Hello - I'm sorry if this posts twiceits been about 30 minutes or
 so since I last attempted and I still haven't seen my discussion pop
 up.

 I would guess this is a fairly easy task and I'm just missing the
 boat, because you see loading images everywhere with ajax loading.

 Here is my situation. I have a webpage that is set up a lot like a
 basic slide show - forward and back controls at the bottom a header at
 the top and an ajax loading window in the middle. I am using this
 function to make the ajax call:

 $.get('/sourcefiles/example.html', function(innerHtml){
                 $('#ajax_content').html(innerHtml);
         });

 So right now I'm just getting the html and popping it into my
 ajax_content div. I would like to make it so that it waits until the
 entire content of the html (images and all) loads before displaying
 anything. Currently it seems to wait for the just the html (text) to
 load and then continues to load the images on screen.

 I would like to just make a class called .loading or something, put
 a loading background image on it and strip that off once everything is
 loaded.

 Hopefully I have been clear enough. Let me know if anything needs more
 explaining and thanks in advance for any help!


[jQuery] Re: Cluetip ajax call returns gibberish (utf-8, greek)

2009-01-14 Thread ion

I have not changed anything but strangely enough sometimes it works on
firefox and sometimes it does not 
Could you check on explorer as well.
About the products being on the same page, that's what the client
asked for ... it takes a long time
While on the subject, I'm using qute a few external jquery related
javascript files, do you know how I
could optimize loading time ... also I have tried using the $
(function) of jquery as detailed as possible when
reffering to an element. For example as you can see the cluetip is not
called as a.load-local but as '#content div.product_photo a.load-
local. I read somewhere that this increases performace as jquery has
to search less.
Are there any other tips concerning performance.
Thanks a million:)

On Jan 14, 2:43 pm, jQuery Lover ilovejqu...@gmail.com wrote:
 Did you change anything, because it works and shows nicely on my browser.

 PS. I would suggest not printing all products on the same page (you've
 got at lease 100 items there).

 -
 Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com

 On Wed, Jan 14, 2009 at 1:31 PM, ion ikasso...@yahoo.co.uk wrote:

  Hi,
  I'm using cluetip in the following way:

  $('#content div.product_photo a.load-local').cluetip({
   cursor:'pointer',
   cluetipClass:'rounded',
   dropShadow:false,
   width:'260px',
   hoverIntent: {
    sensitivity:  1,
    interval:     100,
    timeout:      200
    },
   fx: {
   open:       'fadeIn',
    openSpeed:  ''
  }
  });

  I have several links that when are hovered cluetip is activated and
  makes an ajax get call to
  a php file. The call is like: file.php?var1=dfsvar2=sfdvar3=238479

  The problem is that the result is gibberish!!
  All files are utf-8 (saved like that and the meta content-type)
  Database is in the utf-general format.
  What is even weirdest is that the result in Safari works fine however
  in firefox  explorer it does not.

  Also, if you view the page source the characters look fine but when
  the call is viewed through firebug
  it is full of gibberish.

  You can test it here:http://www.deliverde.gr/shop
  Choose a product with greek name and hover over the image. The result
  should be the above.
  Please any help would be appreciated

  ion


[jQuery] Re: Display Loading Image While Ajax Content Loads

2009-01-14 Thread jQuery Lover

Unfortunately it will not. jQuery will know that it is getting some
data and that is all. It does not know that it's html, xml or plain
text. Image loading is done by browser when you insert the markup into
the DOM. So the workaround would be to load your content then add it
to the DOM, bind count how many images you have and then add a .load()
event to every image that calls some function which checks if it's the
last image that loaded and then only remove the animation and show the
content.

Damn, it was a long sentence :)


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 6:40 PM, Beres Botond boton...@gmail.com wrote:

 Maybe you'll have more luck with this.

 // display loading animation here

 $(#ajax_content).load('/sourcefiles/example.html', {}, function() {
   // hide loading animation here

 });

 However I'm still not sure if it will actually wait till images are
 downloaded.

 On Jan 14, 7:14 am, jinscoe jackins...@gmail.com wrote:
 Hello - I'm sorry if this posts twiceits been about 30 minutes or
 so since I last attempted and I still haven't seen my discussion pop
 up.

 I would guess this is a fairly easy task and I'm just missing the
 boat, because you see loading images everywhere with ajax loading.

 Here is my situation. I have a webpage that is set up a lot like a
 basic slide show - forward and back controls at the bottom a header at
 the top and an ajax loading window in the middle. I am using this
 function to make the ajax call:

 $.get('/sourcefiles/example.html', function(innerHtml){
 $('#ajax_content').html(innerHtml);
 });

 So right now I'm just getting the html and popping it into my
 ajax_content div. I would like to make it so that it waits until the
 entire content of the html (images and all) loads before displaying
 anything. Currently it seems to wait for the just the html (text) to
 load and then continues to load the images on screen.

 I would like to just make a class called .loading or something, put
 a loading background image on it and strip that off once everything is
 loaded.

 Hopefully I have been clear enough. Let me know if anything needs more
 explaining and thanks in advance for any help!


[jQuery] .append() into style element causes error in IE only

2009-01-14 Thread Ant

Hi,
I am trying to append css into a pre existing style element.
$(style).append(myClass);
This works as expected in Firefox, but not IE.
The HTML on the page validates to HTML strict, so I'm fairly sure that
it's not the issue with IE that append() won't work on incorrectly
written elements.
If I change my code to $(p).append(myClass); it works as expected.

Was just wondering if this is a know issue with IE or jQuery and if
anyone had a work around, I am out of ideas that don't involve
considerable effort :)

Thanks,
Ant


[jQuery] keep session alive

2009-01-14 Thread hjorth

hi

i got a big problem

i need to take a session from one page and keep it alive on another
page where i have a long form.

is this possible?


[jQuery] Re: keep session alive

2009-01-14 Thread Beres Botond

I don't see what this has to do with jQuery or Javascript in general.
Maybe give us some more details.


On Jan 14, 3:33 pm, hjorth andreashjo...@hotmail.com wrote:
 hi

 i got a big problem

 i need to take a session from one page and keep it alive on another
 page where i have a long form.

 is this possible?


[jQuery] Re: Cluetip ajax call returns gibberish (utf-8, greek)

2009-01-14 Thread jQuery Lover

You can pack your javascript code:
http://jquery-howto.blogspot.com/2009/01/minimize-and-pack-your-javascript-code.html

You might find this jquery and javascript performance posts useful:
http://jquery-howto.blogspot.com/search/label/performance



On Wed, Jan 14, 2009 at 6:45 PM, ion ikasso...@yahoo.co.uk wrote:

 I have not changed anything but strangely enough sometimes it works on
 firefox and sometimes it does not 
 Could you check on explorer as well.
 About the products being on the same page, that's what the client
 asked for ... it takes a long time
 While on the subject, I'm using qute a few external jquery related
 javascript files, do you know how I
 could optimize loading time ... also I have tried using the $
 (function) of jquery as detailed as possible when
 reffering to an element. For example as you can see the cluetip is not
 called as a.load-local but as '#content div.product_photo a.load-
 local. I read somewhere that this increases performace as jquery has
 to search less.
 Are there any other tips concerning performance.
 Thanks a million:)

 On Jan 14, 2:43 pm, jQuery Lover ilovejqu...@gmail.com wrote:
 Did you change anything, because it works and shows nicely on my browser.

 PS. I would suggest not printing all products on the same page (you've
 got at lease 100 items there).

 -
 Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com

 On Wed, Jan 14, 2009 at 1:31 PM, ion ikasso...@yahoo.co.uk wrote:

  Hi,
  I'm using cluetip in the following way:

  $('#content div.product_photo a.load-local').cluetip({
   cursor:'pointer',
   cluetipClass:'rounded',
   dropShadow:false,
   width:'260px',
   hoverIntent: {
sensitivity:  1,
interval: 100,
timeout:  200
},
   fx: {
   open:   'fadeIn',
openSpeed:  ''
  }
  });

  I have several links that when are hovered cluetip is activated and
  makes an ajax get call to
  a php file. The call is like: file.php?var1=dfsvar2=sfdvar3=238479

  The problem is that the result is gibberish!!
  All files are utf-8 (saved like that and the meta content-type)
  Database is in the utf-general format.
  What is even weirdest is that the result in Safari works fine however
  in firefox  explorer it does not.

  Also, if you view the page source the characters look fine but when
  the call is viewed through firebug
  it is full of gibberish.

  You can test it here:http://www.deliverde.gr/shop
  Choose a product with greek name and hover over the image. The result
  should be the above.
  Please any help would be appreciated

  ion


[jQuery] Re: Wiki Error trying to access Tabs, Datepicker on docs.jquery.com

2009-01-14 Thread ilovejqu...@gmail.com

Damn, now I got the same problem :(

For reference:
===

MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database
error has occurred
Query: BEGIN
Function: Database::begin
Error: 2006 MySQL server has gone away (localhost)
' in /home/jquery/en/docs/includes/Database.php:694
Stack trace:
#0 /home/jquery/en/docs/includes/Database.php(651): Database-
reportQueryError('MySQL server ha...', 2006, 'BEGIN',
'Database::begin', false)
#1 /home/jquery/en/docs/includes/Database.php(1749): Database-query
('BEGIN', 'Database::begin')
#2 /home/jquery/en/docs/includes/Database.php(625): Database-begin()
#3 /home/jquery/en/docs/includes/Database.php(1034): Database-query
('SELECT * FROM...', 'Job::pop')
#4 /home/jquery/en/docs/includes/Database.php(1053): Database-select
('job', '*', '', 'Job::pop', Array)
#5 /home/jquery/en/docs/includes/JobQueue.php(39): Database-selectRow
('job', '*', '', 'Job::pop', Array)
#6 /home/jquery/en/docs/includes/Wiki.php(298): Job::pop()
#7 /home/jquery/en/docs/includes/Wiki.php(252): MediaWiki-doJobs()
#8 /home/jquery/en/docs/index.php(48): MediaWiki-finalCleanup(Array,
Object(LoadBalancer), Object(OutputPage))
#9 {main}

Exception caught inside exception handler: exception
'DBUnexpectedError' with message 'Error in fetchObject(): MySQL server
has gone away (localhost)' in /home/jquery/en/docs/includes/
Database.php:811
Stack trace:
#0 /home/jquery/en/docs/includes/Database.php(2042): Database-
fetchObject(false)
#1 /home/jquery/en/docs/includes/LinkBatch.php(90): ResultWrapper-
fetchObject()
#2 /home/jquery/en/docs/includes/LinkBatch.php(69): LinkBatch-
executeInto(Object(LinkCache))
#3 /home/jquery/en/docs/includes/Skin.php(202): LinkBatch-execute()
#4 /home/jquery/en/docs/includes/Skin.php(181): Skin-preloadExistence
()
#5 /home/jquery/en/docs/includes/SkinTemplate.php(106): Skin-initPage
(Object(OutputPage))
#6 /home/jquery/en/docs/skins/MonoBook.php(28): SkinTemplate-initPage
(Object(OutputPage))
#7 /home/jquery/en/docs/includes/SkinTemplate.php(153): SkinMonoBook-
initPage(Object(OutputPage))
#8 /home/jquery/en/docs/includes/OutputPage.php(595): SkinTemplate-
outputPage(Object(OutputPage))
#9 /home/jquery/en/docs/includes/Exception.php(73): OutputPage-output
()
#10 /home/jquery/en/docs/includes/Exception.php(94): MWException-
reportHTML()
#11 /home/jquery/en/docs/includes/Exception.php(170): MWException-
report()
#12 /home/jquery/en/docs/includes/Exception.php(204): wfReportException
(Object(DBQueryError))
#13 [internal function]: wfExceptionHandler(Object(DBQueryError))
#14 {main}

===

On Jan 14, 4:59 pm, jQuery Lover ilovejqu...@gmail.com wrote:
 I'm not getting this error. I remember a post that says that the doc's
 are hosted on different servers. So I guess I'm getting mine from not
 crushed server.

 I was quite interested of getting offline/downloadable version of jquery docs.

 Michael, maybe you find jquery cheatsheets 
 useful:http://www.google.com/search?q=jquery+cheatsheet



[jQuery] Re: keep session alive

2009-01-14 Thread jQuery Lover

You could also use jquery ui tabs for your form sections
(http://docs.jquery.com/UI/Tabs).

Just add two buttons proceed and previous to the bottom of each
tab window and you have nice looking form :)


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 7:13 PM, Beres Botond boton...@gmail.com wrote:

 I don't see what this has to do with jQuery or Javascript in general.
 Maybe give us some more details.


 On Jan 14, 3:33 pm, hjorth andreashjo...@hotmail.com wrote:
 hi

 i got a big problem

 i need to take a session from one page and keep it alive on another
 page where i have a long form.

 is this possible?


[jQuery] datepicker and setdate

2009-01-14 Thread graphic...@googlemail.com

Hi,

This setDate is driving me mad !  I can't set the date of the controls
programatically.

  //create range datepickers
  $(#start , #end).datepicker({
showOn: button,
buttonImage: images/calendar.gif,
buttonImageOnly: true,
beforeShow: customRange,
hideIfNoPrevNext: true,
showStatus: true,
duration: ,
dateFormat: dd MM yy
  }).attr(readonly, readonly);



  $(start).datepicker(setDate, 10 Mar 2008);

  displays non-sense date such as 14 august 2014

Is there something I'm doing wrong ?

Thanks


[jQuery] Re: datepicker and setdate

2009-01-14 Thread MorningZ

Well, that second selector is wrong to start with... shouldn't it be $
(#start) and not $(start) ?

On Jan 14, 9:24 am, graphic...@googlemail.com
graphic...@googlemail.com wrote:
 Hi,

 This setDate is driving me mad !  I can't set the date of the controls
 programatically.

   //create range datepickers
   $(#start , #end).datepicker({
     showOn: button,
     buttonImage: images/calendar.gif,
     buttonImageOnly: true,
     beforeShow: customRange,
     hideIfNoPrevNext: true,
     showStatus: true,
     duration: ,
     dateFormat: dd MM yy
   }).attr(readonly, readonly);

   $(start).datepicker(setDate, 10 Mar 2008);

   displays non-sense date such as 14 august 2014

 Is there something I'm doing wrong ?

 Thanks


[jQuery] Re: wildcard match question

2009-01-14 Thread jQuery Lover

Duplicate: 
http://groups.google.com/group/jquery-en/browse_thread/thread/a7eb506135169136/b69c5734587c995e#b69c5734587c995e


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 8:30 AM, Davis ywk...@gmail.com wrote:

 i want to grep a pattern of DIV id with x_div_ wildcard

 ev_enquiry = $('d...@id^=x_div_]');
 ev_enquiry.each( function(i) {
 altert(this.i);

 how can i pass each of DIV id to alert()? as this.i not work..

 thanks/Davis.



[jQuery] jQuery 1.3 Released

2009-01-14 Thread John Resig

Hey Everyone -

jQuery 1.3 is out! Full details here:
http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/

Happy 3rd Birthday, jQuery!

--John


[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread jQuery Lover

Super !!!


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Wed, Jan 14, 2009 at 7:45 PM, John Resig jere...@gmail.com wrote:

 Hey Everyone -

 jQuery 1.3 is out! Full details here:
 http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/

 Happy 3rd Birthday, jQuery!

 --John



[jQuery] Can I call a different domain using .ajax async=false

2009-01-14 Thread g...@getsharepoint.com

Hi,

If my code is on mydomain.com and I want to get some data from
yourdomain.com can I use .ajax with async=false or does .ajax always
do an XMLHttpRequest to get it's data?

I know I can't use XMLHttpRequest for cross-domain requests.

Thanks ahead of time.


[jQuery] Re: Selector help

2009-01-14 Thread km...@fensys.com

I need to capture all links that navigate away from the current page.
If a link points back to the current page, it is allowed to go
through.  If it navigates away, a popup needs to appear displaying
certain information.  I have two different strings that point pack to
the current page.  One is a normal url, the other is a javascript
postback.

On Jan 13, 10:20 pm, brian bally.z...@gmail.com wrote:
 You could maybe follow with not(). What are you trying to do?

 On Tue, Jan 13, 2009 at 5:26 PM, km...@fensys.com seig...@gmail.com wrote:

  I'm using a attribute selector and I want to combine the *= with the !
  = on href.  Is there any way to do this?


[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread Sam Sherlock
Happy Birthday jQuery, and hats off to all involved

those charts look real impressive - 30% faster; this sizzle must be hot :)

Am looking forward to using it

2009/1/14 jQuery Lover ilovejqu...@gmail.com


 Super !!!

 
 Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



 On Wed, Jan 14, 2009 at 7:45 PM, John Resig jere...@gmail.com wrote:
 
  Hey Everyone -
 
  jQuery 1.3 is out! Full details here:
  http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/
 
  Happy 3rd Birthday, jQuery!
 
  --John
 



[jQuery] Re: [jquery-dev] jQuery 1.3 Released

2009-01-14 Thread Briz
Way to go John and team. Thanks for your hard work on the library and your
continuing guidance of the community.
_
Brad Brizendine
CTO, Glyphix http://www.glyphix.com/


On Wed, Jan 14, 2009 at 6:45 AM, John Resig jere...@gmail.com wrote:


 Hey Everyone -

 jQuery 1.3 is out! Full details here:
 http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/

 Happy 3rd Birthday, jQuery!

 --John

 



[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread MorningZ

I loove the API Browser

http://api.jquery.com/




On Jan 14, 10:02 am, Briz brizb...@gmail.com wrote:
 Way to go John and team. Thanks for your hard work on the library and your
 continuing guidance of the community.
 _
 Brad Brizendine
 CTO, Glyphixhttp://www.glyphix.com/

 On Wed, Jan 14, 2009 at 6:45 AM, John Resig jere...@gmail.com wrote:

  Hey Everyone -

  jQuery 1.3 is out! Full details here:
 http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/

  Happy 3rd Birthday, jQuery!

  --John


[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread Rick Faircloth
Congratulations, John and Paul!

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Sam Sherlock
Sent: Wednesday, January 14, 2009 10:00 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery 1.3 Released

 

Happy Birthday jQuery, and hats off to all involved 

those charts look real impressive - 30% faster; this sizzle must be hot :)

Am looking forward to using it 

2009/1/14 jQuery Lover ilovejqu...@gmail.com


Super !!!


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com




On Wed, Jan 14, 2009 at 7:45 PM, John Resig jere...@gmail.com wrote:

 Hey Everyone -

 jQuery 1.3 is out! Full details here:
 http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/

 Happy 3rd Birthday, jQuery!

 --John


 



[jQuery] Re: Selector Question

2009-01-14 Thread bittermonkey

Got it.  Thanks Mike.  So this code would have made better sense:

$(button:first).click(function(event){alert(this);})


On Jan 13, 5:52 pm, Michael Geary m...@mg.to wrote:
 Do you have Firebug? If not, get it and enable the Console and Script tabs,
 then enter these statements into the console input line, one at a time with
 Enter after each one:

 $(button)

 $(button)[0]

 $( $(button)[0] )

 Each one will log an object to the console log. Click on each of these
 objects to look at its properties.

 You'll find that the first one is a jQuery object - which happens to be an
 array of DOM elements. Take the [0] of that object, as in the second
 expression, and now you have the first DOM element in that array. Since it's
 not a jQuery object, it doesn't have a .bind() method. Instead, it has the
 properties and methods of any other DOM element.

 Now wrap the whole thing in another $() function call, as in the third
 expression, and you're creating a new jQuery object that happens to contain
 the same DOM element as the first one.

 -Mike

  From:bittermonkey

  I'm fairly new to the framework and I've been messing around a bit.
  These below confuses me.

  1.  Why is this snippet not working?  Firefox's error console
  throws an error saying  $(button)[0].bind is not a
  function  $(button)[0].bind(click, function(event){alert(this)});

  2.  And why does this work?
  $($(button)[0]).bind(click, function(event){alert(this)});


[jQuery] Re: Selector help

2009-01-14 Thread brian

I use this sometimes to have all outside links open in a new tab/window.

$('a[href^=http]')
.not('[href*=' + window.location.hostname + ']')
.attr('target', '_new');

You could modify that:

$('a[href^=http]')
.not('[href*=' + window.location.hostname + ']')
.each(function() {
...
});

On Wed, Jan 14, 2009 at 9:54 AM, km...@fensys.com seig...@gmail.com wrote:

 I need to capture all links that navigate away from the current page.
 If a link points back to the current page, it is allowed to go
 through.  If it navigates away, a popup needs to appear displaying
 certain information.  I have two different strings that point pack to
 the current page.  One is a normal url, the other is a javascript
 postback.

 On Jan 13, 10:20 pm, brian bally.z...@gmail.com wrote:
 You could maybe follow with not(). What are you trying to do?

 On Tue, Jan 13, 2009 at 5:26 PM, km...@fensys.com seig...@gmail.com wrote:

  I'm using a attribute selector and I want to combine the *= with the !
  = on href.  Is there any way to do this?


[jQuery] Re: Can I call a different domain using .ajax async=false

2009-01-14 Thread MorningZ

This is right from the code itself for the .ajax() function

// Create the request object; Microsoft failed to properly
// implement the XMLHttpRequest in IE7, so we use the ActiveXObject
when it is available
var xhr = window.ActiveXObject ? new ActiveXObject
(Microsoft.XMLHTTP) : new XMLHttpRequest();




On Jan 14, 9:50 am, g...@getsharepoint.com g...@getsharepoint.com
wrote:
 Hi,

 If my code is on mydomain.com and I want to get some data from
 yourdomain.com can I use .ajax with async=false or does .ajax always
 do an XMLHttpRequest to get it's data?

 I know I can't use XMLHttpRequest for cross-domain requests.

 Thanks ahead of time.


[jQuery] Re: createElement, get its value

2009-01-14 Thread Rick Faircloth

Only if you know what it does in the first place.
You can't know the answer before knowing the answer... :o)

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
 Behalf Of jQuery Lover
 Sent: Wednesday, January 14, 2009 8:27 AM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Re: createElement, get its value
 
 
 OFFTTOP:
 
 The live() function will reduce so much questions on this mailing list :)
 
 
 Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
 
 
 
 On Wed, Jan 14, 2009 at 6:52 AM, Kean shenan...@gmail.com wrote:
 
  using jQuery 1.3
 
  This will most probably work.
 
  $('#grabMe').live('click', function() {
 alert($(this).html());
  });
 
  On Jan 13, 5:41 pm, Kean shenan...@gmail.com wrote:
  Hmmm, you must understand event listener(bind) does not work like CSS
  where DOM nodes added in the future cannot be listened right now.
  That's where event delegation comes it.
 
  http://www.learningjquery.com/2008/03/working-with-events-part-1
 
  On Jan 13, 4:58 pm, sam sam.from.hackern...@gmail.com wrote:
 
   $('#grabMe') will search the document for an element with ID grabMe
 
   Have you added grabMe to the document?
 
   On Jan 13, 6:00 pm, CrustyDOD anze.stok...@gmail.com wrote:
 
Hey!
 
I've created one div with FlyDOM plugin which uses createElement
function to add stuff to DOM. Now the problem is that once i add the
element, i cannot access it in anyway.
 
For example with FlyDOM plugin i create:
div id=grabMeIt works!/div
 
After the JS for creating element i have this:
$('#grabMe').click(function() {
alert($(this).html());
 
});
 
It doesn't work.
 
There are no errors shown in Firebug, the element is in DOM, id is
set. It's all there.
 
Am i missing something here? I'm confused :S
 
Using jquery 1.2.6



[jQuery] Re: Issue with loading content once using AJAX and display it as a SimpleModal (plugin)

2009-01-14 Thread Martin K

Thanks Eric, that did the trick. I'm a bit embarrassed since this was
well documented on your site and I somehow missed it.
Thanks for a great plugin!

- Martin

On Jan 13, 9:48 pm, Eric Martin emarti...@gmail.com wrote:
 Martin,

 Try using the persist:true option:
 $(#content).modal({persist:true});

 Let me know if that does not fix your issue.

 -Eric

 On Jan 13, 11:10 am, mh.karls...@gmail.com mh.karls...@gmail.com
 wrote:

  I'm using AJAX to load content into a DIV and display it as a simple
  modal (using the SimpleModal plugin). In order to limit the requests
  to the server I would like to only load the content once, but that's
  when I run into trouble. Let me show you the code and then I will
  explain what happens.

  HTML:
  div id=sidebar
     a id=settings href=# class=settingsSettings/a
     a id=options href=# class=testTest/a
  /div
  div id=contentDefault Text/div

  JAVASCRIPT:
  var isLoaded = false;

  $(document).ready(function () {
          // click event handler for 'settings'
          $('#sidebar a.settings').click(function (e) {
                  if (!isLoaded) {
                          $(#content).load(settings.htm);
                          isLoaded = true;
                  }
                  $(#content).modal();
          }
          // click event handler for 'test'
          $('#sidebar a.test').click(function (e) {
                  $(#content).modal();
          }

  }

  function hideModal(){
          $.modal.close();

  }

  The first time I click on the link 'Settings' the content from
  'settings.htm' is correctly displayed as a simple modal. But each time
  I click on the link after that it will display the DIV's initial text
  (Default Text). However, if I remove the following line;

  $(#content).modal();

  from the event handler for the link 'settings' and then use the 'test'
  link instead it displays correctly each time. I can't find the reason
  why this wouldn't work in the event handler for 'settings'? By viewing
  the rendered HTML I can confirm that content of the 'settings.htm' is
  correctly injected to the content div after the initial click. But I
  can't figure out what happens after that and how the default text make
  it back in there. I'm pretty new to jQuery so if anyone can shed some
  light on this issue I would really appreciate it.

  Thanks, Martin


[jQuery] Re: datepicker and setdate

2009-01-14 Thread graphic...@googlemail.com

Sorry the error was in my post but not in my code. So yes it should
be

  $(#start).datepicker(setDate, 10 Mar 2008);

but that gives me non-sense date as mentioned in my first post. Any
idea ?

On 14 jan, 14:31, MorningZ morni...@gmail.com wrote:
 Well, that second selector is wrong to start with... shouldn't it be $
 (#start) and not $(start) ?

 On Jan 14, 9:24 am, graphic...@googlemail.com

 graphic...@googlemail.com wrote:
  Hi,

  This setDate is driving me mad !  I can't set the date of the controls
  programatically.

    //create range datepickers
    $(#start , #end).datepicker({
      showOn: button,
      buttonImage: images/calendar.gif,
      buttonImageOnly: true,
      beforeShow: customRange,
      hideIfNoPrevNext: true,
      showStatus: true,
      duration: ,
      dateFormat: dd MM yy
    }).attr(readonly, readonly);

    $(start).datepicker(setDate, 10 Mar 2008);

    displays non-sense date such as 14 august 2014

  Is there something I'm doing wrong ?

  Thanks


[jQuery] Re: Issue with loading content once using AJAX and display it as a SimpleModal (plugin)

2009-01-14 Thread Martin K

Thanks for your advice Beres. Eric's tip solved the problem. The
problem was never the initial (Ajax) request but each following
display of the modal dialog which will skip the step of populating the
content. That said, you are right in that it would be better to
display the modal in a callback function so I can make sure the
content was correctly loaded before I display it. I will modify my
code accordingly.

- Martin

On Jan 14, 3:21 am, Beres Botond boton...@gmail.com wrote:
 I think the most likely issue is that you are doing an ajax request
 (load), but manipulate the same div without waiting for the request to
 complete.
 So the modal is created before .load is finished.
 Try moving $(#content).modal(); to a callback of .load. This is a
 golden rule of ajax request, if you want to do something with returned
 data/html, then need to add your logic to a callback.

 $(#content).load(settings.htm, {}, function() {
       $(#content).modal();

 });

 On Jan 13, 9:10 pm, mh.karls...@gmail.com mh.karls...@gmail.com
 wrote:

  I'm using AJAX to load content into a DIV and display it as a simple
  modal (using the SimpleModal plugin). In order to limit the requests
  to the server I would like to only load the content once, but that's
  when I run into trouble. Let me show you the code and then I will
  explain what happens.

  HTML:
  div id=sidebar
     a id=settings href=# class=settingsSettings/a
     a id=options href=# class=testTest/a
  /div
  div id=contentDefault Text/div

  JAVASCRIPT:
  var isLoaded = false;

  $(document).ready(function () {
          // click event handler for 'settings'
          $('#sidebar a.settings').click(function (e) {
                  if (!isLoaded) {
                          $(#content).load(settings.htm);
                          isLoaded = true;
                  }
                  $(#content).modal();
          }
          // click event handler for 'test'
          $('#sidebar a.test').click(function (e) {
                  $(#content).modal();
          }

  }

  function hideModal(){
          $.modal.close();

  }

  The first time I click on the link 'Settings' the content from
  'settings.htm' is correctly displayed as a simple modal. But each time
  I click on the link after that it will display the DIV's initial text
  (Default Text). However, if I remove the following line;

  $(#content).modal();

  from the event handler for the link 'settings' and then use the 'test'
  link instead it displays correctly each time. I can't find the reason
  why this wouldn't work in the event handler for 'settings'? By viewing
  the rendered HTML I can confirm that content of the 'settings.htm' is
  correctly injected to the content div after the initial click. But I
  can't figure out what happens after that and how the default text make
  it back in there. I'm pretty new to jQuery so if anyone can shed some
  light on this issue I would really appreciate it.

  Thanks, Martin


[jQuery] dynamic title set after ajax

2009-01-14 Thread Olaf Bosch


Hi all,
after a ajax load of content in a DIV I try to change the title of the
parent document, for better BookMarking.
Works fine in FF, not in IE. In IE is result null. In Opera become
localhost in alert.

here the Code:

  var new_title = $(data).filter(title).text();
  document.title = new_title;
  alert (new_title);

See you a way to do this in all Browsers?


--
Viele Grüße, Olaf

---
olaf.bo...@t-online.de
http://olaf-bosch.de/
http://ohorn.info/
http://www.akitafreund.de/
---


[jQuery] Re: datepicker and setdate

2009-01-14 Thread MorningZ

Hmm... well..

you have this declared

dateFormat: dd MM yy

and you say you want to set it to

10 Mar 2008

The format is looking for a 2-digit year, your value is a 4 digit
year, i'd say that would be an issue and could be the cause of your
unexpected result

also, what about simply setting the value of the textbox if fixing the
format/value mixup doesn't work

$(#start).val(10 Mar 2008);




On Jan 14, 11:00 am, graphic...@googlemail.com
graphic...@googlemail.com wrote:
 Sorry the error was in my post but not in my code. So yes it should
 be

   $(#start).datepicker(setDate, 10 Mar 2008);

 but that gives me non-sense date as mentioned in my first post. Any
 idea ?

 On 14 jan, 14:31, MorningZ morni...@gmail.com wrote:

  Well, that second selector is wrong to start with... shouldn't it be $
  (#start) and not $(start) ?

  On Jan 14, 9:24 am, graphic...@googlemail.com

  graphic...@googlemail.com wrote:
   Hi,

   This setDate is driving me mad !  I can't set the date of the controls
   programatically.

     //create range datepickers
     $(#start , #end).datepicker({
       showOn: button,
       buttonImage: images/calendar.gif,
       buttonImageOnly: true,
       beforeShow: customRange,
       hideIfNoPrevNext: true,
       showStatus: true,
       duration: ,
       dateFormat: dd MM yy
     }).attr(readonly, readonly);

     $(start).datepicker(setDate, 10 Mar 2008);

     displays non-sense date such as 14 august 2014

   Is there something I'm doing wrong ?

   Thanks


[jQuery] Re: dynamic title set after ajax

2009-01-14 Thread MorningZ

This guy's code works across FF, IE and Chrome from what i see
(sorry i don't have Safari or Opera installed)

http://javascript.internet.com/page-details/dynamic-title-bar.html



On Jan 14, 11:20 am, Olaf Bosch olaf.bo...@t-online.de wrote:
 Hi all,
 after a ajax load of content in a DIV I try to change the title of the
 parent document, for better BookMarking.
 Works fine in FF, not in IE. In IE is result null. In Opera become
 localhost in alert.

 here the Code:

            var new_title = $(data).filter(title).text();
            document.title = new_title;
            alert (new_title);

 See you a way to do this in all Browsers?

 --
 Viele Grüße, Olaf

 ---
 olaf.bo...@t-online.dehttp://olaf-bosch.de/http://ohorn.info/http://www.akitafreund.de/
 ---


[jQuery] Re: createElement, get its value

2009-01-14 Thread CrustyDOD

The live() function will be in the new release?
Any documentation on the function itself? Is this just a code taken
from some plugin? If so, which one?

On Jan 14, 4:39 pm, Rick Faircloth r...@whitestonemedia.com wrote:
 Only if you know what it does in the first place.
 You can't know the answer before knowing the answer... :o)

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
  Behalf Of jQuery Lover
  Sent: Wednesday, January 14, 2009 8:27 AM
  To: jquery-en@googlegroups.com
  Subject: [jQuery] Re: createElement, get its value

  OFFTTOP:

  The live() function will reduce so much questions on this mailing list :)

  
  Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com

  On Wed, Jan 14, 2009 at 6:52 AM, Kean shenan...@gmail.com wrote:

   using jQuery 1.3

   This will most probably work.

   $('#grabMe').live('click', function() {
      alert($(this).html());
   });

   On Jan 13, 5:41 pm, Kean shenan...@gmail.com wrote:
   Hmmm, you must understand event listener(bind) does not work like CSS
   where DOM nodes added in the future cannot be listened right now.
   That's where event delegation comes it.

  http://www.learningjquery.com/2008/03/working-with-events-part-1

   On Jan 13, 4:58 pm, sam sam.from.hackern...@gmail.com wrote:

$('#grabMe') will search the document for an element with ID grabMe

Have you added grabMe to the document?

On Jan 13, 6:00 pm, CrustyDOD anze.stok...@gmail.com wrote:

 Hey!

 I've created one div with FlyDOM plugin which uses createElement
 function to add stuff to DOM. Now the problem is that once i add the
 element, i cannot access it in anyway.

 For example with FlyDOM plugin i create:
 div id=grabMeIt works!/div

 After the JS for creating element i have this:
 $('#grabMe').click(function() {
     alert($(this).html());

 });

 It doesn't work.

 There are no errors shown in Firebug, the element is in DOM, id is
 set. It's all there.

 Am i missing something here? I'm confused :S

 Using jquery 1.2.6


[jQuery] jQuery Tabs

2009-01-14 Thread Eric Garside

Anyone having trouble with getting tab event callbacks to work? I'm on
jQuery 1.3 and jQuery UI 1.6rc4 and none of the tab event callbacks
are working.


[jQuery] Re: In this code, what would $(this) in the success part refer to?

2009-01-14 Thread Charlie Griefer
but educating someone in how to ask a good question really -is- helping them
:)
http://www.catb.org/~esr/faqs/smart-questions.html


On Wed, Jan 14, 2009 at 4:24 AM, donb falconwatc...@comcast.net wrote:


 I don't know what can be more discouraging that the standard 'use
 google' or 'that question has been asked/answered too many times'
 discussion.  Folks, this is a discussion forum.  People range from
 novice to expert.  The experts eventually get tired of answering a
 novice question and get testy about it.  And it invariable degrades
 into name-calling.  Besides, searching for 'this' will be a futile
 exercise because the word is just too common..

 Searching is only going to be successful when you can formulate a good
 search query.  But as pointed out, there usually are a bunch of
 'answers' that may be misleading, create further questions, are just
 wrong, or they may appear to be nonapplicable for some reason.  Even
 when the answer is found, it may not be recognized.  The documentation
 is not perfect and I find the examples are often quite trivial and
 sometimes ambiguous.  And often we have people whose primary language
 is not English and they may struggle (or fail) to translate those
 answers into their own language. (Yes, I know this is the jQuery-
 English forum)

 There's no need to lecture anyone on 'proper' use of the forum,
 particularly when the lecture/lecturer also goes contrary to decent
 and/or proper use of the forum.  As has been shown above, the effort
 it takes to lecture typically far exceeds the effort it takes to
 assist.

 Still a good motto: 'if you can't say something nice then don't say
 anything at all.'




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


[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread Michael Smith

Well done - I see it has already made its way on to google's servers:

http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js

 On Wed, Jan 14, 2009 at 6:45 AM, John Resig jere...@gmail.com wrote:

 Hey Everyone -

 jQuery 1.3 is out! Full details here:
 http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/

 Happy 3rd Birthday, jQuery!

 --John


[jQuery] Re: datepicker and setdate

2009-01-14 Thread graphic...@googlemail.com

Yes, you are so right ! Just setting the textbox value is enough !

Many thanks !

On 14 jan, 16:23, MorningZ morni...@gmail.com wrote:
 Hmm... well..

 you have this declared

     dateFormat: dd MM yy

 and you say you want to set it to

     10 Mar 2008

 The format is looking for a 2-digit year, your value is a 4 digit
 year, i'd say that would be an issue and could be the cause of your
 unexpected result

 also, what about simply setting the value of the textbox if fixing the
 format/value mixup doesn't work

 $(#start).val(10 Mar 2008);

 On Jan 14, 11:00 am, graphic...@googlemail.com

 graphic...@googlemail.com wrote:
  Sorry the error was in my post but not in my code. So yes it should
  be

    $(#start).datepicker(setDate, 10 Mar 2008);

  but that gives me non-sense date as mentioned in my first post. Any
  idea ?

  On 14 jan, 14:31, MorningZ morni...@gmail.com wrote:

   Well, that second selector is wrong to start with... shouldn't it be $
   (#start) and not $(start) ?

   On Jan 14, 9:24 am, graphic...@googlemail.com

   graphic...@googlemail.com wrote:
Hi,

This setDate is driving me mad !  I can't set the date of the controls
programatically.

  //create range datepickers
  $(#start , #end).datepicker({
    showOn: button,
    buttonImage: images/calendar.gif,
    buttonImageOnly: true,
    beforeShow: customRange,
    hideIfNoPrevNext: true,
    showStatus: true,
    duration: ,
    dateFormat: dd MM yy
  }).attr(readonly, readonly);

  $(start).datepicker(setDate, 10 Mar 2008);

  displays non-sense date such as 14 august 2014

Is there something I'm doing wrong ?

Thanks


[jQuery] Re: In this code, what would $(this) in the success part refer to?

2009-01-14 Thread Miloš Rašić
Since you're already discussing $(this), I'd like to ask something.
It is a good practice to assign selected nodes to variables if you are going
to need them more than once so as not to make jQuery search the document for
them again and again. What about $(this)? Do I need to assign it to a
variable or is it fast enough for repeated use?


[jQuery] Re: dynamic title set after ajax

2009-01-14 Thread Olaf Bosch


MorningZ schrieb:

This guy's code works across FF, IE and Chrome from what i see
(sorry i don't have Safari or Opera installed)


:) thanks, fine script ;)

My problem is not the set of title, get the title is my problem :)

--
Viele Grüße, Olaf

---
olaf.bo...@t-online.de
http://olaf-bosch.de/
http://ohorn.info/
http://www.akitafreund.de/
---


[jQuery] Re: createElement, get its value

2009-01-14 Thread CrustyDOD

Heh, it was released just now..

On Jan 14, 5:28 pm, CrustyDOD anze.stok...@gmail.com wrote:
 The live() function will be in the new release?
 Any documentation on the function itself? Is this just a code taken
 from some plugin? If so, which one?

 On Jan 14, 4:39 pm, Rick Faircloth r...@whitestonemedia.com wrote:

  Only if you know what it does in the first place.
  You can't know the answer before knowing the answer... :o)

   -Original Message-
   From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
   Behalf Of jQuery Lover
   Sent: Wednesday, January 14, 2009 8:27 AM
   To: jquery-en@googlegroups.com
   Subject: [jQuery] Re: createElement, get its value

   OFFTTOP:

   The live() function will reduce so much questions on this mailing list :)

   
   Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com

   On Wed, Jan 14, 2009 at 6:52 AM, Kean shenan...@gmail.com wrote:

using jQuery 1.3

This will most probably work.

$('#grabMe').live('click', function() {
   alert($(this).html());
});

On Jan 13, 5:41 pm, Kean shenan...@gmail.com wrote:
Hmmm, you must understand event listener(bind) does not work like CSS
where DOM nodes added in the future cannot be listened right now.
That's where event delegation comes it.

   http://www.learningjquery.com/2008/03/working-with-events-part-1

On Jan 13, 4:58 pm, sam sam.from.hackern...@gmail.com wrote:

 $('#grabMe') will search the document for an element with ID grabMe

 Have you added grabMe to the document?

 On Jan 13, 6:00 pm, CrustyDOD anze.stok...@gmail.com wrote:

  Hey!

  I've created one div with FlyDOM plugin which uses createElement
  function to add stuff to DOM. Now the problem is that once i add 
  the
  element, i cannot access it in anyway.

  For example with FlyDOM plugin i create:
  div id=grabMeIt works!/div

  After the JS for creating element i have this:
  $('#grabMe').click(function() {
      alert($(this).html());

  });

  It doesn't work.

  There are no errors shown in Firebug, the element is in DOM, id is
  set. It's all there.

  Am i missing something here? I'm confused :S

  Using jquery 1.2.6


[jQuery] Autocomplete, can we change the q and limit parameters name ?

2009-01-14 Thread xavier

Hi,


Is there a way to modify the default names of the two parameters, so
instead of calling /search?q=blalimit=10 it can call /search?
query=blamax=10

I was hoping for something along that way:

$(#searchfield).autocomplete( /search, {
q: query,
limit: max
});

But didn't find anything related in the doc

The goal being, obviously, to avoid having to alter the server and
adjusting to the parameters it expects.

X+


[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread MarcelloP

this is a GREAT news! Welcome jQuery 1.3!

But, what about jQueryUI 1.6 final?


On Jan 14, 3:45 pm, John Resig jere...@gmail.com wrote:
 Hey Everyone -

 jQuery 1.3 is out! Full details 
 here:http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/

 Happy 3rd Birthday, jQuery!

 --John


[jQuery] Re: .animate() queue without pause between animations

2009-01-14 Thread Miloš Rašić
Thanks a lot to you and Karl for help. The animation works smoothly now. I
had to switch to animating without queue and using setTimeout for the second
rotation. It would be nice if jQuery would provide some functionality to the
queues where we could choose if we want a pause between animations and how
long it should be.

On Tue, Jan 13, 2009 at 11:05 PM, Nikola nik.cod...@gmail.com wrote:


 What about doing something similar to what Karl Swedberg did in his
 animated scrolling example?

 http://www.learningjquery.com/2007/09/animated-scrolling-with-jquery-12


[jQuery] append changes width of select boxes in ie7

2009-01-14 Thread david

Hi all,

I have written a control of 2 select boxes with buttons where i can
move options from left to right and vice versa.
In ie7 when i make the action of moving from left to right, the select
boxes shrink suddenly. I narrowed the problem to the append function
here is the code from right to left:
 var left = $(this).parent().parent().find('#select_left');
 var right = $(this).parent().parent().find('#select_right');
 var rightOpts = $(this).parent().parent().find('#select_right
option');
left.append(rightOpts);

The problem just appears when i define the width of the select boxes
in % not in pixels.

Thanks in advance,
David


[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread Richard D. Worth
On Wed, Jan 14, 2009 at 12:20 PM, MarcelloP marcello@gmail.com wrote:


 this is a GREAT news! Welcome jQuery 1.3!

 But, what about jQueryUI 1.6 final?


 jQuery UI 1.6rc5 will be out tomorrow, and will include 1.3. 1.6 final is
scheduled for one week from tomorrow (so we ensure we've fully tested
against 1.3).

- Richard


[jQuery] Re: Autocomplete, can we change the q and limit parameters name ?

2009-01-14 Thread brian

The 'q' is hard-coded in the makeUrl() method. But it'd be simple
enough to change it to grab the param name from the options hash:

var url = options.url + ? + options.q + = + encodeURI(q);

And adjust the jQuery.fn.autocomplete at the bottom of the file to
reflect the change:

options.q = options.q || 'q';


On Wed, Jan 14, 2009 at 12:12 PM, xavier syd...@gmail.com wrote:

 Hi,


 Is there a way to modify the default names of the two parameters, so
 instead of calling /search?q=blalimit=10 it can call /search?
 query=blamax=10

 I was hoping for something along that way:

 $(#searchfield).autocomplete( /search, {
q: query,
limit: max
});

 But didn't find anything related in the doc

 The goal being, obviously, to avoid having to alter the server and
 adjusting to the parameters it expects.

 X+


[jQuery] Re: .animate() queue without pause between animations

2009-01-14 Thread Miloš Rašić
I don't think so. The number of pixels is not a fixed number between the
positions in the menu. There are 5 icons and 5 positions, so I use an array
of 5 objects that contain css properties(left, top, zIndex, width, height
and opacity) of each position. The problem with calling .animate() once is
that each icon has to move through an adjacent position before moving on to
the destination. If I call .animate() only once with the final destination,
it will move in a direct line which is not a desired effect.
On Wed, Jan 14, 2009 at 5:52 AM, Karl Swedberg k...@englishrules.comwrote:

 Is it possible to have a variable for the number of pixels by which the
 menu animates (and doubling it when necessary), rather than calling animate
 twice?
 Also, .animate() is part of jQuery core, so you've posted to the correct
 group. ;-)

 --Karl

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




 On Jan 13, 2009, at 4:29 PM, Miloš Rašić wrote:

 Here's the function I use to rotate the menu:
 http://paste.pocoo.org/show/99509/
 The icons are located inside divs with ids 'pos_1' through 'pos_5', 'pos_1'
 being the leftmost icon, and 'pos_5' being the rightmost icon. The all have
 class 'pos'.

 The problematic case occurs when the user clicks on 'pos_1' or 'pos_5' and
 the menu has to be rotated by 2 steps. rotate() is then called twice, and so
 the call to .animate() is executed twice for each div. I can't use a single
 call to .animate() because then the divs would jump directly to their final
 destination instead of passing through adjacent positions.

 I've tried the following alternatives:

 1) Using queue: false and using the second call with setTimeout so that it
 is executed just before the first animation completes.

 2) Using queue: true as in original code but calling .stop() a fraction of
 a second before the first animation completes on its own so that it is
 interrupted and the second animation in the queue starts immediately.

 3) Putting the second call to .animate() in the callback function of the
 first animate.

 All of these alternatives produced exactly the same results as the original
 code. The rotating menu makes a noticeable pause after the first animation
 before proceeding with the second.

 On Tue, Jan 13, 2009 at 8:20 PM, Nikola nik.cod...@gmail.com wrote:


 It's hard to tell without having a look at the code.  You may want to
 try http://paste.pocoo.org to post code like this.

 Are you chaining the animations? ie. $(this).animate({},speed).animate
 ({},speed).animate({},speed);

 You could always try setting a delay on your second animation with
 setTimeout.

 setTimeout ('$(this).animate({},speed)', 400);

 Hope that helps.
 Nikola






[jQuery] Re: [validate plugin] Conflict in using validation plugin with custom submit code

2009-01-14 Thread Fledder

Jorn,

Thank you for responding. I seem to have been wrong in the information
I provided:

The form DOES submit, but it does it so fast that it is hard to see.
Normally the submit would cause a redirect. The reason it is not
redirecting is because my back-end PHP script relies on the post
containing the submit button name, which it doesn't.

Luckily I can quite easily work around this in my situation. I know
you are aware of the submit button name issue from other threads in
this forum. It's perhaps not really a bug, but I would definitely see
it as an improvement if it would be fixed.

Either way, I'm helped for now, thanks again for such a great plugin!

On Jan 14, 11:26 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Could you post a complete testpage? Looks like your extracts are
 missing something...

 Jörn

 On Wed, Jan 14, 2009 at 12:00 AM, Fledder ferdy.christ...@gmail.com wrote:

  hi,

  Like others I seem to have ran into the double-click to submit
  problem. Allow me to explain:

  I have a registration form which validates just fine using the
  excellent validate plugin. It's working perfectly. However, I now want
  to run some custom code after the validation event. Specifically, I
  want to disable the submit button when validation is passed. After
  that, a normal post should follow to the server, no Ajax post.

  My first try was to do this:

  // disable the submit button upon submit event
  $(#frmEditUser).submit(
         function()      {
            $(#submSave).attr(disabled,true).attr(value, Updating,
  please wait...);
         }
  );

  // validation code follows here
  $(#frmEditUser).validate({
  ..

  This indeed changes the submit button and validation still works.
  However, it does not submit the form to the server, instead, nothing
  happens. My 2nd try was to use the validation plugin's submitHandler.
  Mind you this code is a bit long, but I think only the bottom part is
  relevant:

  $(#frmEditUser).validate({
                 onkeyup:false,
                 rules: {
                         username: {
                                 required:true,
                                 minlength:5,
                                 maxlength:45,
                                 validChars:true,
                                 
  usernameCheck:[$(#username).val(),oldusername]        // remote check
  for duplicate username
                         }
                 },
                 messages: {
                         username: {
                                 required: username is required.,
                                 minlength: jQuery.format(username must be 
  at least {0} characters
  in length.),
                                 maxlength: jQuery.format(username can not 
  exceed {0} characters
  in length.),
                                 validChars: please supply valid characters 
  only.,
                                 usernameCheck:this username is already in 
  use.
                         }
                 }
                 ,
                 submitHandler: function(form) {
                         // do other stuff for a valid form
                         $(#submSave).attr(disabled,true).attr(value, 
  Updating,
  please wait...);
                         form.submit();
                 }

         });

  This approach I have seen elsewhere in the forum, but it does not work
  for me. Validation runs fine, yet when the form is valid it once more
  does not actually post it to the server. It does post when I double-
  click (only when I uncomment the button-disabling code, otherwise I
  cannot double-click).

  So my question in general is: how can I have my own custom submit code
  that does not conflict with the validation plugin and that does an
  actual post? I thoroughly looked through the forum but I still do not
  see the solution.

  I will be very grateful for a solution, I've spent so many precious
  hours on accomplishing such a small thing (disabling a submit button).
  Thanks in advance!


[jQuery] jQuery website errors

2009-01-14 Thread brian

FYI, this page currently is throwing a DBQueryError:

http://docs.jquery.com/UI/Tabs


[jQuery] Re: In this code, what would $(this) in the success part refer to?

2009-01-14 Thread Rick Faircloth
You and I both know, Charlie, from this group and especially from CF-Talk

that there are ways to do encouraging education and then there are ways

to commit discouraging education.  It's all in the tone of the reply.

 

Personally, I think it's time for jQuery to take the route of CF-Talk

and begin a jQuery beginners list, as well.  It's hard for one list to serve

the needs of such a wide range of experience and competence.

 

Experienced users get frustrated with repeated basic questions, and beginners

get frustrated with the lack of understanding and patience with their needs.

 

If there is a list for jQuery-Newbies-en., then anyone who signs up for

that list knows what kind of interaction and questions to expect.

 

For jQuery to survive and thrive in the long-run, the community must make

beginners feel welcome.  Even using the resources of a community, such as the

docs, takes some time for beginners to figure out and understand.  Especially

since the docs have been a little sketchy on explanation and helping someone

brand new to concepts understand the implications and what's written between

the lines of code.

 

So, bring on the new jQuery-Newbies-en list!

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Charlie Griefer
Sent: Wednesday, January 14, 2009 11:33 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: In this code, what would $(this) in the success part 
refer to?

 

but educating someone in how to ask a good question really -is- helping them :) 

 

http://www.catb.org/~esr/faqs/smart-questions.html

 

On Wed, Jan 14, 2009 at 4:24 AM, donb falconwatc...@comcast.net wrote:


I don't know what can be more discouraging that the standard 'use
google' or 'that question has been asked/answered too many times'
discussion.  Folks, this is a discussion forum.  People range from
novice to expert.  The experts eventually get tired of answering a
novice question and get testy about it.  And it invariable degrades
into name-calling.  Besides, searching for 'this' will be a futile
exercise because the word is just too common..

Searching is only going to be successful when you can formulate a good
search query.  But as pointed out, there usually are a bunch of
'answers' that may be misleading, create further questions, are just
wrong, or they may appear to be nonapplicable for some reason.  Even
when the answer is found, it may not be recognized.  The documentation
is not perfect and I find the examples are often quite trivial and
sometimes ambiguous.  And often we have people whose primary language
is not English and they may struggle (or fail) to translate those
answers into their own language. (Yes, I know this is the jQuery-
English forum)

There's no need to lecture anyone on 'proper' use of the forum,
particularly when the lecture/lecturer also goes contrary to decent
and/or proper use of the forum.  As has been shown above, the effort
it takes to lecture typically far exceeds the effort it takes to
assist.

Still a good motto: 'if you can't say something nice then don't say
anything at all.'




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



[jQuery] No element found when firing $.post()

2009-01-14 Thread Thomas

Hello together,

just a short question: by firing a request via POST to the server side
Firefox shows an No element found (in German Kein Element
gefunden) in its Error console (Firebug displays nothing). Example:

$.post(/Portal/ReorderPortlets, { portlets: $(#portal).sortable
(toArray) });

I am a bit confused, could anyone bring some light into this?

Thanks :)

Thomas


[jQuery] jQIR - jQuery Image Replacement IE Problem

2009-01-14 Thread Wile E. Coyote

If I disable javascript in IE 7 I get a runtime error. I guess I don't
know enough about this plugin to understand why I'm getting an error
if javascript is disabled.

Ideally, if Javascript is disabled, the image shouldn't be replaced at
all and the header should show up with no errors.

Any help?


[jQuery] distance to mouse (..position)

2009-01-14 Thread paul


i as wondering if anyone could give me a hint on how to let something
happen to
an object that's within a certain distance to the cursor.

i know something like that happens in the mac os x dock
but i would like to that in 2d, in a table with images.



[jQuery] Performance penalty for creating dom element from a string?

2009-01-14 Thread thomasvsundert

Hi,
the new documentation for jQuery 1.3 states that:

To create a span use $(span/). As of jQuery 1.3 this syntax is
completely equivalent to $(document.createElement(span)).

First of all, what does this mean? What was the difference before?

My real question is, what is the performance penalty for using $(div/
) vs $(document.createElement(div))

thanks,
Thomas


[jQuery] new Jquery Cheat Sheet

2009-01-14 Thread ericb...@gmail.com

Is there a new Jquery cheat sheet for 1.3?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to 
jquery-en+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] New VisualStudio version of 1.3 already :-)

2009-01-14 Thread MorningZ

Wow are people fast

http://blogs.ipona.com/james/archive/2009/01/14/jquery-1.3-and-visual-studio-2008-intellisense.aspx

hope that helps


[jQuery] Re: jQuery website errors

2009-01-14 Thread Kean

Also
http://docs.jquery.com/Frequently_Asked_Questions

On Jan 14, 9:40 am, brian bally.z...@gmail.com wrote:
 FYI, this page currently is throwing a DBQueryError:

 http://docs.jquery.com/UI/Tabs


[jQuery] Re: Jquery 1.2.3 does not return a type for radio controls?

2009-01-14 Thread Scott Sharkey


Karl Swedberg wrote:
hmm. that doesn't sound right to me. I just put up a test page using 
jQuery 1.2.3, and it identified radio controls just fine:


http://test.learningjquery.com/123.html

Can we see the HTML? Maybe something else is going on.


div id=job_template
fieldset
label for=jt_textfield id=jt_textfield_labelText/label
input type=text name=jt_textfield id=jt_textfield size=30
br /
input type=checkbox name=jt_check1 id=jt_check1This is checkbox 1
br /
input type=checkbox name=jt_check2 id=jt_check2This is checkbox 2
br /
label for=jt_textfield2 id=jt_textfield2_labelSecond Text/label
input type=text name=jt_textfield2 id=jt_textfield2 size=30
/fieldset
table
  tbody
tr
  tdinput name=jt_dist_r_lo value=NY type=radioNY/td
  tdinput name=jt_dist_r_lo value=OH type=radioOH/td
  tdinput name=jt_dist_r_lo value=PA type=radioPA/td
/tr
  /tbody
/table
textarea name=jt_textarea id=jt_textarea rows=2 cols=20
/textarea
/div

Same problem with the textarea, by the way.

Here's the javascript...  (note, this is from a genshi template - 
${job.description} is a url string that encodes the names of the 
controls and their values, like so:


jt_textfield=this%20is%20textjt_checkbox1=onjt_dist_r_lo=OHjt_textarea=this%20is%20a%20textarea 




var jt_values = ${job.description};
var els = jt_values.split('amp;');
$.each(els, function() {
var items = this.split(=);
var item = # + items[0];
var item_val = decodeURIComponent(items[1]);

switch ( $(item).attr('type') ) {
case 'radio': alert(item +  is radio);
break;
case 'checkbox': $(item).attr(checked,checked);
break;
case 'text': $(item).val(item_val);
break;
case 'textarea': $(item).val(item_val);
alert(item +  is textarea =  + item_val);
break;
default:
alert(item+'unknown type:'+$(item).attr('type'));
}

I'm getting undefined in the alert for unknown type on both jt_dist_r_lo
and jt_textarea


[jQuery] Re: @name deprecated?

2009-01-14 Thread Micky Hulse

Excellent! Thanks Dave (and all!)

I really appreciate all the help. :)

On Jan 13, 3:40 pm, Dave Methvin dave.meth...@gmail.com wrote:
  So, just to clarify, 1.3 is where @name becomes deprecated?

 The @attr has been deprecated (advised to be avoided) for some time;
 1.3 is where it is no longer supported.

  Should I go ahead and make the @name change if I am still using
  1.2.6... Or, should I wait until I upgrade to 1.3.x?

 Since 1.2.x works without the @, go ahead and do it now.


[jQuery] stock price ticker plugin?

2009-01-14 Thread mark

hi guys,
i am looking for a stock price ticker plugin, that will change color
of the price green or red, and also change in real time.
do you guys know any plugins or any other suggestions for this?
thanks


[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread AdrianMG

YEAH BABY

On Jan 14, 3:45 pm, John Resig jere...@gmail.com wrote:
 Hey Everyone -

 jQuery 1.3 is out! Full details 
 here:http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/

 Happy 3rd Birthday, jQuery!

 --John


[jQuery] Re: Using position

2009-01-14 Thread Russ

dont worry, its my own doing - i had an alert in the calling function
to display the position code.

On Jan 14, 4:15 pm, Russ rustyj...@xtra.co.nz wrote:
 I have this function (below) which im using to show a div (progress)
 and center it over another div (diary) on my page as some ajax is
 called.

 It all works, except that it always pops an alert showing the
 position jquery function. Anyone else had this problem using
 position??

 function ShowProgress() {
     var diaryTop = $(#diary).position()[top];
     var diaryLeft = $(#diary).position()[left];
     var diaryWidth = $(#diary).width();
     var diaryHeight = $(#diary).height();
     var progressWidth = $(#progress).width();
     var progressHeight = $(#progress).height();
     var x = (Math.round(diaryWidth / 2) - Math.round(progressWidth /
 2)) + diaryLeft;
     var y = (Math.round(diaryHeight / 2) - Math.round(progressHeight /
 2)) + diaryTop;
     $(#progress).css({ position:absolute,left: x, top:y });
     $(#progress).toggle();

 }


[jQuery] Re: jQuery 1.3 Released

2009-01-14 Thread Ashley

I just read the release info and changes and I must say I'm impressed
and pleased in equal measure. I'm a Perl hacker who came to jQuery
because I find its syntax natural and it reminds me of Perl in that
you can code how you think. I am amazed that the kit/community is
doing so many things so right (like opening the selector engine).

I was starting to look at ExtJS for some bigger projects but the way
things are going I'd rather take the time to write a plugin or two
with jQuery for anything that I would have wanted from ExtJS.

...just three years. Terrific.

-Ashley

On Jan 14, 6:45 am, John Resig jere...@gmail.com wrote:
 Hey Everyone -

 jQuery 1.3 is out! Full details 
 here:http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/

 Happy 3rd Birthday, jQuery!

 --John


[jQuery] When to use LiveQuery plugin

2009-01-14 Thread ocptime

Hi all,

I had seen a new plugin called LiveQuery and i have some questions
that are not yet completely answered when i read its documentation.

I am using jquery.form.plugin, My questions is when to use livequery
and what is it's advantages.
is it possible to use livequery in conjention with the form plugin.

can u pls cite me a small sample code or some pointers on the web
where both are used.

Thanks in advance
ocptime


  1   2   >