Changes for jquery 1.7 (.live -> .on), create module_layout
This commit is contained in:
1 parent
3ff2e7867e
commit
a3f152b200
6 files changed
+105
-3
No files matched your search
Whitespace-only changes.
+79
@@ -0,0 +1,79 @@
|
||||
$(document).ready(function(){
|
||||
$(".tag1").addClass("active");
|
||||
|
||||
$(document).on("click", ".tag1", function () {
|
||||
for (i=1; i<=4; i++){
|
||||
$("#news_"+i).css("display","none");
|
||||
$("#links_"+i).css("display","none");
|
||||
$(".tag"+i).removeClass("active");
|
||||
}
|
||||
$("#news_1").fadeIn();
|
||||
$("#links_1").fadeIn();
|
||||
$(this).addClass("active");
|
||||
return false;
|
||||
});
|
||||
$(document).on("click", ".tag2", function () {
|
||||
for (i=1; i<=4; i++){
|
||||
$("#news_"+i).css("display","none");
|
||||
$("#links_"+i).css("display","none");
|
||||
$(".tag"+i).removeClass("active");
|
||||
}
|
||||
$("#news_2").fadeIn();
|
||||
$("#links_2").fadeIn();
|
||||
$(this).addClass("active");
|
||||
return false;
|
||||
});
|
||||
$(document).on("click", ".tag3", function () {
|
||||
for (i=1; i<=4; i++){
|
||||
$("#news_"+i).css("display","none");
|
||||
$("#links_"+i).css("display","none");
|
||||
$(".tag"+i).removeClass("active");
|
||||
}
|
||||
$("#news_3").fadeIn();
|
||||
$("#links_3").fadeIn();
|
||||
$(this).addClass("active");
|
||||
return false;
|
||||
});
|
||||
$(document).on("click", ".tag4", function () {
|
||||
for (i=1; i<=4; i++){
|
||||
$("#news_"+i).css("display","none");
|
||||
$("#links_"+i).css("display","none");
|
||||
$(".tag"+i).removeClass("active");
|
||||
}
|
||||
$("#news_4").fadeIn();
|
||||
$("#links_4").fadeIn();
|
||||
$(this).addClass("active");
|
||||
return false;
|
||||
});
|
||||
|
||||
var topic1="0px";
|
||||
var topic2="-948px";
|
||||
var topic3="-1896px";
|
||||
var topic_page=1;
|
||||
$(document).on("click", ".topic_prev", function() {
|
||||
if (topic_page !=1){
|
||||
topic_page-=1;
|
||||
}else{
|
||||
}
|
||||
if (topic_page == 1)
|
||||
$("#topic_list").stop().animate({"left": topic1}, "slow");
|
||||
if (topic_page == 2)
|
||||
$("#topic_list").stop().animate({"left": topic2}, "slow");
|
||||
if (topic_page == 3)
|
||||
$("#topic_list").stop().animate({"left": topic3}, "slow");
|
||||
|
||||
});
|
||||
$(document).on("click", ".topic_next", function() {
|
||||
if (topic_page >=1 && topic_page <=2){
|
||||
topic_page+=1;
|
||||
}else{
|
||||
}
|
||||
if (topic_page == 1)
|
||||
$("#topic_list").stop().animate({"left": topic1}, "slow");
|
||||
if (topic_page == 2)
|
||||
$("#topic_list").stop().animate({"left": topic2}, "slow");
|
||||
if (topic_page == 3)
|
||||
$("#topic_list").stop().animate({"left": topic3}, "slow");
|
||||
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
// This is a manifest file that'll be compiled into including all the files listed below.
|
||||
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
||||
// be included in the compiled file accessible from http://example.com/assets/application.js
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// the compiled file.
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require announcement_link
|
||||
Reference in new issue
Block a user