Results 1 to 3 of 3
  1. #1
    randylsmith is offline Plebe
    Join Date
    Apr 2012
    Location
    Hudson, WI
    Posts
    2
    Rep Power
    0

    Default What is DollarsignDollarsignParen for?

    If I remember correctly, the dollar sign in "$(..." simply serves as the program name so that you can easily rename the program without having to change all of the named occurrences, and that changing all of the $( to nameofprogram( will still allow the program to work. Right?

    If so, then what is dollar-dollar-( "$$(" for? See it in code about 2/3rds down.

    RLS


    REQUIRED_PROTOTYPE: '1.6.0.3',
    load: function() {
    function convertVersionString(versionString) {
    var v = versionString.replace(/_.*|\./g, '');
    v = parseInt(v + '0'.times(4-v.length));
    return versionString.indexOf('_') > -1 ? v-1 : v;
    }

    if((typeof Prototype=='undefined') ||
    (typeof Element == 'undefined') ||
    (typeof Element.Methods=='undefined') ||
    (convertVersionString(Prototype.Version) <
    convertVersionString(Scriptaculous.REQUIRED_PROTOT YPE)))
    throw("script.aculo.us requires the Prototype JavaScript framework >= " +
    Scriptaculous.REQUIRED_PROTOTYPE);

    var js = /scriptaculous\.js(\?.*)?$/;
    $$('script[src]').findAll(function(s) {
    return s.src.match(js);
    }).each(function(s) {
    var path = s.src.replace(js, ''),
    includes = s.src.match(/\?.*load=([a-z,]*)/);
    (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound'). split(',').each(
    function(include) { Scriptaculous.require(path+include+'.js') });
    });

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,525
    Blog Entries
    7
    Rep Power
    20

    Default Re: What is DollarsignDollarsignParen for?

    Wrong shop; this is a Java forum, your question is about Javascript.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    randylsmith is offline Plebe
    Join Date
    Apr 2012
    Location
    Hudson, WI
    Posts
    2
    Rep Power
    0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •