jquery.noConflict() added to everything lacking it, just in case
parent
ea292c5600
commit
d7ee5dec9e
|
@ -1,14 +1,15 @@
|
||||||
$(document).ready(function(){
|
var $j =jQuery.noConflict();
|
||||||
$('.book-list').bind("mouseenter", (function()
|
$j(document).ready(function(){
|
||||||
|
$j('.book-list').bind("mouseenter", (function()
|
||||||
{
|
{
|
||||||
$(this).children('.panelfront').removeClass('side1').addClass('side2');
|
$j(this).children('.panelfront').removeClass('side1').addClass('side2');
|
||||||
$(this).children('.panelback').removeClass('side2').addClass('side1');
|
$j(this).children('.panelback').removeClass('side2').addClass('side1');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
$('.book-list').bind("mouseleave", (function()
|
$j('.book-list').bind("mouseleave", (function()
|
||||||
{
|
{
|
||||||
$(this).children('.panelback').removeClass('side1').addClass('side2');
|
$j(this).children('.panelback').removeClass('side1').addClass('side2');
|
||||||
$(this).children('.panelfront').removeClass('side2').addClass('side1');
|
$j(this).children('.panelfront').removeClass('side2').addClass('side1');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
/* Beware of fadeIn/fadeOut jQuery animations; they add an inline "display: block"
|
/* Beware of fadeIn/fadeOut jQuery animations; they add an inline "display: block"
|
||||||
which overrides display: none in the stylesheet. Sneaky! */
|
which overrides display: none in the stylesheet. Sneaky! */
|
||||||
$(document).ready(function(){
|
var $j = jQuery.noConflict();
|
||||||
$('#toggle-list').click(function(){
|
$j(document).ready(function(){
|
||||||
$('.panelview').addClass("listview").removeClass("panelview");
|
$j('#toggle-list').click(function(){
|
||||||
$(this).css({opacity: 1});
|
$j('.panelview').addClass("listview").removeClass("panelview");
|
||||||
$('#toggle-panel').css({opacity: .2});
|
$j(this).css({opacity: 1});
|
||||||
|
$j('#toggle-panel').css({opacity: .2});
|
||||||
});
|
});
|
||||||
$('#toggle-panel').click(function(){
|
$j('#toggle-panel').click(function(){
|
||||||
$('.listview').addClass("panelview").removeClass("listview");
|
$j('.listview').addClass("panelview").removeClass("listview");
|
||||||
$(this).css({opacity: 1});
|
$j(this).css({opacity: 1});
|
||||||
$('#toggle-list').css({opacity: .2});
|
$j('#toggle-list').css({opacity: .2});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
jQuery(document).ready(function() {
|
var $j = jQuery.noConflict();
|
||||||
|
|
||||||
jQuery(".add-wishlist").each(function (index, element) {
|
$j(document).ready(function() {
|
||||||
jQuery(element).click(function() {
|
|
||||||
var span = jQuery(element).find("span");
|
$j(".add-wishlist").each(function (index, element) {
|
||||||
|
$j(element).click(function() {
|
||||||
|
var span = $j(element).find("span");
|
||||||
var gb_id = span.attr('id')
|
var gb_id = span.attr('id')
|
||||||
if (!gb_id) return;
|
if (!gb_id) return;
|
||||||
jQuery.post('/wishlist/', {'googlebooks_id': gb_id}, function(data) {
|
jQuery.post('/wishlist/', {'googlebooks_id': gb_id}, function(data) {
|
||||||
span.fadeOut();
|
span.fadeOut();
|
||||||
var newSpan = jQuery('<span class="on-wishlist">On Your Wishlist!</span>').hide();
|
var newSpan = $j('<span class="on-wishlist">On Your Wishlist!</span>').hide();
|
||||||
span.replaceWith(newSpan);
|
span.replaceWith(newSpan);
|
||||||
newSpan.fadeIn('slow');
|
newSpan.fadeIn('slow');
|
||||||
newSpan.removeAttr("id");
|
newSpan.removeAttr("id");
|
||||||
|
@ -15,20 +17,20 @@ jQuery(document).ready(function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery(".remove-wishlist").each(function (index, element) {
|
$j(".remove-wishlist").each(function (index, element) {
|
||||||
jQuery(element).click(function() {
|
$j(element).click(function() {
|
||||||
var span = jQuery(element).find("span");
|
var span = $j(element).find("span");
|
||||||
var work_id = span.attr('id')
|
var work_id = span.attr('id')
|
||||||
jQuery.post('/wishlist/', {'remove_work_id': work_id}, function(data) {
|
jQuery.post('/wishlist/', {'remove_work_id': work_id}, function(data) {
|
||||||
var book = jQuery(element).parent();
|
var book = $j(element).parent();
|
||||||
book.fadeOut();
|
book.fadeOut();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery(".create-account").each(function (index, element) {
|
$j(".create-account").each(function (index, element) {
|
||||||
jQuery(element).click(function() {
|
$j(element).click(function() {
|
||||||
var span = jQuery(element).find("span");
|
var span = $j(element).find("span");
|
||||||
var work_url = span.attr('title')
|
var work_url = span.attr('title')
|
||||||
window.location = "/accounts/login/?next=" + work_url;
|
window.location = "/accounts/login/?next=" + work_url;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue