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; 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 */ /* Get a jquery <option> row for a sort field, requires s.operator, s.field_name, s.friendly_name */
function getOption(s) { function getOption(s) {
@ -185,8 +195,8 @@ function getNoListHtml(items) {
function getNoListItemHtml(item) { function getNoListItemHtml(item) {
if (item.hasOwnProperty("url")) { if (item.hasOwnProperty("url")) {
var $ret = $('<div />').addClass("noListItem"); var $ret = $('<div />').addClass("noListItem");
var $title = $("<div />").addClass("orange").appendTo($ret); var $title = $("<div />").addClass("noListTitle").appendTo($ret);
var $a = $('<a />').attr("href", item.url).text(item.text).appendTo($title); var $a = $('<a />').attr("href", item.url).addClass("orangeLink").text(item.text).appendTo($title);
var $text = $("<div />").addClass("noListText").html(item.text).appendTo($ret); var $text = $("<div />").addClass("noListText").html(item.text).appendTo($ret);
} else { } else {
var $ret = $('<div />').addClass("noListItem").addClass("collapsible"); var $ret = $('<div />').addClass("noListItem").addClass("collapsible");

View File

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