The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
[Ajax] Best Answer not work on 4.2.5
Hello,
i`m trying to install https://vborg.vbsupport.ru/showthread.php?t=322478 on 4.2.5 The button is visable in showthread, but after press on it, nothing happend. My browser is showing error: Uncaught ReferenceError: jQuery is not defined at bestAnswer.js:43:4 Code:
(function ($, window) { var $btn; var postId; var threadid = ($("input[name='threadid']")[0] || $("input[name='searchthreadid']")[0]).value; var baseUrl = window.getBaseUrl() + 'bestAnswer.php'; var onSelectSuccess = function () { $bestAnswerContainer = $btn.closest('.bestAnswer_container'); $('.selectBestAnswer').hide(); $bestAnswerContainer .find('.unselectBestAnswer') .show(); } var onUnselectSuccess = function () { $bestAnswerContainer = $btn.closest('.bestAnswer_container'); $('.selectBestAnswer').show(); $('.unselectBestAnswer').hide(); } window.onSelectBestAnswer = function (postid, btn) { $btn = $(btn); postId = postid; $.ajax({ url: baseUrl + '?do=selectBestAnswer&postid=' + postid + '&threadid=' + threadid, success: onSelectSuccess }); } window.onUnselectBestAnswer = function (postid, btn) { $btn = $(btn); postId = postid; $.ajax({ url: baseUrl + '?do=unselectBestAnswer&postid=' + postid + '&threadid=' + threadid, success: onUnselectSuccess }); } var script = document.createElement('script'); script.src = 'https://code.jquery.com/jquery-3.6.3.min.js'; document.getElementsByTagName('head')[0].appendChild(script); })(jQuery, window) How can I fix it? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|