[jQuery] Re: Question on : syntax

2009-07-02 Thread waseem sabjee
correction to my dotnet cod namespace mynamespace { public class myclass{ void hideElemen(string elementName)t { elementName.visibility = false; } } } } On Thu, Jul 2, 2009 at 8:21 PM, waseem sabjee wrote: > it is similar do dotnet yes > > JS > == > var mynamespace = function() { > r

[jQuery] Re: Question on : syntax

2009-07-02 Thread waseem sabjee
it is similar do dotnet yes JS == var mynamespace = function() { return { hide : function(o) { var obj = document.getElementById(o); o.style.display = 'none' } } }(); dot net C# == namespace mynamespace { void hideElemen(string elementName)t { elementName.visibility = false; }

[jQuery] Re: Question on : syntax

2009-07-02 Thread waseem sabjee
i will use simple terms when i say namespace lets call our namespace bmw this should be a little simpler. someone decides to create bmw as namespace or brand name now one of the functions or perks of this is that you can paint it a certain color. you could say it's like create your own brand name

[jQuery] Re: Question on : syntax

2009-07-02 Thread expresso
what is meant by a namespace. I view namespace as like in .NET classes, is this the same concept? On Jul 2, 1:10 pm, expresso wrote: > Thanks a lot.  The second response really helped me as I'm not so > versed in hard core JavaScript.  Obviously not being that well versed > in it is hindering m

[jQuery] Re: Question on : syntax

2009-07-02 Thread expresso
Thanks a lot. The second response really helped me as I'm not so versed in hard core JavaScript. Obviously not being that well versed in it is hindering my ability to understand plug-in code, ability to distinguish between standard JavaScript notation/features vs. jQuery in the same file, and ab

[jQuery] Re: Question on : syntax

2009-07-02 Thread waseem sabjee
lets go back to basic JavaScript. take this example var display = function() { // create namespace display return { hide : function(o) { // add function hide to namepsace var obj = document.getElementById(o); if(obj.style.display != 'none') { obj.style.display = 'none' } }, show : function(o) {

[jQuery] Re: Question on : syntax

2009-07-02 Thread Michael Lawson
One thing to keep in mind, is that when you are using : to specify a filter, it will always be inside of a string. "input:button"for example. The syntax you have here is the key value notation in javascript. It will almost always exist outside of a string. You are setting the setup key to