icon_magic Magic JavaScript

Quick Jump ↵

A simple to install, easy to use, JavaScript library/framework with loads of built-in functionality.

These docs are not guaranteed to be complete or accurate. They should be close though.

  1. Review online documentation.
  2. Download: .
  3. Unzip and upload to your website.
  4. Follow usage instructions below and as needed.
Usage

→ Review, tweak and add the code below inside your <head> tag:

Notes
Contact

[email protected] ← seriously inquiries only, no jokers.

Easy examples of core functionality.

Examples
  1. Confirm Click
    $m.wand.confirm_click
  2. CSS Class Update
    $m.wand.css_class_update
  3. Dropdown Menu
    $m.wand.dropdown_menu
  4. Dynamic Tabs
    $m.wand.dynamic_tabs
  5. Empty Element (via click)
    $m.wand.empty_onclick
  6. Fire Any Event
    $m.wand.fire_event
  7. Frame Reload
    $m.wand.frame_reload
  8. Google Analytics Click Tracking
    $m.wand.ga_click_track
  9. HTML5 Audio
    $m.wand.html5_audio
  10. HTML5 Video
    $m.wand.html5_video
  11. Image Rollovers
    $m.wand.img_rollovers
  12. Light Switch
    $m.wand.lightswitch
  13. Open New Windows
    $m.wand.open_new_win
  14. Print the Page (via click)
    $m.wand.print_onclick
  15. Print the Page (via load)
    $m.wand.print_onload
  16. Remove Element (via click)
    $m.wand.remove_onclick
  17. Simple Image Slideshow
    $m.wand.img_slideshow
  18. Text Resizer
    $m.wand.text_resize
  19. Tool Tips
    $m.wand.tool_tip
Notes

Working with forms and fields.

Examples
  1. Alerting the visitor when navigating away from a changed form
    $m.wand.form_changed_alert
  2. Change Field Type
    $m.wand.change_field_type
  3. Check All Checkboxes
    $m.wand.check_all_boxes
  4. Check Other On Focus
    $m.wand.check_other_onfocus
  5. Checked Picker
    $m.wand.checked_picker
  6. Clearing All Fields (via click)
    $m.wand.clear_onclick
  7. Clearing Individual Fields (via focus)
    $m.wand.clear_onfocus
  8. Clearing Individual Fields (via load)
    $m.wand.clear_onload
  9. Copying Fields from One to Another
    $m.wand.copy_fields
  10. Converting Fields to URL Friendly Fields
    $m.wand.s2lcus
  11. Enable/Disable Fields when Clicking Another Field
    $m.wand.click_enable and $m.wand.click_disable
  12. Form Submission (via click)
    $m.wand.submit_onclick
  13. Form Validation
    $m.wand.form_required

Built-in AJAX magic.

Examples
  1. Anchor On Click
    $m.wand.ajax_click
  2. Auto Polling
    $m.wand.ajax_polling
  3. Form Submission
    $m.wand.ajax_submit
  4. Form Submission (via click)
    $m.wand.ajax_submit_link
  5. Input On Keyup/Change
    $m.wand.ajax_kc
  6. Predefined JSON parsing
    Magic can parse a returned JSON object if you want to do more advanced things with the returned data
Notes

Extending that core functionality.

Tricks

  1. Darkroom ()
    Showing all kinds of content in a pop-up
  2. Drag N Drop ()
    Move stuff around
    1. Free Range Any Where Drag
    2. Free Range Title Drag
    3. Sorting Boxes
    4. Sorting Boxes with Add (via click)
    5. Sorting Boxes with Add (via drag in)
  3. Magic Calendar ()
    Save the date in a pop-up you can actually see
  4. Magic Charts ()
    All kinds of <canvas> charts
    1. Column Chart
    2. Line Graph
    3. Pie Chart
  5. Magic Editor ()
    Formatting content in a rich-text editor
  6. Motion ()
    Animation prototypes
    1. Fade In and Out
      Fading in and out
    2. Flick
      Up and down and up scrolling
    3. Swipe
      Left to right to left scrolling
    4. VScroller
      Vertical up scrolling
  7. New Form Fields ()
    Creating new form fields on the fly

Under the hood changes.

To Do

A loose list of what needs done.

→ Misc

→ magic.src.js

→ wand.src.js

→ more_form_magic.src.js

ajax_lookup.src.js

Under heavy development - not for production use.

→ Sortable Table Data

API
Misc Links

Use at your own risk!