some classes, toggleNext

This commit is contained in:
Sanj 2011-09-28 17:16:08 +05:30
parent 9025c309b3
commit e2540662cf
2 changed files with 14 additions and 4 deletions

View File

@ -19,6 +19,16 @@ $('#listLeft ul li a').live("click", function() {
return false;
});
$('.toggleNext').live("click", function(e) {
e.preventDefault();
var $next = $(this).next();
if (!$next.is(":visible")) {
$next.slideDown();
} else {
$next.slideUp();
}
});
/* Get a jquery <option> row for a sort field, requires s.operator, s.field_name, s.friendly_name */
function getOption(s) {
@ -185,8 +195,8 @@ function getNoListHtml(items) {
function getNoListItemHtml(item) {
if (item.hasOwnProperty("url")) {
var $ret = $('<div />').addClass("noListItem");
var $title = $("<div />").addClass("orange").appendTo($ret);
var $a = $('<a />').attr("href", item.url).text(item.text).appendTo($title);
var $title = $("<div />").addClass("noListTitle").appendTo($ret);
var $a = $('<a />').attr("href", item.url).addClass("orangeLink").text(item.text).appendTo($title);
var $text = $("<div />").addClass("noListText").html(item.text).appendTo($ret);
} else {
var $ret = $('<div />').addClass("noListItem").addClass("collapsible");

View File

@ -124,8 +124,8 @@
<div>
{% for p in participants %}
<div class="pWrapper">
<div class="pName">
<a href="#">{{ p.name }}</a>
<div class="pName toggleNext">
<a href="Javascript:return false;">{{ p.name }}</a>
</div>
<div class="pBio">
{{ p.short_bio }}