[jQuery] Re: jQuery 1.3.x XPath

2009-02-06 Thread Neil Craig

Mmmm, haven't tried that. Thanks!

On Jan 29, 8:33 am, Klaus Hartl klaus.ha...@googlemail.com wrote:
 On 29 Jan., 06:05, Neil Craig neil.big.cr...@gmail.com wrote:

  I have tried it, but it yields no results when searching for elements.

  What I loved about the xpath functionality was that I could have used
  the same functions on XML documents, not only on XHTML.

 Huh? CSS selectors will also work with XML.

 --Klaus


[jQuery] Re: Recommendation Required - Custom Classes Library

2009-02-06 Thread Neil Craig

Note, that this applies to Mootools 1.11. I haven't touched version
1.2+, I'm sure they differ a lot.

On Jan 23, 2:30 pm, Balazs Endresz balazs.endr...@gmail.com wrote:
 Then what if you just use Class.Extras and all its dependencies as it
 is? Now that sounds too easy :)

 On Jan 23, 9:21 am, Neil Craig neil.big.cr...@gmail.com wrote:

  I am not sure how Mootools 1.2+ is constructed but version 1.11 can
  easily be broken into pieces that excludes the parts that extend the
  DOM/HTML elements. The files that one should use is:

  Core, Class, Class.Extras, String, Number, Function, Array

  On Jan 21, 11:58 am, Balazs Endresz balazs.endr...@gmail.com wrote:

   I only heard about this one, looks a bit different from Mootools but
   much smaller:http://www.danwebb.net/2008/1/31/low-pro-for-jquery

   Though I wonder if it's possible to port the whole Mootools
   implementation to jQuery? You can maybe keep some parts of Core,
   Native and Class, and hack it to work with jQuery ... now that sounds
   like a whole new framework :)
   I don't know Mootools that much at all but maybe it's not as hard as
   it sounds...

   On Jan 21, 8:18 am, Neil Craig neil.big.cr...@gmail.com wrote:

Bump :)

On Jan 20, 10:36 am, Neil Craig neil.big.cr...@gmail.com wrote:

 I was wondering, which Custom Classes Library is best to use along
 with jQuery. Up to now, I've been using Mootools to create custom
 classes that can be easily extended through its inheritance model. It
 also has custom events that I have used extensively.

 Which library do you recommend that has the same functionality as
 described above that can co-exist with jQuery peacefully?

 This could make for an interesting discussion


[jQuery] jQuery 1.3.x XPath

2009-01-28 Thread Neil Craig

Earlier version of jQuery allowed one to search for elements using
XPath, but after the implementation of the Sizzler selector engine,
the XPath support was lost, or so it seems.

Any comments?


[jQuery] Re: jQuery 1.3.x XPath

2009-01-28 Thread Neil Craig

I have tried it, but it yields no results when searching for elements.

What I loved about the xpath functionality was that I could have used
the same functions on XML documents, not only on XHTML.

I suppose another feature that has been lost is the custom psuedo
selectors.

On Jan 28, 3:54 pm, Karl Swedberg k...@englishrules.com wrote:
 On Jan 28, 2009, at 6:43 AM, Neil Craig wrote:



  Earlier version of jQuery allowed one to search for elements using
  XPath, but after the implementation of the Sizzler selector engine,
  the XPath support was lost, or so it seems.

  Any comments?

 Hi Neil,

 You're right that 1.3.x removed support for the [...@attr] syntax, but it  
 had been deprecated already for a long time. Using [attr] will achieve  
 the same thing.

 As of jQuery 1.2 (released Sept. 24, 2007), basic XPath such as  
 location path expressions, was removed. There is an XPath  
 compatibility plugin for those expressions 
 athttp://plugins.jquery.com/project/xpath/
   . Is that no longer working for you?

 --Karl
 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com


[jQuery] Re: Recommendation Required - Custom Classes Library

2009-01-23 Thread Neil Craig

I am not sure how Mootools 1.2+ is constructed but version 1.11 can
easily be broken into pieces that excludes the parts that extend the
DOM/HTML elements. The files that one should use is:

Core, Class, Class.Extras, String, Number, Function, Array

On Jan 21, 11:58 am, Balazs Endresz balazs.endr...@gmail.com wrote:
 I only heard about this one, looks a bit different from Mootools but
 much smaller:http://www.danwebb.net/2008/1/31/low-pro-for-jquery

 Though I wonder if it's possible to port the whole Mootools
 implementation to jQuery? You can maybe keep some parts of Core,
 Native and Class, and hack it to work with jQuery ... now that sounds
 like a whole new framework :)
 I don't know Mootools that much at all but maybe it's not as hard as
 it sounds...

 On Jan 21, 8:18 am, Neil Craig neil.big.cr...@gmail.com wrote:

  Bump :)

  On Jan 20, 10:36 am, Neil Craig neil.big.cr...@gmail.com wrote:

   I was wondering, which Custom Classes Library is best to use along
   with jQuery. Up to now, I've been using Mootools to create custom
   classes that can be easily extended through its inheritance model. It
   also has custom events that I have used extensively.

   Which library do you recommend that has the same functionality as
   described above that can co-exist with jQuery peacefully?

   This could make for an interesting discussion


[jQuery] jQuery.support IE6 or later

2009-01-21 Thread Neil Craig

I fully understand why support detection is considered much better
than browser sniffing. But I have yet to see a way to detect the flash/
selectbox bleed-through issue that exists in IE version 6 or earlier.

For that reason, I think that jQuery.browser should be maintained in
future releases of jQuery.


[jQuery] Class selectors not working when using jQuery 1.3 with Mootools 1.11

2009-01-20 Thread Neil Craig

Hi

I'm working on a project that used to implement Mootools 1.11. It has
been decided however that we switch over to jQuery since it is much
faster and more light-weight.

However, because we have created numerous widgets in Mootools, we
still have to use it while the jQuery equivalent widgets are being
developed. We have implemented the noConflict method with various
degrees of success.

We have noticed that after upgrading from jQuery 1.2.6 to 1.3, that
using the old Mootools 1.11 along with jQuery, renders the class
selector useless.

Executing something like jQuery(.myClass) or jQuery(div.myClass)
returns an error: context.getElementsByClassName is not a function.
It occurs in the following section:

if ( document.documentElement.getElementsByClassName ) {
Expr.order.splice(1, 0, CLASS);
Expr.find.CLASS = function(match, context) {
return context.getElementsByClassName(match[1]);
};
}

Strangely enough the expression if
( document.documentElement.getElementsByClassName ) yields a result
of true, but context.getElementsByClassName is still undefined. The
context in this case is the document object itself.

I'm suspecting that it has got something to do with Mootools that is
throwing a spanner into the works. Has anyone encountered a similar
problem? Or has anyone got some comments on the subject?


[jQuery] Recommendation Required - Custom Classes Library

2009-01-20 Thread Neil Craig

I was wondering, which Custom Classes Library is best to use along
with jQuery. Up to now, I've been using Mootools to create custom
classes that can be easily extended through its inheritance model. It
also has custom events that I have used extensively.

Which library do you recommend that has the same functionality as
described above that can co-exist with jQuery peacefully?

This could make for an interesting discussion


[jQuery] Re: loading jquery

2009-01-20 Thread Neil Craig

This link might help

http://ajaxpatterns.org/On-Demand_Javascript

On Jan 20, 10:39 am, slava mikerin.sl...@gmail.com wrote:
 Hi,
 I am loading jQuery from a script inside a page and need to execute
 next function right after jQuery loads. What would be the best way to
 do this?
 So far I have tried using a timer to check if jQuery == 'undefined'


[jQuery] Re: Class selectors not working when using jQuery 1.3 with Mootools 1.11

2009-01-20 Thread Neil Craig

Thanks, that sorted out the problem.

On Jan 20, 12:08 pm, Balazs Endresz balazs.endr...@gmail.com wrote:
 This was mentioned on the jquery-dev group or somewhere else, I don't
 remember exactly. It's about Mootools not extending properly the
 document object I think, I'm sure it has been fixed in the trunk.

 I suspect this is 
 it:http://github.com/jeresig/sizzle/commit/0a9df6e0b68a91dd1f59bfd6e7941...

 On Jan 20, 3:26 am, Neil Craig neil.big.cr...@gmail.com wrote:

  Hi

  I'm working on a project that used to implement Mootools 1.11. It has
  been decided however that we switch over to jQuery since it is much
  faster and more light-weight.

  However, because we have created numerous widgets in Mootools, we
  still have to use it while the jQuery equivalent widgets are being
  developed. We have implemented the noConflict method with various
  degrees of success.

  We have noticed that after upgrading from jQuery 1.2.6 to 1.3, that
  using the old Mootools 1.11 along with jQuery, renders the class
  selector useless.

  Executing something like jQuery(.myClass) or jQuery(div.myClass)
  returns an error: context.getElementsByClassName is not a function.
  It occurs in the following section:

  if ( document.documentElement.getElementsByClassName ) {
      Expr.order.splice(1, 0, CLASS);
      Expr.find.CLASS = function(match, context) {
          return context.getElementsByClassName(match[1]);
      };

  }

  Strangely enough the expression if
  ( document.documentElement.getElementsByClassName ) yields a result
  of true, but context.getElementsByClassName is still undefined. The
  context in this case is the document object itself.

  I'm suspecting that it has got something to do with Mootools that is
  throwing a spanner into the works. Has anyone encountered a similar
  problem? Or has anyone got some comments on the subject?


[jQuery] Re: Recommendation Required - Custom Classes Library

2009-01-20 Thread Neil Craig

Bump :)

On Jan 20, 10:36 am, Neil Craig neil.big.cr...@gmail.com wrote:
 I was wondering, which Custom Classes Library is best to use along
 with jQuery. Up to now, I've been using Mootools to create custom
 classes that can be easily extended through its inheritance model. It
 also has custom events that I have used extensively.

 Which library do you recommend that has the same functionality as
 described above that can co-exist with jQuery peacefully?

 This could make for an interesting discussion


[jQuery] Disable/Enable jQuery Added Events

2008-11-27 Thread Neil Craig

Something I would like to do is to add several events handlers to an
element and control the firing by enabling  disabling it. For
example:

jQuery(.sample).click(function() { // do something }).disable();

Clicking should not fire the event until jQuery(.sample).enable()
has been called.

Have anyone done something similar?