Sha256: c987a4d36561850e765dfd507249dab86e00e3a808b9fb27479a2ad0ebe11887
Contents?: true
Size: 670 Bytes
Versions: 22
Compression:
Stored size: 670 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. */ $(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
22 entries across 22 versions & 1 rubygems