التحميل معرض VallyView Script باستخدام JQuery يسبب مشكلة
-
02-10-2019 - |
سؤال
أنا أستخدم GalleryView وعند تحميل البرنامج النصي في الرأس مثل هذا
<script type="text/javascript" src="/js/galleryview/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="/js/galleryview/jquery.galleryview-2.1.js"></script>
<script type="text/javascript" src="/js/galleryview/jquery.timers-1.2.js"></script>
كل شيء يعمل بشكل جيد ولكن عندما أستخدم jQuery لتحميل مثل هذا
$(document).ready(function(){
$('#gallery').hide();
$('<link />').appendTo('head').attr({
type: 'text/css',
rel: 'stylesheet',
href: '/js/galleryview/galleryview.css'
});
$.getScript('/js/galleryview/jquery.easing.1.3.js', function() {
$.getScript('/js/galleryview/jquery.galleryview-2.1.js', function() {
$.getScript('/js/galleryview/jquery.timers-1.2.js', function() {
$('#gallery').show();
$('#gallery').galleryView({
transition_speed: 1200,
background_color: '#006',
border: 'none',
easing: 'easeInOutBack',
pause_on_hover: true
});
});
});
});
});
أحصل على 404 على أزرار البحرية
http: //mydoamian/undefineddark/prev.gif
http: //mydoamian/undefineddark/next.gif
سيكون موضع تقدير أي مساعدة
المحلول
تمكنت من الالتفاف على هذا من خلال تعديل الكود في السطر 853 من خلال تحديد مسار السمة كسلسلة فارغة أولاً
$('script').each(function(i){
var s = $(this);
theme_path = '';
if(s.attr('src') && s.attr('src').match(/jquery\.galleryview/)){
loader_path = s.attr('src').split('jquery.galleryview')[0];
theme_path = s.attr('src').split('jquery.galleryview')[0]+'themes/';
}
ثم في مكالمتي إلى GalleryView ، أحدد NAV_THEME بشكل مناسب
$('#gallery').hide();
$('<link />').appendTo('head').attr({
rel: 'stylesheet',
type: 'text/css',
href: prefix +'js/galleryview/galleryview.css'
});
$.getScript(prefix +'js/galleryview/jquery.easing.1.3.js', function() {
$.getScript(prefix +'js/galleryview/jquery.galleryview-2.1.js', function() {
$.getScript(prefix +'js/galleryview/jquery.timers-1.2.js', function() {
$('#gallery').show();
$('#gallery').galleryView({
transition_speed: 1200,
background_color: '#006',
border: 'none',
easing: 'easeInOutBack',
nav_theme:prefix +"js/galleryview/themes/dark"
});
});
});
});
لا تنتمي إلى StackOverflow