New Poll by Guest
Ok, find the template where you set #vote-test and change it to .vote-test And then make script like this:
- Code:
$(document).ready(function() {
var buttonClass = "vote-test";
var username = _userdata["username"];
var usersWithAccess = ["Admin", "Moderator", "Eto", "Mihai", "pedxz", ];
if (!usersWithAccess.includes(username)) {
var totalBtns = $(`.${buttonClass}`).length;
for (i = 0; i < totalBtns; i++) {
$(`.${buttonClass}`).css("display", "none");
}
}
});
Search in: Archives for Javascript & jQuery Topic: New Poll Replies: 76 Views: 2638