1

I need a dead simple jq alternative, as tiny as possible and more or less with only requirements:

  • slideUp/down.
  • json get
  • basic DOM

The iPhone-look alike-frameworks doesn't do it for me (overdone and heavy for the purpose) which, to my knowledge, leaves me with xui.js, http://xuijs.com/.

Unfortunately, the slideUp / accordeon - functions seems buggy or at least not working as expected.

Thankful for any input if there's other minimal libraries around. Or if anyone has got the slideup to work with xui in an accordeon-fashion.

(Things has changed since previous post request: minimal framework for web-apps, valuable information from Gaby aka G. Petrioli over there)

To clarify my issues with xui, upon using:

x$('#box').tween({ height:'0px', color:'#00ff00', backgroundColor:'blue' }, function()
{
  alert('done!');
});

The content of the #box (div) is still visible, even though the div with it's bg-color slides up nicely. Am I using it correctly?

Regards,

//t

4

2 回答 2

4

做很多事情的绝对最轻松的方式是坚持使用原生 JavaScript 的方式。我创建了一组基本功能,作为我最近一直在做的一个副项目的一部分,可能对你有用。本质上它只是一个普通的 JavaScript 对象,它提供了 4 种简单的动画类型(淡入淡出/淡出 + 滑动/滑动)以及一些基本的辅助函数(addClass、removeClass)等。只需从我的 gitHub 代码中提取基本函数https://github .com/thybag/JSnip/blob/master/jsnip.js并根据自己的需要进行定制。(很抱歉插入我的链接,但我虽然粘贴代码会有点矫枉过正)[注意:到目前为止,这还缺少 JSON get 方法,尽管我认为如果你找到一个普通的 JavaScript 函数来做到这一点应该不难决定走纯 JavaScript 路线。]

如果您希望得到更好的支持,您可以尝试 JQuery Mobile 版本:http: //jquerymobile.com/ 我还听说http://www.sencha.com/products/touch/非常适合移动设备发展(虽然我认为它仍然相当重)

抱歉,我无法提供更多帮助。

于 2011-07-02T21:26:14.353 回答
0

如果您不喜欢 Xui,请尝试 Zepto、MinifiedJS 或 Midori。

于 2014-01-17T03:42:27.230 回答