|
|
@@ -35,16 +35,16 @@ const HomeRouter = { |
|
|
|
}, |
|
|
|
changeSubscribtion: function(){ |
|
|
|
var btnString = $("#btn-text").text(); |
|
|
|
//console.log(btnString); |
|
|
|
console.log(btnString); |
|
|
|
|
|
|
|
if($("#btn-text").hasClass("subscribed")){ |
|
|
|
$("#btn-text").removeClass("subscribed"); |
|
|
|
var newBtnString = "#" + $("#btn-text").text(/deabonnieren/g, '') + "abonnieren"; |
|
|
|
var newBtnString = btnString.replace(/deabonnieren/g, '') + "abonnieren"; |
|
|
|
//console.log(btnString); |
|
|
|
$("#btn-text").text(newBtnString); |
|
|
|
}else{ |
|
|
|
$("#btn-text").addClass("subscribed"); |
|
|
|
var newBtnString = "#" + $("#btn-text").text(/abonnieren/g, '') + "deabonnieren"; |
|
|
|
var newBtnString = btnString.replace(/abonnieren/g, '') + "deabonnieren"; |
|
|
|
//console.log(newBtnString); |
|
|
|
$("#btn-text").text(newBtnString); |
|
|
|
|