Skip to content

a jquery plugin that provides url hashTag support for target elements.

License

Notifications You must be signed in to change notification settings

arpitremarkable/jquery.hashTag.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery.hashTag.js

a jquery plugin that provides url hashTag support for target elements.

Usage:

coffee

  $(".ui-tabs .ui-tab-nav a").hashTag
    multi: false
    toggle: false
    enableCtrlKey: false
    clearAtLoad: true
    event: "click"
    hash: []
    source: ->
      @text()
  
    load: ($target) ->
      $target.trigger "click"

js

  $('.ui-tabs .ui-tab-nav a').hashTag({
    multi: false,
    toggle: false,
    enableCtrlKey: false,
    clearAtLoad: true,
    event: 'click',
    hash: [],
    source: function() {
      return this.text();
    },
    load: function($target) {
      return $target.trigger('click');
    }
  });

Milestones

v0.1

  • get the project up and running with bare minimum options.
  • create a jquery plugin and auto-inherit target elements

v0.2

  • slugify option => hash source will be auto slugged
  • function chaining support for library functions, just like jquery chaining
  • prepare an example, preferable showing support for jquery-ui tabs

x.x

  • Custom slugify function
  • Track browser back and forward (hashChange) events
  • Provide option for window scope eg. window | top | document etc
  • Allow multiple event options and bind them with dynamic elements as well

About

a jquery plugin that provides url hashTag support for target elements.

Resources

License

Stars

Watchers

Forks

Packages

No packages published