| 12345678910111213141516171819202122 |
- 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, value) {
- el.classList.add('transition');
- if (value) {
- el.classList.remove('hidden');
- setTimeout(function() {
- el.classList.add('show');
- }, 100);
- } else {
- el.classList.remove('show');
- setTimeout(function() {
- el.classList.add('hidden');
- }, 250);
- }
- }
|