My jQuery + Bootstrap flavored fork

56 views
Skip to first unread message

Adam Becker

unread,
Mar 20, 2013, 11:42:20 AM3/20/13
to int...@googlegroups.com
Hey All,

First off, awesome work with Intro.js. I love it, but since it didn't fit my needs exactly, I forked it and came up with my own version with a slightly different API. https://github.com/adamjacobbecker/jquery.intro.js

The two main differences are:
1) It relies on both jQuery and Bootstrap (for popover tooltips)
2) The API isn't defined on data-* attributes, and instead in an object literal, like so:
$.intro([
 
{
   
el: "#new-user-link",
   
text: "This is the new user link."
 
},
 
{
   
el: function(){
     
// you can also use a function here
     
if (window.location.hash === '#comments') {
       
return $(".comments");
     
} else {
       
return $(".something-else");
     
}
   
},
   
text: "That was rad!",
   
position: "top" // or 'left' or 'right'. defaults to 'bottom'
 
},
 
{
   
el: "a:eq(0):contains('delete')",
   
text: "This link deletes something."
 
}
])

Curious to see if this is helpful to anyone else. Usablica folks, let me know if enough attribution is given in the README. Even though the codebase is completely refactored, it's still your plugin at its heart.

Afshin Mehrabani

unread,
Mar 20, 2013, 12:49:50 PM3/20/13
to int...@googlegroups.com
Adam,

Well done, really useful and nice.
I have to say something about IntroJs and why it was trended, it's actually because using IntroJs is really easy because of attributes, it's pretty cool and easy, isn't it?

I think using the IntroJs with the way that you produced, literal object, is cool and also I'll add it to the next version of IntroJs but I think for the first versions it's better to keep reading and doing the introduction with attributes (though I think you can keep both literal object and attribute functionality)

Let me know what you think.

Afshin
Reply all
Reply to author
Forward
0 new messages