[jQuery] Re: jQuery API Reference in CHM

2007-12-07 Thread Cloudream

thanks a lot. ^^ jquery.com is slow in China, this is pretty useable

On 12月7日, 下午5时49分, char101 [EMAIL PROTECTED] wrote:
 Hi,

 This is (yet another, if there is any) API reference of jQuery in CHM
 format

 http://charupload.wordpress.com/2007/12/07/jquery-documentation-chm/

 The pages are taken directly fromhttp://docs.jquery.com/Main_Page
 because I unfortunately know that there is a documentation in xml
 after creating the CHM :P

 --
 Charles


[jQuery] accessible edit in place

2007-12-07 Thread Johan_S

Hello.

Is there a way / plugin to have this plugin work the other way
around ?

http://www.appelsiini.net/projects/jeditable/default.html

If JS is turned off, i want the form controls to be visible on the
page so you can use them.

If JS is turned on, i want to activate them with a click/mouse over.

I want the controls to be hidden and accessible on a need-to-use
basis. If they're straight on the page from the beginning, it will
feel like they should be filled out..
If JS is turned off I have no choice but to show them, and that's fine
in that situation.

Thanks!

Best
Johan

---

Johan Sjöstrand
Interaction Designer

Phone: +46-(0)8-410 352 24
Mobile: +46-(0)709-27 52 24

www.doberman.se

---



[jQuery] Problem selecting a table row

2007-12-07 Thread Kirov

Hello Dear Reader,

I am stuck with the following problem. I've read the whole
documentation of jQuery about traversing and selecting DOM nodes and
found that i can select all nodes that contain a certain type of node
- the example was $('p[a]'); all paragraphs that contain a link
(anchor). But for my surprise i was unable to select a table row which
contains a table header like this $('tr[th]').
I have the following data structure
table border=1 class=rates
trthDescription/th/tr
trtdxxx/td/tr
trtdxxx/td/tr
trtdxxx/td/tr
trtdxxx/td/tr
trthDescription/th/tr
trtdxxx/td/tr
trtdxxx/td/tr
trtdxxx/td/tr
trtdxxx/td/tr

and i want to .remove() all rows that contain th but the proposed
selector tr[th] isn't useful
please help
Thank you in advance,
Kiril Kirov



[jQuery] Re: jChess

2007-12-07 Thread aldur

I'm in the process of setting up my web site again.

it will be on the http://www.bloodmoongames.com site when the new
version goes up.

I've had to move hosting companies.



[jQuery] Re: Can figure out the diference between input button and button

2007-12-07 Thread Marcelo Wolfgang





Thanks a mix between the button type="button" and the tip about my form
beeing submit before the ajax help me figure out what was the problem.

Ryan wrote:

  My question has been hijacked with another!  :)


On Dec 6, 4:36 pm, "Jake McGraw" [EMAIL PROTECTED] wrote:
  
  
Perhaps try button type="button" ... instead of button type="submit"


Haven't tested, but it looks like maybe your form is trying to submit before
the AJAX gets a chance to resolve.

- jake

On Dec 6, 2007 1:53 PM, Marcelo Wolfgang [EMAIL PROTECTED] wrote:





  Hi list
  


  Long time lurker, first time poster, so here it goes:
  


  I have a simple form that call a $.get, if I have a input
type="button" my code works but if I have a button/button it
doesn't ... can anyone tell me what I'm doing wrong? here's the code:
  


 script type="text/_javascript_" src=""/script
   script type="text/_javascript_"
   $(document).ready(function(){
   $("#btSubmit").click(function () {
  var id = $("#user_id").val();
  var number2 = $('#number2').attr('value');
  $.get("a_edit.php", { userid: id, number2: number2 },
  function(data){
 alert("Data Loaded: " + data);
 $("#edit_response").append(data);
  });
  });
   });
   /script
  


  and the html that works
  


 form
   input type="hidden" name="user_id" id="user_id" value="10" /
   input type="button" id="btSubmit" value="=" /
   /form
   div id="edit_response"/div
  


  and the html that don't work:
  


 form
   input type="hidden" name="user_id" id="user_id" value="10" /
   button type="submit" id="btSubmit"img
src="" width="94" height="16" alt="subit
form" //button
   /form
   div id="edit_response"/div
  


  TIA
Marcelo Wolfgang
  

  
  
  






[jQuery] Re: jQuery 1.2.1 errors with Interface

2007-12-07 Thread ProxyDev

I'm having the same issue.  If anyone figures this out .. please let
us know.

Thanks!  :)

On Nov 27, 12:31 am, SimonRaven [EMAIL PROTECTED] wrote:
 On Nov 19, 7:40 am, alexanmtz [EMAIL PROTECTED] wrote:



  Im having the same issue, if you fix the problem, please report
  here...

  I'll do the same when I discovered...

  On Nov 5, 9:28 pm, Nicolae Namolovan [EMAIL PROTECTED] wrote: I'm doing

   $('#some').SlideInRight(500);

   The effect is working, but after I start to get millions of the same
   errors into console:

   this.options.curAnim has no properties
   ../js/jquery-1.2.1.js
   Line 2833

 hello, I'm getting that error too, in the svn checkout, line 3023:

 3018 if ( t  this.options.duration + this.startTime ) {
 3019 this.now = this.end;
 3020 this.pos = this.state = 1;
 3021 this.update();
 3022
 3023 this.options.curAnim[ this.prop ] = true;
 3024
 3025 var done = true;
 3026 for ( var i in this.options.curAnim )
 3027 if ( this.options.curAnim[i] !== true )
 3028 done = false;

 *just* updated about half hour ago, same error, same line i think
 even.


[jQuery] Re: jQuery API Reference in CHM

2007-12-07 Thread [EMAIL PROTECTED]

Thank you, much useful.

On Dec 7, 6:49 am, char101 [EMAIL PROTECTED] wrote:
 Hi,

 This is (yet another, if there is any) API reference of jQuery in CHM
 format

 http://charupload.wordpress.com/2007/12/07/jquery-documentation-chm/

 The pages are taken directly fromhttp://docs.jquery.com/Main_Page
 because I unfortunately know that there is a documentation in xml
 after creating the CHM :P

 --
 Charles


[jQuery] Re: fxFade + tabsRotate

2007-12-07 Thread Klaus Hartl

On 6 Dez., 14:48, RamoNMol [EMAIL PROTECTED] wrote:
 Okay guys, kinda new to this whole discussiongroup thing, so if i'm
 completely posting something in the wrong section or anything, then
 please forgive fot my ignorance..

 I have a small problem with the tabsRotate function from jQuery, it
 all works fine except the order of witch the tabs rotate in is kinda
 messed up. At first i just used the #fragment-1 id's from the demo,
 but they had the same problem.

 I'd really apprecieate the effort if anyone would be so kind to check
 it out for me, cause when it comes to javascript i'm kind off a
 retard. You can find it athttp://fmnewmedia.nl/project/wrnl/(it's at
 the right bar beneeth .Klassement (and yes i know the design still
 sucks for IE6, planning on sorting that out though)

 This is what i put into my head code.

Ramon, what exactly do you mean by messed up? I just checked with IE
7 (I don't have any other browser at hand right now) and to me it
lpoks like it's working as expected...


--Klaus


[jQuery] Re: Strange unwanted delay problem

2007-12-07 Thread Trond Ulseth

Hi Glen,

The reason that you can't reproduce the problem is because someone
else fixed it for me.
It is now working just like I want it to.

Sorry about that. I should have thought about coming in here to
notify.

Best regards,
Trond



On Dec 6, 7:22 pm, Glen Lipka [EMAIL PROTECTED] wrote:
 I am having trouble reproducing the error.  I see a different weird
 behavior.
 Hover on the links or not doesnt seem to change this.

 If I mouse over the column and mouseout before it finishes animating, then
 it never closes.

 Could you elaborate a little on the problem you are seeing?
 I am in FF

 Glen

 On Dec 6, 2007 5:03 AM, Trond Ulseth [EMAIL PROTECTED] wrote:



  Hello all,

  I have several div's which are animated on mouseover:

  $('.pan').mouseover(function() {
 $(this).animate( { marginLeft:-182px }, 1000);
  });

  I then have another div laying behind the animated ones that on a
  mouseover reverts the animation:

  $('##pancontainer').mouseover(function() {
 $('#pan1').animate( { marginLeft:0px }, 200);
 $('#pan2').animate( { marginLeft:0px }, 200);
 $('#pan3').animate( { marginLeft:0px }, 200);
 $('#pan4').animate( { marginLeft:0px }, 200);
 $('#pan5').animate( { marginLeft:0px }, 200);
 $('#pan6').animate( { marginLeft:0px }, 200);
  });

  So far so good - it works like a charm.

  Then inside the animated divs I put several links. Now if I hover over
  one or more of the links inside the div before taking the mouse of -
  the function which reverts the animation is several seconds delayed.
  If i just mouseover the div without hovering the link it works like it
  should.

  This is driving me mad, as I can't understand why it behaves like
  this. I don't have any other jquery or js scripts other than the ones
  above.

  You can have a look yourselves athttp://intern.idl.no:65241

  If anyone could help me solve this I'd appreciate it very much.


[jQuery] jQuery API Reference in CHM

2007-12-07 Thread char101

Hi,

This is (yet another, if there is any) API reference of jQuery in CHM
format

http://charupload.wordpress.com/2007/12/07/jquery-documentation-chm/

The pages are taken directly from http://docs.jquery.com/Main_Page
because I unfortunately know that there is a documentation in xml
after creating the CHM :P

--
Charles


[jQuery] UI: Autogenerated tabs

2007-12-07 Thread Gordon

I am looking into using jQuery for implementing tabs.  Up to now we've
been using the Tabber library (www.barelyfitz.com/projects/tabber/),
and have been happy with the unobtrusive tabs it creates.  However, we
have a minor nightmare of javascripts from disparate libraries
scattered all over our website, some Prototype, some Behaviour, some
Javascript, some others from various other sources, and it seems
sensible to scrap as much of the cruft as possible and standardize on
a single library.  Due to its flexibility and light weight it would
seem that jQuery plus jq plugins is the way to go.

However, as far as I can determine, the UI tabs plugin isn't as
unobtrusive as the tabber library, as tabber will generate all the tab
markup, whereas UI tabs requires for there to be markup for the tabs
in the HTML.  Teh approach that tabber takes is the preferred
behaviour because we don't want any markup for tabs to appear in the
HTML (other than class=tabber) if the user has javascript turned
off.

Is the UI library capable of recreating the tabber library
functionality and create its own elements to act as tabs? If so, how
do I do it?


[jQuery] Re: accessible edit in place

2007-12-07 Thread Christian Bach
Hi,

Just extact the value of the input fields and replace it with a text node.

This is untested but should work:
$(input:text).each(function() {
var $this=$(this);
$this
.after($(p/p)
.html($this.val()))
.hide();
});

/c

2007/12/7, Johan_S [EMAIL PROTECTED]:


 Hello.

 Is there a way / plugin to have this plugin work the other way
 around ?

 http://www.appelsiini.net/projects/jeditable/default.html

 If JS is turned off, i want the form controls to be visible on the
 page so you can use them.

 If JS is turned on, i want to activate them with a click/mouse over.

 I want the controls to be hidden and accessible on a need-to-use
 basis. If they're straight on the page from the beginning, it will
 feel like they should be filled out..
 If JS is turned off I have no choice but to show them, and that's fine
 in that situation.

 Thanks!

 Best
 Johan

 ---

 Johan Sjöstrand
 Interaction Designer

 Phone: +46-(0)8-410 352 24
 Mobile: +46-(0)709-27 52 24

 www.doberman.se

 ---




[jQuery] Re: jQuery API Reference in CHM

2007-12-07 Thread Nguyễn Quốc Vinh
Thank in advance! I'm in Vietnam! I don't have adsl at home! i must go to
internet cafe and spent much money!

2007/12/7, Cloudream [EMAIL PROTECTED]:


 thanks a lot. ^^ jquery.com is slow in China, this is pretty useable

 On 12月7日, 下午5时49分, char101 [EMAIL PROTECTED] wrote:
  Hi,
 
  This is (yet another, if there is any) API reference of jQuery in CHM
  format
 
  http://charupload.wordpress.com/2007/12/07/jquery-documentation-chm/
 
  The pages are taken directly fromhttp://docs.jquery.com/Main_Page
  because I unfortunately know that there is a documentation in xml
  after creating the CHM :P
 
  --
  Charles




-- 
-
Khi bàn luận nghiêm túc:
1) Lòng tự ái càng cao thì lòng tự trọng càng thấp.
2) Tôi chưa thấy bao giờ có nghĩa là kiến thức còn hạn hẹp.
3) Đâu/ai mà chẳng thế đồng nghĩa với sự đoán mò  vơ đũa cả nắm.
/

Nguyễn Quốc Vinh
59/29 Duy Tân - Huế
+84-975001226
+84-988433498


[jQuery] Re: Code feedback... Callbacks for timing...

2007-12-07 Thread Jake McGraw
What are you trying to accomplish with load()? From the documentation:

http://docs.jquery.com/Events/load

I don't see any reference to the usage you're attempting.

- jake

On Dec 6, 2007 8:34 PM, Micky Hulse [EMAIL PROTECTED] wrote:


 Hi all, I hope my question is not too silly... I just wanted to get a
 little feedback -- basically wondering what I am doing wrong here:

 ...snip...
 $('#' + what).fadeOut('slow', function() {
 $(this).load(this.href, {'targ': what}, function() {
 $(this).fadeIn('slow');
 });
 });
 ...snip...

 Basically, I want to fade-out a div, then .load(), then fade the div
 back in... The above code is returning errors, but I am not sure what
 I am doing wrong.

 I can post more code if need be.

 Any help, tips, rtfm's, and/or links would be spectacular. :)

 Many TIA's.
 Cheers,
 Micky



[jQuery] Re: hiding page elements instantly on page load

2007-12-07 Thread KidsKilla .grin! wuz here
I think it's better to do like that:

html
head
  style
  .js .myclass{display:none;}
  /style
/head
body
  script
  document.body.className+=' js';
  /script
  ul class=myclass ...

2007/12/6, bytte [EMAIL PROTECTED]:

 Hi guys,

 I use php to fetch a menu out of a mysql database. Basically the menu
 is made up of a lot of nested unordered lists (ul). I'm using jQuery
 to hide any submenu. This means that when a user visits the webpage he
 only sees the first ul. When he clicks a li, the submenu (again an
 ul) is shown.

 This works great on my localhost. However, when I publish online I
 experience a problem: on page load the whole ul is shown for a
 second, including all nested ul submenu's, before it is hidden by
 jQuery. I guess this is because all ul elements need to be loaded
 into the DOM before the jQuery code is started?

 Is there anything I can do to solve this problem?

 Thanks for any advice!



-- 
Максим Игоревич Гришаев,
AstroStar.ru


[jQuery] newbie - validationAide and submit

2007-12-07 Thread gazzar

I am using dnaides validationAide and need some help.

I am building a web app and need to do client side validation before
commiting data into a postgresql database.

I am using validationAide to validate, but need to change the
pagelayout once part of the page is valid. To cut a long story short,
the user fills out some purchase order information and cannot continue
ordering products until all purchase order information is validated.
Once this information is validated I hide this part of the screen
(form) when the submit button is clicked and display the second form,
then need to continue the validation and submitting of data again.

I hope I have made enough sense for someone to help me. I am very
tired and need to get some sleep now.

Thanks in advance.


[jQuery] different in IE and Firefox

2007-12-07 Thread [EMAIL PROTECTED]

i have this code:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
  script src=http://code.jquery.com/jquery-latest.js;/script

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

$(button).click(function () {
  var text = $(this).val();
  $(input).val(text);
});
  });
  /script
  style
  button { margin:4px; cursor:pointer; }
  input { margin:4px; color:blue; }
  /style
/head
body
  div
button value='feed0'feed/button
button value='feed1'the/button
button value='feed2'Input/button
  /div
  input type=text value=click a button /
/body
/html

when i click the buttonfeed, it feedbackfeed0 in FireFox, but
feed in IE.
my question is:
1. do you know why?
2. how to make sure to get only feed0 either in IE or FireFox?

thanks!


[jQuery] i am getting design problem while using jquery plugin

2007-12-07 Thread sranabhat

i frequently getting design problem (css) while using jquery plugin.
so how can i overcome these problems while using jquery plugins.


[jQuery] Select type upon jeditable start

2007-12-07 Thread bhays

I'd like to have jEditable, or jQuery, auto select all the type in the
input that I am going to edit.  I am basically looking for the same
effect of clicking on the URL address bar in a browser.  Select all on
first click, then let the user decide what they will edit.

I really have no idea how to approach this...

Thanks!

ben


[jQuery] Re: [NEWS] Getting jQuery Adopted in Corporations

2007-12-07 Thread 1Marc

I guess I should digg my own post, hehe.  Thanks for the mention, Rey!

On Dec 6, 6:31 pm, Guy Fraser [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
  Although I keep coming up against the following:

  1. Is jQuery going to be here for the long term?
  2. Why not use prototype, what are the benefits of jQuery over it?

 We're hitting those two questions on a regular basis. The first is
 pretty easy to deal with - jQuery is growing rapidly both in terms of
 available plugins and sites using it. It also has books, blogs and
 vibrant community.

 As for the second one, that's a problem. Prototype is entrenched in a
 lot of organisations and developers don't like ditching their tried and
 tested libraries for something new.

 However, in certain circumstances Prototype is a major nightmare because
 it's not namespaced - drop it in to a portal environment and generally
 everything goes pearshaped.

 Guy


[jQuery] Re: Select type upon jeditable start

2007-12-07 Thread Mika Tuupola



On Dec 7, 2007, at 9:06 AM, bhays wrote:


I'd like to have jEditable, or jQuery, auto select all the type in the
input that I am going to edit.  I am basically looking for the same
effect of clicking on the URL address bar in a browser.  Select all on
first click, then let the user decide what they will edit.


* @param String  options[select]true or false, when true text is  
highlighted


--
Mika Tuupola
http://www.appelsiini.net/



[jQuery] Re: jChess

2007-12-07 Thread Chris Jordan
Sweet! Thanks for the update. :o)

Chris

On Dec 7, 2007 6:38 AM, aldur [EMAIL PROTECTED] wrote:


 I'm in the process of setting up my web site again.

 it will be on the http://www.bloodmoongames.com site when the new
 version goes up.

 I've had to move hosting companies.




-- 
http://cjordan.us


[jQuery] Re: Problem selecting a table row

2007-12-07 Thread Glen Lipka
I whipped up a demo for you.
http://www.commadot.com/jquery/selectorHas.php

Where I figured it out:
http://docs.jquery.com/Selectors/has#selector
Desc: Matches elements which contain at least one element that matches the
specified selector.

Selector page.  Is this the one you looked at?
http://docs.jquery.com/Selectors/

Hope this helps,

Glen

On Dec 7, 2007 5:54 AM, Kirov [EMAIL PROTECTED] wrote:


 Hello Dear Reader,

 I am stuck with the following problem. I've read the whole
 documentation of jQuery about traversing and selecting DOM nodes and
 found that i can select all nodes that contain a certain type of node
 - the example was $('p[a]'); all paragraphs that contain a link
 (anchor). But for my surprise i was unable to select a table row which
 contains a table header like this $('tr[th]').
 I have the following data structure
 table border=1 class=rates
 trthDescription/th/tr
 trtdxxx/td/tr
 trtdxxx/td/tr
 trtdxxx/td/tr
 trtdxxx/td/tr
 trthDescription/th/tr
 trtdxxx/td/tr
 trtdxxx/td/tr
 trtdxxx/td/tr
 trtdxxx/td/tr

 and i want to .remove() all rows that contain th but the proposed
 selector tr[th] isn't useful
 please help
 Thank you in advance,
 Kiril Kirov




[jQuery] Re: UI: Autogenerated tabs

2007-12-07 Thread Sam Sherlock
I would try using jquery wrap to add the tab mark up to the html before
initializing tabs
http://docs.jquery.com/Manipulation/wrap

On 07/12/2007, Gordon [EMAIL PROTECTED] wrote:


 I am looking into using jQuery for implementing tabs.  Up to now we've
 been using the Tabber library (www.barelyfitz.com/projects/tabber/),
 and have been happy with the unobtrusive tabs it creates.  However, we
 have a minor nightmare of javascripts from disparate libraries
 scattered all over our website, some Prototype, some Behaviour, some
 Javascript, some others from various other sources, and it seems
 sensible to scrap as much of the cruft as possible and standardize on
 a single library.  Due to its flexibility and light weight it would
 seem that jQuery plus jq plugins is the way to go.

 However, as far as I can determine, the UI tabs plugin isn't as
 unobtrusive as the tabber library, as tabber will generate all the tab
 markup, whereas UI tabs requires for there to be markup for the tabs
 in the HTML.  Teh approach that tabber takes is the preferred
 behaviour because we don't want any markup for tabs to appear in the
 HTML (other than class=tabber) if the user has javascript turned
 off.

 Is the UI library capable of recreating the tabber library
 functionality and create its own elements to act as tabs? If so, how
 do I do it?



[jQuery] redundancy - dimensions plugin and toggle?

2007-12-07 Thread Priest, James (NIH/NIEHS) [C]

I've got some toggle code where I want to check the height of something
using the dimensions plugin and am not sure the best way to do this:

$('.container').toggle(
function() {

$(this).removeClass('right').addClass('down');

// check height of window and if too
tall - show bottom nav
if ($('#wrapper').height()  400) {
$('#bottomnav').show();
} else {
$('#bottomnav').hide();
};
},
function() {

$(this).removeClass('down').addClass('right');

// check height of window and if too
tall - show bottom nav
if ($('#wrapper').height()  400) {
$('#bottomnav').show();
} else {
$('#bottomnav').hide();
};
});

Seems like I should be able to simplify the height check instead of
doing everything twice??? 

Thanks,
Jim


[jQuery] validation in IE6

2007-12-07 Thread [EMAIL PROTECTED]

I am using the validation and forms plgin together like that:

script type=text/javascript
$(document).ready(function() {
var options = {
target:'.cfjq_form_target1',
   beforeSubmit: function(){
 $('.cfjq_form_target1').empty();
 $('.loading1').show();
 },
   success: function() {
   $('.loading1').hide();
   }
  };
$(.cfjq_form1).validate({
errorContainer: $(.messageBox1),
errorLabelContainer: $(.messageBox1 ul),
   wrapper: li,
submitHandler: function(form) {
 $(form).ajaxSubmit(options);
   }
 });
});
/script

IE6 simply tell me that the line
$(.cfjq_form1).validate({

the object to not accept the method.


Any idea

I am using metadata, validation 1.1.1 and jquery 1.2.1

Thanks

Andrea


[jQuery] Re: Code feedback... Callbacks for timing...

2007-12-07 Thread Micky Hulse

Hi Wizzud, thanks for the comprehensive reply... The information you
provided should be very helpful to me... I am at work now, but plan on
fix'n up my code later tonight. :)

I will work on things a bit further and report back with my findings.

Again, many thanks! I really appreciate your time and help.

Cheers,
Micky

On Dec 7, 3:24 pm, Wizzud [EMAIL PROTECTED] wrote:
 There's a difference in the origin of your href between the initial
 code that 'worked' and the first posted re-try that didn't.

 In the first one - the working code, as was -

 // 'this' must be referring to some element, say X
 $('#' + this.rel) // select some other element, say Y
   .fadeOut('slow') // fade out Y
   .load( this.href  // load into Y using X.href ...
  , {targ: this.rel} // ...setting param targ as X.rel
  , function() { // 'this' refers to Y
 $(this).fadeIn('slow'); // fade in Y

 });

 In the second one - the first posted -

 $('#' + what) // select some element, say Y
   .fadeOut( 'slow' // fade out Y
  , function() { // 'this' refers to Y
 $(this)
.load( this.href // load into Y using Y.href...
   , {targ: what} // ...setting param targ as what
   , function() { // 'this' refers to Y
 $(this).fadeIn('slow'); // fade in Y
   });
   });

 It's logical to assume that X and Y are different elements otherwise
 there is no point in the initial select [ $('#'+this.rel) ]. So, one
 uses X.href and the other uses Y.href.

 Apart from that, I can see no reason why the callback version should
 not work ( except that I would unquote targ, ie {targ:what}, not
 {'targ':what} )

 On Dec 7, 8:51 pm, Dave Methvin [EMAIL PROTECTED] wrote:

  Your original code looked okay to me

  BTW, this is the docs on ajax load, the other is the load event
  binding.

 http://docs.jquery.com/Ajax/load

  What error are you getting? The diff with the working version seems to
  point to a problem with the fadeOut callback...


[jQuery] framing

2007-12-07 Thread mokeur

I would like to know if it is possible to protect one of my framed
website page for being framed by another site.
Thanks


[jQuery] Re: Code feedback... Callbacks for timing...

2007-12-07 Thread Micky Hulse

Hi Dave, thanks for the feedback, I really appreciate your help. :)

Here is my code again:

$('.paginate li  a').livequery('click', function(event) {
what = this.rel;
$('#' + what).fadeOut('slow', function() {
$(this).load(this.href, {'targ': what}, function() {
$(this).fadeIn('slow');
});
});
return false;
});

When I click .paginate, this error keeps repeating itself over-and-
over (via Firebug), like the script is in an endless loop:

g has no properties
in jquery-1.2.1.pack... (line 11)

Also, as you can see (and if it helps), I am using the LiveQuery
plugin:

http://brandonaaron.net/docs/livequery/

I can post a link to my test page if you think it would be helpful. :)

A billion thanks!
Cheers,
Micky

On Dec 7, 12:51 pm, Dave Methvin [EMAIL PROTECTED] wrote:
 Your original code looked okay to me

 BTW, this is the docs on ajax load, the other is the load event
 binding.

 http://docs.jquery.com/Ajax/load

 What error are you getting? The diff with the working version seems to
 point to a problem with the fadeOut callback...


[jQuery] Re: Code feedback... Callbacks for timing...

2007-12-07 Thread Wizzud

There's a difference in the origin of your href between the initial
code that 'worked' and the first posted re-try that didn't.

In the first one - the working code, as was -

// 'this' must be referring to some element, say X
$('#' + this.rel) // select some other element, say Y
  .fadeOut('slow') // fade out Y
  .load( this.href  // load into Y using X.href ...
 , {targ: this.rel} // ...setting param targ as X.rel
 , function() { // 'this' refers to Y
$(this).fadeIn('slow'); // fade in Y
});

In the second one - the first posted -

$('#' + what) // select some element, say Y
  .fadeOut( 'slow' // fade out Y
 , function() { // 'this' refers to Y
$(this)
   .load( this.href // load into Y using Y.href...
  , {targ: what} // ...setting param targ as what
  , function() { // 'this' refers to Y
$(this).fadeIn('slow'); // fade in Y
  });
  });

It's logical to assume that X and Y are different elements otherwise
there is no point in the initial select [ $('#'+this.rel) ]. So, one
uses X.href and the other uses Y.href.

Apart from that, I can see no reason why the callback version should
not work ( except that I would unquote targ, ie {targ:what}, not
{'targ':what} )

On Dec 7, 8:51 pm, Dave Methvin [EMAIL PROTECTED] wrote:
 Your original code looked okay to me

 BTW, this is the docs on ajax load, the other is the load event
 binding.

 http://docs.jquery.com/Ajax/load

 What error are you getting? The diff with the working version seems to
 point to a problem with the fadeOut callback...


[jQuery] Re: validation in IE6

2007-12-07 Thread [EMAIL PROTECTED]

Hi Guy,

i solved the 2 matters:

1) The validation in IE6 is solved by the new 1.2 version. I found
that in the jorn repository files.

2) maybe I lost something but i was using an old metadata plugin but i
really did not see in any place a notice for a new release.
Installing the new one ( the object is now metadata and not meta ) as
before all was fine.

Andrea

On Dec 7, 2:47 pm, Guy Fraser [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
  I am trying with validator 1.2 and metadata and I get an issue in all
  the browsers :

  jQuery(element).metadata is not a function

  Any help??

 I'm guessing the plugin is assuming that you have the metadata plugin
 installed and borks when it's missing. That being said, it should really
 check to see if metadata is there before calling it?


[jQuery] Re: Show/Hide Div with checkbox options providing same results

2007-12-07 Thread Dave Methvin


 It is shorter, but it just doesn't seem quite as jQuery-ish. ;)

I always figured that there was a good reason for the this object
being a bare DOM object in callbacks, events, and .each loops. jQuery
doesn't try to hide the DOM, but it's just a $(this) away when you
really need it.

If you prefer the jQuery methods, you can still get a one-liner:

$(#+$(this).attr(class))[$(this).is(:checked)?show:hide]();



[jQuery] Re: validation in IE6

2007-12-07 Thread Guy Fraser

[EMAIL PROTECTED] wrote:
 I am trying with validator 1.2 and metadata and I get an issue in all
 the browsers :

 jQuery(element).metadata is not a function

 Any help??
   
I'm guessing the plugin is assuming that you have the metadata plugin 
installed and borks when it's missing. That being said, it should really 
check to see if metadata is there before calling it?


[jQuery] Re: UI vs Interface

2007-12-07 Thread Philippe Rathe

I've been sad to see that you cannot augment the global Object
prototype using Drag or Drop (at least those two) of the Interface
plugin.
I've look in the code and see that there is many loops over the global
Object without any check over the identifier, taking my function as
if it were I don't know what but causing fatal bug because it was
not the function anticipated.

I'll look over the UI plugin.



On Nov 13, 8:26 am, Takis [EMAIL PROTECTED] wrote:
 Hi!

 It has been stated in the discussion What plugins are ready for prime
 time that

 Interface should be superceded by UI soon. Currently both lack the
 quality of code and documentation that jQuery provides.

 by J rn Zaefferer!

 Is there any official truth to that? Or is it just a personal
 estimation? Many of us linger between these 2 plugins and, frankly,
 they do seem similar. Interface seems more complete and is around
 longer, but UI is labeled as an Official plugin.

 So, any directions..?

 Takis
 -


[jQuery] Re: Problem selecting a table row

2007-12-07 Thread Glen Lipka
One followup.
tr[th] would only find something like this:

tr th=foo

The stuff in the brackets are attributes, not child elements.

Glen

On Dec 7, 2007 7:48 AM, Glen Lipka [EMAIL PROTECTED] wrote:

 I whipped up a demo for you.
 http://www.commadot.com/jquery/selectorHas.php

 Where I figured it out:
 http://docs.jquery.com/Selectors/has#selector
 Desc: Matches elements which contain at least one element that matches the
 specified selector.

 Selector page.  Is this the one you looked at?
 http://docs.jquery.com/Selectors/

 Hope this helps,

 Glen


 On Dec 7, 2007 5:54 AM, Kirov  [EMAIL PROTECTED] wrote:

 
  Hello Dear Reader,
 
  I am stuck with the following problem. I've read the whole
  documentation of jQuery about traversing and selecting DOM nodes and
  found that i can select all nodes that contain a certain type of node
  - the example was $('p[a]'); all paragraphs that contain a link
  (anchor). But for my surprise i was unable to select a table row which
  contains a table header like this $('tr[th]').
  I have the following data structure
  table border=1 class=rates
  trthDescription/th/tr
  trtdxxx/td/tr
  trtdxxx/td/tr
  trtdxxx/td/tr
  trtdxxx/td/tr
  trthDescription/th/tr
  trtdxxx/td/tr
  trtdxxx/td/tr
  trtdxxx/td/tr
  trtdxxx/td/tr
 
  and i want to .remove() all rows that contain th but the proposed
  selector tr[th] isn't useful
  please help
  Thank you in advance,
  Kiril Kirov
 
 



[jQuery] Re: Problem selecting a table row

2007-12-07 Thread Karl Swedberg



On Dec 7, 2007, at 11:41 AM, Glen Lipka wrote:

One followup.
tr[th] would only find something like this:

tr th=foo

The stuff in the brackets are attributes, not child elements.


Just to clarify ...

This is correct as of jQuery 1.2. However, in previous versions (for  
example, the version that ships with Drupal), tr[th] is the correct  
syntax. It's XPath, and XPath selectors were dropped in 1.2 in favor  
of their CSS counterparts (but can be re-added with the xpath plugin).



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





[jQuery] Re: ClueTip - local content without attribute

2007-12-07 Thread FrenchiINLA

I haven't test it but it makes sense to me.
$('.green').cluetip(#msg1);

On Dec 7, 1:46 pm, rolfsf [EMAIL PROTECTED] wrote:
 I'm using ClueTip, and loading the content  from some hidden divs
 using the default rel attribute.

 Is there a way I can do this without using the rel attribute?

 For example:
 I have some cells in a table:

 td class=greena href=blah99/a/td
 td class=reda href=blah99/a/td

 and some hidden divs:
 div id=msg1this is green/div
 div id=msg2this is red/div

 If I hover over an anchor inside a td with class=green, then I want
 to grab the content from div#msg1. Can I do this without having to
 add  rel=#msg1 to every green anchor?

 Thanks!


[jQuery] Re: Looking for a faster way

2007-12-07 Thread Shawn

I was able to implement some of the changes you recommended.  I did away 
with the .each() bit, switched to using tr#ID instead of tr[id=], and 
stored the commonly used bits in temporary variables (one search then, 
multiple references).  The end result is that the code is a lot cleaner 
looking, but performance wise still about the same.

You suggested doing the manipulations in memory.  I'm not clear how I 
might do this.  Would doing something like
var theTable = $(#mytable).clone() be a good starting point?  Then I 
can do the manipulations on $(theTable), and later do a 
$(#mytable).replace(theTable).  Does that make sense?  Otherwise, I'm 
not sure how to get the existing table into memory and avoid rendering 
updates for each of the changes.

Other than that, I think my only real option is to change what data I'm 
getting back from the server.  Instead of creating the rows on the fly 
like I currently am, I *could* have the server side code return an 
object that contains the row string already.  Then instead of doing 250+ 
task placements, I would just need to replace 50ish rows which should be 
a LOT faster I think.  But that's just moving the processing to the 
server side, where I'll still have to deal with performance problems (a 
different sort though at that point).

Any thoughts/input?  Thanks in advance.

Shawn

Suni wrote:
 There is a lot to optimize there.
 
 I'm sure most of the overhead comes from the each-loop. There is
 propably other stuff to optimize too, but this looks like where you
 could benefit the most. Lets quickly go through some problems:
 
 $(.crewSchedule tr[id=' + cur.employee_id + '] . + lbl)
 
 Your selector string becomes something like .crewSchedule
 tr[id='35'] .1-Jan-2007. Selecting by attribute value is slow, and
 you'll propably get a lot faster by simplifying your selector string
 to $('#' + cur.employee_id + ' .'+ lbl) or #35 .1-Jan-2007
 respectively. This lets jQuery find the tr-element straightforward by
 it's id (which is the fastest possible selection since browsers give
 us the native getElementById functionality).
 
 var q = parseInt($(this).children(.qty).text()) + 1;
 $(this).children(.qty).text(q);
 $(this).children(.detail).html(task.summary(cur));
 
 - Here you have many calls to $(this). While not terribly slow, it's
 unnecessary. Each call wraps the tr-element inside a jQuery object,
 which takes some time, and you do it three times.
 
 - You also search the rows children for elements with class .qty 2
 times, when one would be enough.
 
 Try this instead:
 ---
 var row_element = $(this);   // Now we only need to wrap the tr-
 element in the jQuery object once, and use that from then on
 var qty_element = row_element.children(.qty);   // Same with
 the .qty-element(s?)
 var q = parseInt(qty_element.text() + 1);
 qty_element.text(q);
 row_element.children(.detail).html(task.summary(cur));
 ---
 
 These might give you some boost in performance. Just a few extra
 notes:
 
 - Dom-access, selections and manipulations are _slow_. If you were to
 iterate through the data and manipulate it while the data is inside a
 pure javascript object or array it would be much faster. Going through
 the DOM looking for elements and then updating them one by one is
 terrible in performance compared to just looping over objects
 properties and manipulating those.
 
 - Avoid selecting elements inside loops or other code that runs often.
 If necessary, make sure the selector strings are as optimized as
 possible. The best way is to always use an id-selector, as it is the
 fastest. If at all possible, give unique id's to elements from server
 side, or at least keep the DOM-tree inside such elements shallow for
 quicker selections inside them.
 
 - Your script now propably goes through all the data and HTML before
 giving anything to the user. You can greatly improve the perceived
 speed of the script if you give the processed data to the user row by
 row, as soon as it is ready. That way the user starts seeing stuff
 immediately. The trick to achieve this is to use recursive functions
 that use setTimeout with 0ms delays when calling themselves. This
 frees the browsers rendering engine to draw the necessary stuff in
 between the cycles, instead of waiting for the whole thing to finish.
 
 HTH


[jQuery] Re: redundancy - dimensions plugin and toggle?

2007-12-07 Thread Wizzud

Your 2 toggles are simply swapping 'right' and 'down' classes around,
otherwise they are the same. So you could just use a click handler,
and toggleClass on 'right' and 'down'.
Eg.

$('.container').click(function(){
$(this).toggleClass('right').toggleClass('down');
// check height of window and if too tall - show bottom nav
$('#bottomnav')[$('#wrapper').height()  400 ? 'show' : 'hide']();
  });

On Dec 7, 6:21 pm, Priest, James (NIH/NIEHS) [C]
[EMAIL PROTECTED] wrote:
 I've got some toggle code where I want to check the height of something
 using the dimensions plugin and am not sure the best way to do this:

 $('.container').toggle(
 function() {

 $(this).removeClass('right').addClass('down');

 // check height of window and if too
 tall - show bottom nav
 if ($('#wrapper').height()  400) {
 $('#bottomnav').show();
 } else {
 $('#bottomnav').hide();
 };
 },
 function() {

 $(this).removeClass('down').addClass('right');

 // check height of window and if too
 tall - show bottom nav
 if ($('#wrapper').height()  400) {
 $('#bottomnav').show();
 } else {
 $('#bottomnav').hide();
 };
 });

 Seems like I should be able to simplify the height check instead of
 doing everything twice???

 Thanks,
 Jim


[jQuery] Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

2007-12-07 Thread cfdvlpr

Am I the only one with IE 7 that has noticed this problem?  I'm using
IE 7.0.5730.11


[jQuery] ClueTip - local content without attribute

2007-12-07 Thread rolfsf

I'm using ClueTip, and loading the content  from some hidden divs
using the default rel attribute.

Is there a way I can do this without using the rel attribute?

For example:
I have some cells in a table:

td class=greena href=blah99/a/td
td class=reda href=blah99/a/td

and some hidden divs:
div id=msg1this is green/div
div id=msg2this is red/div

If I hover over an anchor inside a td with class=green, then I want
to grab the content from div#msg1. Can I do this without having to
add  rel=#msg1 to every green anchor?

Thanks!


[jQuery] Remove class from an element x, by clicking on y or z?

2007-12-07 Thread El Magnifico

Hi,

Although I figured out the part to add/remove class to an element:

$(li.x).click(function(){
var $this = $(this);
if( $this.is('.xshown') ) {
$this.removeClass('xshown');
$this.addClass('xhidden');
}
else {
$this.removeClass('xhidden');
$this.addClass('xshown');
}
return false;
});

...now I just need to know how I can remove the class from say x click
on y or z instead of having to click again on x to remove the class?

Many Thanks.


[jQuery] Re: ClueTip - local content without attribute

2007-12-07 Thread Karl Swedberg


Hi Rolf,

The way it's set up now, it requires some sort of attribute to know  
where to find the content. It doesn't have to be the rel attribute if  
you use the tipAttribute option.


One thing you could do is set the value of that attribute in your  
script. For example, this would set the name attribute of all td  
class=green to #msg1 and then apply the clutip to them:


$('td.green').attr({name: '#msg1'}).cluetip({tipAttribute: 'name',  
local: true});



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



On Dec 7, 2007, at 4:46 PM, rolfsf wrote:



I'm using ClueTip, and loading the content  from some hidden divs
using the default rel attribute.

Is there a way I can do this without using the rel attribute?

For example:
I have some cells in a table:

td class=greena href=blah99/a/td
td class=reda href=blah99/a/td

and some hidden divs:
div id=msg1this is green/div
div id=msg2this is red/div

If I hover over an anchor inside a td with class=green, then I want
to grab the content from div#msg1. Can I do this without having to
add  rel=#msg1 to every green anchor?

Thanks!




[jQuery] Re: Nice post about jQuery Selectors by Ben Sterling

2007-12-07 Thread Rey Bango


:)

Benjamin Sterling wrote:

Thanks Rey.

On 12/7/07, *Rey Bango* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:



http://benjaminsterling.com/jquery-what-are-the-fastest-selector/

Rey




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


[jQuery] Re: Nice post about jQuery Selectors by Ben Sterling

2007-12-07 Thread Benjamin Sterling
Thanks Rey.

On 12/7/07, Rey Bango [EMAIL PROTECTED] wrote:


 http://benjaminsterling.com/jquery-what-are-the-fastest-selector/

 Rey




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


[jQuery] Interface plugin + Object.prototype.anyPropertyName = BUG

2007-12-07 Thread Philippe Rathe

I've been trying the Interface Sortables module that requires the Drag
and Drop modules and got bugs when I decided to augment the Object
prototype.

I've looked at each of the code of those 3 files and realize that
there was a loop over the Object properties (maybe indirectly by the
jQuery object) and realize that my function were call, whatever name I
give it using the Object.prototype augmentation. That was the reason
of the crash.


I've filter the the result to not call my function name and I do not
have those error message in firebug anymore.

Is the design of the Interface plugin bad?

I don't know for now if ti comes from jQuery or Interface.

That was kind of error firebug gave me:

jQuery.iDrop.highlighted[i].get is not a function   (idrop.js line
168)


[jQuery] Re: Code feedback... Callbacks for timing...

2007-12-07 Thread Micky Hulse

Hi Jake, thanks for the reply, I really appreciate your help. :)

Here is a version of my code that works:

$('#' + this.rel).fadeOut('slow').load(this.href, {'targ': this.rel},
function() {
$(this).fadeIn('slow');
});

Where 'targ' is a post variable.

Basically, I would like to wait for my first effect to finish
(fadeOut), then '.load()', then (fadeIn)... Maybe I should read more
about '.animate()'? Or maybe I should be working with callbacks via
'.ajaxStart()' / '.ajaxStop()'?

I just assumed that I could put .load() within a callback function of
'fadeOut()'... so, once the fade out effect is finished, I then load
my content... Then, once loaded, the callback fades the newly loaded
content back in.

I think I just need to play around a bit more. :)

I feel like I am on right track, cut just wanted to get a little
feedback from ya'll.

Many TIA's,
Cheers,
Micky


[jQuery] jqModal: how to get the attribute of the trigger link?

2007-12-07 Thread pixeline

hi friends!

i would like to use the jqModal plugin in an addressbook-like
application, where, from the list of contacts, clicking on an icon
next to a contact show the full contact information in a jqModal
window.

the html  i have is unobtrusive:


a href=fetch_contact_details.app.php?contact_id=8 title=Click to
read all  contact data class=view jqModalnbsp;nbsp;/a

jqModal gets its parameters like this:

$().ready(function() {
  $('#ex2').jqm({ajax: 'examples/2.html', trigger: 'a.ex2trigger'});
});

so what i need is to replace 'examples/2.html' by the value of $
(trigger).attr('href')

But i'm either not seeing the obvious or it seems like it is not
possible because jqModal extends the modal window element (receiving
the loaded data), not the clicked element - the trigger.


$('#modalWindow').jqm({ajax: $(this).attr('href'), trigger:
'a.jqModal'});

does not make the ajax call work.


Any idea how i can make it work? jqModal is a wonderful plugin i would
hate to have to use thickbox again.

thanks,

Alexandre



[jQuery] Re: Show/Hide Div with checkbox options providing same results

2007-12-07 Thread Dave Methvin

   $(#+this.className).[(this.checked?show:hide)]();

Belay that, try this:

$(#+this.className)[this.checked?show:hide]();

I'm always making code longer than it has to be. :)


[jQuery] Re: Show/Hide Div with checkbox options providing same results

2007-12-07 Thread Dave Methvin

 I kept thinking, hmm, I think this should be  shorter.

Wouldn't this work? (I haven't tried it.)

$(input:checkbox).click(function(){
  $(#+this.className).[(this.checked?show:hide)]();
});

I am pretty sure all the browsers support .className and .checked as
properties.


[jQuery] Re: jQuery 1.2.1 errors with Interface

2007-12-07 Thread Philippe Rathe

For those having those bugs, are you augmenting the Object.prototype
anywhere in your code?

Because I realize that doing something like:

Object.prototype.anyFunctionName = function () { // any code }

Were making Interface crash.

It the Interface code I realize that it calls my function whatever
name I gave it, maybe bacause and iteration over all properties of the
Object properties.
The only check I see before executing all those functions is it it
wasn't null.

I will start to look over the official  jQuery UI plugin as a
replacement.


On Dec 7, 10:56 am, ProxyDev [EMAIL PROTECTED] wrote:
 I'm having the same issue.  If anyone figures this out .. please let
 us know.

 Thanks!  :)

 On Nov 27, 12:31 am, SimonRaven [EMAIL PROTECTED] wrote:

  On Nov 19, 7:40 am, alexanmtz [EMAIL PROTECTED] wrote:

   Im having the same issue, if you fix the problem, please report
   here...

   I'll do the same when I discovered...

   On Nov 5, 9:28 pm, Nicolae Namolovan [EMAIL PROTECTED] wrote: I'm doing

$('#some').SlideInRight(500);

The effect is working, but after I start to get millions of the same
errors into console:

this.options.curAnim has no properties
../js/jquery-1.2.1.js
Line 2833

  hello, I'm getting that error too, in the svn checkout, line 3023:

  3018 if ( t  this.options.duration + this.startTime ) {
  3019 this.now = this.end;
  3020 this.pos = this.state = 1;
  3021 this.update();
  3022
  3023 this.options.curAnim[ this.prop ] = true;
  3024
  3025 var done = true;
  3026 for ( var i in this.options.curAnim )
  3027 if ( this.options.curAnim[i] !== true )
  3028 done = false;

  *just* updated about half hour ago, same error, same line i think
  even.


[jQuery] Nice post about jQuery Selectors by Ben Sterling

2007-12-07 Thread Rey Bango


http://benjaminsterling.com/jquery-what-are-the-fastest-selector/

Rey


[jQuery] Re: validation in IE6

2007-12-07 Thread [EMAIL PROTECTED]

I am trying with validator 1.2 and metadata and I get an issue in all
the browsers :

jQuery(element).metadata is not a function

Any help??

andrea

On Dec 7, 12:52 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 I am using the validation and forms plgin together like that:

 script type=text/javascript
 $(document).ready(function() {
 var options = {
 target:'.cfjq_form_target1',
beforeSubmit: function(){
  $('.cfjq_form_target1').empty();
  $('.loading1').show();
  },
success: function() {
$('.loading1').hide();
}
   };
 $(.cfjq_form1).validate({
 errorContainer: $(.messageBox1),
 errorLabelContainer: $(.messageBox1 ul),
wrapper: li,
 submitHandler: function(form) {
  $(form).ajaxSubmit(options);
}
  });});

 /script

 IE6 simply tell me that the line
 $(.cfjq_form1).validate({

 the object to not accept the method.

 Any idea

 I am using metadata, validation 1.1.1 and jquery 1.2.1

 Thanks

 Andrea


[jQuery] Re: Code feedback... Callbacks for timing...

2007-12-07 Thread Dave Methvin

Your original code looked okay to me

BTW, this is the docs on ajax load, the other is the load event
binding.

http://docs.jquery.com/Ajax/load

What error are you getting? The diff with the working version seems to
point to a problem with the fadeOut callback...


[jQuery] Re: Show/Hide Div with checkbox options providing same results

2007-12-07 Thread Glen Lipka
It is shorter, but it just doesn't seem quite as jQuery-ish. ;)

Glen

On Dec 7, 2007 1:13 PM, Dave Methvin [EMAIL PROTECTED] wrote:


$(#+this.className).[(this.checked?show:hide)]();

 Belay that, try this:

 $(#+this.className)[this.checked?show:hide]();

 I'm always making code longer than it has to be. :)