Sha256: 90f002e4b2a2633cae1b9ff78eb7131828ada0731dab536c1bd0f5361cfb2434
Contents?: true
Size: 691 Bytes
Versions: 33
Compression:
Stored size: 691 Bytes
Contents
/* category.js: javascript for category.rb plugin of tDiary Copyright (C) 2011 by TADA Tadashi <t@tdtds.jp> You can redistribute it and/or modify it under GPL2 or any later version. */ $(function(){ // insert clicked category item into textarea of update form function insertCategoryItem(item) { $('#body').insertAtCaret( '[' + item.text() + ']' ); } $('.category-item') .hover(function(){ $(this).css('cursor', 'pointer'); }, function(){ $(this).css('cursor', 'default'); }) .click(function(){ insertCategoryItem($(this)); }); $('#category-candidate').change(function(){ $('option:selected', this).each(function(){ insertCategoryItem($(this)); }); }); });
Version data entries
33 entries across 25 versions & 1 rubygems