smartphone-spoiler.js: don't use jQuery
This commit is contained in:
parent
f444fa3b6e
commit
b3ae75ed14
@ -10,19 +10,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$(document).ready(function(){
|
onready(function(){
|
||||||
/* This needs to be expanded upon: */
|
if(navigator.userAgent.match(/iPhone|iPod|iPad|Android/i)) {
|
||||||
var is_mobile = navigator.userAgent.match(/iPhone|iPod|iPad|Android/i);
|
var spoilers = document.getElementsByClassName('spoiler');
|
||||||
|
for(var i = 0; i < spoilers.length; i++) {
|
||||||
if(is_mobile) {
|
spoilers[i].onmousedown = function() {
|
||||||
$('span.spoiler').each(function() {
|
this.style.color = 'white';
|
||||||
$(this).click(function() {
|
};
|
||||||
if($(this).hasClass('show'))
|
}
|
||||||
$(this).css('color', 'black').removeClass('show');
|
|
||||||
else
|
|
||||||
$(this).css('color', 'white').addClass('show');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user