Results 1 to 4 of 4

Thread: Detecting FE Javascript framework

  1. #1
    User
    Join Date
    08-07-09.
    Location
    Kent, United Kingdom
    Posts
    92

    Default Detecting FE Javascript framework

    Is there anything currently in the core to detect if Mootools, JQuery or both are being used in the FE? I know site administrators will use different combinations.

  2. #2
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Detecting FE Javascript framework

    No, but my first response when reading this was that that is a FE matter you can detect using js. Is there a BE reason to know? Because currently the only framework Contao supports is Mootools. So I'd say Contao has no reason to indicate which framework is used... That will be changed in Contao 3, to be released this year... (see: http://contao.org/en/news/contao-team-meeting-2012.html)

    I'm curious what you are up to?

  3. #3
    User
    Join Date
    08-07-09.
    Location
    Kent, United Kingdom
    Posts
    92

    Default Re: Detecting FE Javascript framework

    I'm writing a FE module that will use some simple Ajax to update the module state.
    After the original post I started considering doing it all in the JS. I haven't yet researched it but I assume there's easy enough ways to detect if Mootools or JQuery are installed.

  4. #4
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: Detecting FE Javascript framework

    Code:
    // javascript
    if (window.Mootools) { doMooStuff(); }
    if (window.jQuery) { doJQueryStuff(); }
    Brian

Bookmarks

Posting Permissions

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