[jQuery] Re: Best regex for this, getting software version numbers

2007-10-26 Thread d . wachss
At first glance, I thought he needed to escape the '.' the way you have it, but he doesn't since the [^.] matches everything that isn't a period, so the wildcard '.' has to match only a real period, so [^.]+.? [^.]+ works. Still, I think \. makes it clearer. Danny On Oct 26, 8:34 am, Flesler

[jQuery] Re: showing / hiding divs based on location hash, proposed solution

2007-10-22 Thread d . wachss
That seems like a lot of work. Why not $(function(){ /* shorthand for $(document).ready(function(){ */ $('#aboutContent div').hide(); /* hide all div's */ $(location.hash).show(); /* the hash (with the # sign) is the same as the CSS selector for an ID (that's why it was chosen) */ } To

[jQuery] Re: showing / hiding divs based on location hash, proposed solution

2007-10-22 Thread d . wachss
Well, it could be shorter :) $(function(){ $('#aboutContent div').not(location.hash).hide(); }); Danny On Oct 22, 9:40 am, stef [EMAIL PROTECTED] wrote: i previously asked about a way to hide and show divs based on the location hash value. so if the url is domain.com/page.php#contact then

[jQuery] Re: How to dynamically load javascript from a database instead of using getscript?

2007-10-17 Thread d . wachss
wouldn't eval(text) work, once you get the text from the database? Danny On Oct 16, 11:07 am, Mark Lacas [EMAIL PROTECTED] wrote: I have looked high and low and can only find references for dynmically loading javascript using ajax from a file. I have chunks of javascript that I want to keep

[jQuery] Re: Syntax for bind using a string from a variable for the callback functions name

2007-10-17 Thread d . wachss
The following worked for me (IE 6, FF2): function lock (){ alert(0); } var str = 'lock'; alert (window[str]); (window[str])(); first alerted the function definition, then executed the function. So it seems that window[click_func] is the function itself; don't append () when passing it to bind.

[jQuery] Re: when Javascript is disabled...

2007-10-12 Thread d . wachss
The term of art is Progressive Enhancement. There's lots of good advice on techniques to implement it; try http://www.google.com/search?q=progressive+enhancement Danny Wachsstock On Oct 11, 8:19 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I found JQuery very easy to use and start to

[jQuery] Re: How to iterate and manipulate an object

2007-10-11 Thread d . wachss
I would be very wary of assuming that the for loop goes Last In First Out. To quote the Mozilla docs (http://developer.mozilla.org/en/docs/ Core_JavaScript_1.5_Reference:Statements:for...in): A for...in loop iterates over the properties of an object in an arbitrary order. It may work correctly

[jQuery] Re: NEWS: 217 Sites Using jQuery and Growing

2007-05-24 Thread d . wachss
You can add youngisrael-stl.org (a synagogue in St. Louis)--uses jQuery for lots of effects and enhancements Danny Wachsstock On May 23, 7:32 pm, Rey Bango [EMAIL PROTECTED] wrote: I just wanted to let everyone know that the list of sites continues to grow. We are currently at 217 sites (that

[jQuery] Re: path and selectors

2007-04-27 Thread d . wachss
My quickie one-liner: $.fn.getPath = function(){ return $.map (this.add(this.parents()), function(el) { return el.tagName + (el.className ? '.'+el.className : ''); }).reverse().join(' '); } On Apr 27, 6:59 am, Alexandre Plennevaux [EMAIL PROTECTED] wrote: hello! i would like to know

[jQuery] Re: path and selectors

2007-04-27 Thread d . wachss
Oooh..that's a much harder problem than the one originally presented. jQuery supports the :nth-child() selector; you want a string that uniquely selects 'this' . The following ought to work: (function ($){ function toString(el){ console.log (el); var ret = el.tagName.toLowerCase();

[jQuery] Re: Body Browser Classes

2007-04-06 Thread d . wachss
On Apr 4, 10:48 pm, Glen Lipka [EMAIL PROTECTED] wrote: Feedback desired: !-- Old Internet Explorer -- Lately, I have been developing CSS and HTML for a deep Web 2.0 complex app. Usually, I avoid CSS hacks like the plague. But recently, I have had to resort to the Holly Hack or the