group toggles

background intro: the request was to generate toggle icons based on the content. Only when the module is higher than one row will the toggle function be implemented.

  1. toggle icons are generated by frontend
  2. each toggle block within this container works independently
  3. CSS: toggle box should reserve padding space for generated toggle triggers
  4. CSS: open/collapse container height & toggle images are assigned in CSS

date: 2007
config object
var oConf = { boxtag: 'div', // the container tag boxclass: 'togglebox', // the container class baseheighttag:'a', // the tag to get base height from toggleclass : 'tagtoggle', // classname for generated toggle, toggle tag is <span> openclass: 'shown', // the open toggle class for the container colclass: 'hidden', // the collapse toggle class for the container EOF:null };
html structure
<div id="whatever"> <div class="togglebox"> <a href="#">get baseheight from this tag, can be anything like span, strong... etc</a> </div> <div class="togglebox"> </div> .... </div>
how it's initialzed
var doToggle = new setGroupToggle('ygtoggle',{boxtag:'dl',boxclass:''});
排序方式:default 為 文章發表時間(create time),另外也可以自由讓使用者選擇sort by dig推薦數, 文章發表時間(開功能,但本次presentation不呈現), update時間(開功能,但本次presentation不呈現), 回應數(開功能,但本次presentation不呈現), 瀏覽次數(開功能,但本次presentation不呈現)...<詳全文>