- Timestamp:
- 2013/08/20 21:31:31 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/html/user_data/packages/sphone/js/eccube.sphone.js
r23078 r23107 32 32 eccube.smartRollover = function() { 33 33 if (document.getElementsByTagName) { 34 var images = document.getElementsByTagName("img"); 34 var images = $("img"); 35 var re = /_off¥./; 35 36 36 for (var i=0; i < images.length; i++) { 37 if (images[i].getAttribute("src").match("_off.")) { 38 images[i].onmouseover = function() { 37 images.each(function(){ 38 var target = $(this); 39 if (target.attr("src").match(re)) { 40 target.on("vmouseover", function(){ 39 41 this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on.")); 40 } ;41 images[i].onmouseout = function(){42 }); 43 target.on("vmouseout", function(){ 42 44 this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off.")); 43 } ;45 }); 44 46 } 45 } 47 }); 46 48 } 47 49 }; … … 73 75 cache: false, 74 76 dataType: "text", 75 error: function(XMLHttpRequest, textStatus , errorThrown){76 alert(textStatus);77 error: function(XMLHttpRequest, textStatus){ 78 window.alert(textStatus); 77 79 $.mobile.hidePageLoadingMsg(); 78 80 }, 79 81 success: function(result){ 80 if (result == "true") {81 alert("お気に入りに登録しました");82 if (result === "true") { 83 window.alert("お気に入りに登録しました"); 82 84 $(".btn_favorite").html("<p>お気に入り登録済み</p>"); 83 85 } else { 84 alert("お気に入りの登録に失敗しました");86 window.alert("お気に入りの登録に失敗しました"); 85 87 } 86 88 $.mobile.hidePageLoadingMsg(); … … 97 99 $(function(){ 98 100 //level?クラスを持つノード全てを走査し初期化 99 $("#categorytree 100 if ($(this). children("ul").length) {101 $("#categorytree").find("li").each(function(){ 102 if ($(this).find("> ul").length) { 101 103 //▶を表示し、リストオープンイベントを追加 102 var tgt = $(this). children('span.category_header');104 var tgt = $(this).find("> span.category_header"); 103 105 var linkObj = $("<a>"); 104 linkObj. text('+');106 linkObj.html('+'); 105 107 tgt 106 108 .click(function(){ 107 109 $(this).siblings("ul").toggle('fast', function(){ 108 110 if ($(this).css('display') === 'none') { 109 tgt.children('a'). text('+');111 tgt.children('a').html('+'); 110 112 } else { 111 tgt.children('a'). text('-');113 tgt.children('a').html('-'); 112 114 } 113 115 });
Note: See TracChangeset
for help on using the changeset viewer.