SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,531
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Making jQuery source code readable

    How do I make the jQuery source code readable?

    I would like to modify the code for this slide-show plug-in...

    JQuery Cycle Plugin

    ...but the code is all lumped together into one unreadable heap.

    Thanks,


    Debbie

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,527
    Mentioned
    84 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    but the code is all lumped together into one unreadable heap.
    That's the minified version of the code, which you can easily tell by the .min in the filename.
    For example: jquery.min.js

    If you want the uncompressed code, download it from their website.

    It's not a good idea though to manually edit the source code of such libraries. There are almost always more appropriate ways to achieve your needs instead.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)

  4. #4
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,531
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I was looking for something like this...

    http://jsbeautifier.org


    Debbie

  5. #5
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @DoubleDee

    Yeah, Online javascript beautifier is an excellent service (the best I've seen)!

    For reference, here are two more:
    Format Javascript
    Javascript Format and Colour

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,608
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by domscripter View Post
    Yeah, Online javascript beautifier is an excellent service (the best I've seen)!
    That one does seem to have several additional features beyond just formatting the supplied code. Now you've got me thinking about possibly adding some of those types of thing into my formatter script (mine does colour code the output which that one doesn't so I guess to some extent they complement one another).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •