分享一个jQuery的小测验(Quiz)插件:jQuizzy

分享一个jQuery的小测验(Quiz)插件:jQuizzy

在线演示

偶然发现一个非常不错的生成在线测试的jQuery插件 - jQuizzy,这个插件能够帮助你快速的生成一个非常漂亮的在线测试应用。

主要特性:

  • 界面非常整洁漂亮 
  • 界面互动
  • 同一个页面多个测试题
  • 无需HTML。通过简单的javascript定义测试问题
  • 完全支持定制,皮肤并且可以扩展
  • 商业使用需要付费15美金

Javascript

倒入类库及其问题js:

<script src="js/init.js"></script>
<script src="js/jquery.js"></script>
<script src="js/jquery.jquizzy-min.js"></script>


HTML中调用如下JS:

<script>
$('#quiz-container').jquizzy({
questions: init.questions,
resultComments: init.resultComments,
twitterStatus: 'Woo! I got {score} on the quiz. Try it! http://bit.ly/linky'
});
</script>


init.js内容如下:

var init = { 
'questions': [
{
'question': 'jQuery is a...',
'answers': ['JavaScript library','Ruby Gem','PHP Framework','None of the above'],
'correctAnswer': 1
},
{
'question': 'jQuery uses CSS selectors and XPath expressions to select elements?',
'answers': ['false','true'],
'correctAnswer': 2
},
{
'question': 'What scripting language is jQuery written in?',
'answers': ['C','C#','javascript','java'],
'correctAnswer': 3
}
],
'resultComments' :
{
perfect: 'Albus, is that you?',
excellent: 'Outstanding, noble sir!',
good: 'Exceeds expectations!',
average: 'Acceptable. For a muggle.',
bad: 'Well, that was poor.',
poor: 'Dreadful!',
worst: 'For shame, troll!'
}

};

搞定!非常简单,你自己可以设计自己的风格!via gbin1.com

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值