$ is simply an alias to jQuery().

jQuery.noConflict() removes the $ alias so other frameworks don't
throw a fit.

$bfa = jQuery.noConflict() simply assigns $bfa to jQuery().

The $ tends to confuse people at first but it's just a function alias,
It's just a shortcut for jQuery, thats it, nothing else. If it helps
you any just replace the $ in your head with jQuery()


On Apr 7, 11:26 am, "Rick Faircloth" <r...@whitestonemedia.com> wrote:
> Hi, Ron...glad you making some progress!
>
> And don't worry about the oversights...I'm constantly running
> into stuff like that...(I'm getting too old for all this, too! :o)
>
> Concerning the noConflict stuff...
> I haven't had occasion, yet to have to use the noConflict approach,
> so I'm not personally experienced with it.  But from having read
> about it on the list, my understanding is that it is simply a way
> to prevent the jQuery framework from conflicting with other Javascript
> frameworks, such as MooTools, Prototype, etc.
>
> And, apparently, from your example code, the coder is simply using
> a variable to represent the jQuery.noConflict(); code so he doesn't have
> to do so much typing.   $bfa or jq is just quicker.  It's just a convenience
> thing...perhaps someone else has more to offer in terms of explanation.
>
> hth,
>
> Rick
>
> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of Ronz
> Sent: Tuesday, April 07, 2009 1:21 PM
> To: jQuery (English)
> Subject: [jQuery] Re: newbie question
>
> Hi, Rick.
>
> Here's a quote to my hosting news group that 'splains' what has
> happened since yesterday. Maybe you could comment on the latter
> portion if you have time. TIA.........Ron
>
> <quote to newsgroup>
>
> It turns out that what I downloaded from jQuery ended up with a bunch
> of line feeds in it...my bad I'm sure.
>
> I ended up copying the jquery.js from the another site's installation
> and still had the same problem, but then it dawned on me that I should
> look to see if my editor(s) 'wrapped' the file and, sure enough, I let
> it get screwed up with those 'stinking' extra line feeds!
>
> <blush>
> To add insult to my stupidity, one copy paste from that other site
> wrapped the file with <pre>.......</pre>
> <blush>
>
> My only excuse is that, after 12 years, I'm now using linux with
> Bulefish and Screem editors that have 'con-foo-zed' me.
>
> >> I *really* feel stupid at this point.........Ron
>
> I'm getting too old for this......:=)
>
> Now for my 'extra' question:
>
> > ........
> >   var jq = jQuery.noConflict();
> >   jq(document).ready(function()
> > .......
>
> I noticed the 'var - noConflict' line above and saw it in another site
> like this:
>
> var $bfa = jQuery.noConflict();
> $bfa(document).ready(function(){
>
> and in his function content "$bfa" showed up in many places like
>
> $bfa(".post img").each(function() {
>   var maxwidth = centerwidth - 10 + 'px';
>   var imgwidth = $bfa(this).width();
> ...........
>
> First of all, I'd seen no mention of "jQuery.noConflict()" in their
> docs and then seeing all those "$whatervers" all through a function's
> code mystified me. I'm guessing it uniquely identifies/isolates each
> function  somehow.
>
> What is that all about and do you do that for some reason?
>
> A link somewhere that explains the above would be fine.
>
> Thanks for your help.........Ron
>
> </quote to newsgroup>
>
> On Apr 6, 11:27 pm, "Rick Faircloth" <r...@whitestonemedia.com> wrote:
> > Hi, Ron...
>
> > Assuming that you have your jQuery source file "jquery-1.3.2.min.js"
> > in the same directory as the page it's running on,
> > do you have this in the head section of your document?
>
> > <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
>
> > If you do, then also post your jQuery code and your HTML so it's
> > easier to see where the problem may be in your code.
>
> > Rick
>
> > -----Original Message-----
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> > Behalf Of Ronz
> > Sent: Monday, April 06, 2009 7:17 PM
> > To: jQuery (English)
> > Subject: [jQuery] newbie question
>
> > I've tried loading jquery.js into a site several times several
> > different ways and can't even get an alert to pop up. I can get a test
> > page to work only if I use an src address to google's jquery.
>
> > Can't I just upload the jquery-1.3.2.min.js file or is there some
> > configuring I have to do?
>
> > What problem should I look for on my web account?
>
> > .......Ron

Reply via email to