Code Monkey home page Code Monkey logo

myjsutilities's Introduction

MyJsUtilities

Some useful javascript functions and stuff, cobbled together from various sources.

Contents

  • Logging: Safe console.log wrapper with debugmode toggling. Inspired by Paul Irish.
  • Inheritance: Object-oriented "macros" for class definition (Define) and inheritance (Inherits). Inspired by this and that
  • Templating: simple Moustache-style template helper.
  • jQuery Plugins:
    • $each: "fixes" .each so that this (and param) are jQuery, not DOM elements
    • createNestedDom: utility to construct multi-level DOM items for testing (particularly for selector performance tests)
    • getSelector: builds list of DOM elements in inheritance chain; includes tag, id, class
    • getTextSize: calculate width or height of the text within one or more elements -- specifically useful for calculating when to increase the dimensions of an input box during typing
    • hasTriggers: make it so one button can trigger behaviors on multiple targets -- specifically useful for having a 'show/hide all' button to activate a bunch of bootstrap toggles
    • listEvents: get all bound events (jQ 1.8+)
    • triggerAny: filter namespaced triggers, like .custom1 to fire click.custom1 and change.custom1

License

As-you-wish.

myjsutilities's People

Contributors

zaus avatar yaworsw avatar

Stargazers

Pratik Bhonsle avatar

Watchers

 avatar James Cloos avatar

Forkers

pratik136

myjsutilities's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.