| 123456789101112131415161718192021222324252627282930 |
- rivets.binders['src-strict'] = function(el, value) {
- var img = new Image()
- img.onload = function() {
- $(el).attr('src', value)
- }
- img.src = value
- }
- rivets.binders['transition'] = function(el, display) {
- if (display) {
- el.classList.remove('hide');
- setTimeout(function() {
- el.classList.add('show');
- }, 0);
- } else {
- el.classList.remove('show');
- setTimeout(function() {
- el.classList.add('hide');
- }, 200);
- }
- }
- rivets.binders['selected-section'] = function (el, sectionState) {
- var section = el.text;
- if (sectionState[section]) {
- el.classList.add('selected');
- } else {
- el.classList.remove('selected');
- }
- }
|