2012-01-02 22:17:35 +00:00
|
|
|
// expand or collapse the learn more section
|
|
|
|
var $j = jQuery.noConflict();
|
|
|
|
$j(document).ready(function(){
|
2012-02-07 17:01:00 +00:00
|
|
|
$j('#user-block-hide').hide();
|
|
|
|
$j('#user-block1 a').click(
|
2012-01-02 22:17:35 +00:00
|
|
|
function() {
|
|
|
|
$j(this).toggleClass("active");
|
2012-02-07 17:01:00 +00:00
|
|
|
$j("#user-block-hide").slideToggle(300);
|
2015-04-09 13:21:59 +00:00
|
|
|
$j("#readon i").toggleClass("fa-chevron-down");
|
|
|
|
$j("#readon i").toggleClass("fa-chevron-up");
|
2012-01-02 22:17:35 +00:00
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
2012-01-02 21:20:07 +00:00
|
|
|
// make a random ungluing definition active onload
|
|
|
|
$j(document).ready(function() {
|
2012-02-07 17:01:00 +00:00
|
|
|
var length = $j("#block-intro-text div").length;
|
2012-01-02 21:20:07 +00:00
|
|
|
var ran = Math.floor(Math.random()*length)+1;
|
2012-02-07 17:01:00 +00:00
|
|
|
$j("#block-intro-text div:nth-child(" + ran + ")").attr('id', 'active');
|
2012-01-02 21:20:07 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// change the ungluing def onclick
|
2012-02-07 17:01:00 +00:00
|
|
|
$j(document).delegate("#block-intro-text", "click", function() {
|
|
|
|
var length = $j("#block-intro-text div").length;
|
2012-01-02 22:17:35 +00:00
|
|
|
// minus one because length includes THIS div and we want the set of its siblings only
|
|
|
|
var ran = Math.floor(Math.random()*length)-1;
|
2012-01-02 21:20:07 +00:00
|
|
|
// make sure our next active div is not the current one!
|
2012-01-02 22:17:35 +00:00
|
|
|
$j(this).children("#active").siblings().eq(ran).attr('id', 'foo');
|
2012-01-02 21:20:07 +00:00
|
|
|
$j(this).children("#active").removeAttr('id');
|
|
|
|
$j(this).children("#foo").attr('id', 'active');
|
|
|
|
});
|