حسن قاسمی
شنبه 20 تیر 1394, 18:45 عصر
سلام
بنده برناه نویس نیستم، منتهی میخوایم برای مسجد، یک قالب در وبلاگ بیان ایجاد کنم که عملا با استفاده از کدهای از پیش آمده و ویرایش کردن اوناست ... در حال حاضر یک اسلایدر گذاشتم تا آخرین تاویر مسجد رو نشون بده و داره درست کار میکنه، منتهی یه مشکلی که داره، تو نمایش دادن، برعکس عمل میکنه ... ینی جدیدترین تصویر رو در آخرین مکان نشون میده ... حالا میخواستم ببینم برای رفع این مشکل باید چی کار کنم؟ ( http://sahebmsq.blog.ir/ )
این کد جاوا اسکریپتشه!
<script src="//blog.ir/media/script/blog.min.js?ax8IM4" charset="utf-8"></script> <script>(function(){
window._rb={id:'91VSmx46qGy4BMKb', vi:'763037556a91cd65337ed22b81a943e0', dh:'2bc9cc2ec639638132bc7da3cf831f89', fp: 'repf=287&reph=6ZDL4ZqnQaFJ5jeqdPW8bQ==&repc=display_stat&rept=1436609325&vsc=121219&vwc=291281'};
var s=document.createElement('script'),
h=document.getElementsByTagName('script')[0];
s.async="async";
s.src='//radar.bayan.ir/rb.js?v=e2';
h.parentNode.insertBefore(s,h);
}())</script>
<noscript><img src="//radar.bayan.ir/91VSmx46qGy4BMKb/rb.gif?nos&vi=763037556a91cd65337ed22b81a943e0&dh=2bc9cc2ec639638132bc7da3cf831f89&refx=" alt="" title="a" border="0"></noscript>
<script src="//blog.ir/media/script/jquery-1.8.2.min.js?1" type="text/javascript"></script>
<script>
//<![CDATA[
$(function(){
$('a.tab').click(function(){
$('ul.tabs li').removeClass('active');
$(this).parents('li:first').addClass('active');
$('#tabs_contain div.tab_cnt').removeClass('tab_cnt_active');
$($(this).attr('rel')).addClass('tab_cnt_active');
});
$('#ModalBG').click(function() {
$('#Modal').fadeOut();
});
function PAPslider() {
var $Container = $('ul#SlidesCont'),
$Items = $('ul#SlidesCont').find('li'),
$Next = $('#Next'),
$Prev = $('#Prev'),
Size = $Items.size(),
PerPage = 3,
NPages = Math.ceil(Size/(PerPage + 0.001)),
Cur = 0,
SlideWidth = 195.2,
Speed = 1000,
Duration = 5000;
Pointer = 0,
StandBy = false;
function moveToSlide(t)
{
$Container.animate({
right: -t*SlideWidth});
Cur = t;
}
function Next() {
if (Cur >= Size - PerPage)
return;
moveToSlide(Cur+1);
}
function Prev() {
if (Cur <= 0)
return;
moveToSlide(Cur-1);
}
function First() {
if (Cur <= 0)
return;
moveToSlide(0);
}
function Slide(){
StandBy = false;
window.clearInterval(timer);
timer = setInterval(Slide, Duration);
if (Cur >= Size - PerPage)
First();
else
Next();
}
var timer;
$Next.click(function () {
StandBy = true;
Next()
AutoSlider(true);
});
$Prev.click(function () {
StandBy = true;
Prev()
AutoSlider(true);
});
function AutoSlider(t, m)
{
if (typeof(m) === "undefined" || StandBy) m = 1;
if (t)
{
window.clearInterval(timer);
timer = setInterval(Slide, Duration * m);
}
else
{
window.clearInterval(timer);
}
}
window.AutoSlider = AutoSlider;
$('#SliderWrap').hover(function() {
AutoSlider(false);
}, function() {
AutoSlider(true, 0.1);
});
AutoSlider(true);
}
PAPslider();
$('a.rate-button').hover(function() {
var leftPos = $(this).position().left+24,
topPos = $(this).position().top-4,
$tip = $(this).find('div.tip');
$tip.css({'top':topPos ,'left': leftPos}).stop(true, true).fadeIn();
}, function() {
$(this).find('div.tip').stop(true, true).fadeOut();
});
$('.comments').hover(function() {
var leftPos = $(this).position().left+24,
topPos = $(this).position().top,
$tip = $(this).find('div.tip');
$tip.css({'top':topPos ,'left': leftPos}).stop(true, true).fadeIn();
}, function() {
$(this).find('div.tip').stop(true, true).fadeOut();
});
$('.SideTitleWrp').click(function() {
var $target = $(this).parent().find('.cnt');
if ($target.hasClass('hidden')) {
$target.removeClass('hidden');
$(this).removeClass('plus');
} else if (!$target.hasClass('hidden') ) {
$target.addClass('hidden');
$(this).addClass('plus');
}
});
});
//]]>
</script>
<script type="text/javascript" src="http://bayanbox.ir/view/2674611354452678868/jquery-1.8.2.min.js"></script>
این کد css:
#SliderWrap {
background: #5E5E5E url("//cdn.bayan.ir/blog/templates/55/body.png") repeat scroll 0% 0%;
margin: 0 auto 5px;
overflow: hidden;
position: relative;
width: 642px;
}
.SlidesWrap {
width: 1755px;
margin-left: 2.5px;
float: right;
overflow: hidden;
position: relative;
}
ul#SlidesCont {
width: 1755px;
position: relative;
float: right;
padding: 0;
margin: 10px 23px 0px 20px;
}
ul#SlidesCont li {
width: 190px;
float: left;
position: relative;
list-style: none;
direction: rtl;
margin-left: 5px ;
-moz-transition: all .2s;
-webkit-transition: all .2s;
-o-transition: all .2s;
}
ul#SlidesCont li:hover {
background-color: ;
box-shadow: 0 0 0px #222;
-moz-box-shadow: 0 0 0px #222;
-webkit-box-shadow: 0 0 0px #222;
}
ul#SlidesCont li:hover .slideContent {
color: #333;
}
ul#SlidesCont li:hover h2 a {
color: #fff;
}
ul#SlidesCont li .SlideImg {
background-color: #c7c7c7;
border: 4px solid #666;
height: 100px;
margin: 10px 12px 5px;
overflow: hidden;
width: 175px;
}
ul#SlidesCont li:hover .SlideImg {
border-color: #048AD6;
}
ul#SlidesCont li h2 a {
color: #eee;
font-size: 16px;
font-weight: bold;
margin: -8px 3px 0px -12px;
display:inline-block;
text-decoration: none;
font-family:"b nazanin","Times New Roman", Times,Arial,Helvetica;;
}
ul#SlidesCont li .slideContent {
color: #ccc;
margin: 5px 10px 10px;
text-align: center;
clear: both;
font: 12px/20px tahoma;
}
#Prev, #Next {
bottom: 0;
cursor: pointer;
height: 100%;
position: absolute;
width: 25px;
text-indent: -9999px;
z-index: 10;
text-align:center;
font: 11px/25px tahoma;
}
#Next {
right: 0;
background: url('http://bayanbox.ir/view/7036204748272633734/next.png') no-repeat center right #666;
}
#Next:hover {
background-color: #048AD6;
color:#fff;
background-position: center left;
}
#Prev {
left: 0px;
background: url('http://bayanbox.ir/view/3691375668913263580/prev.png') no-repeat center left #666;
}
#Prev:hover{
background-color: #048AD6;
color:#fff;
background-position: center right;
}
div.tip {
position: absolute;
height: 22px;
border:1px solid #999;
border-left:0;
white-space: nowrap;
background-color: #777;
display: none;
padding: 0 7px;
color: #fff;
}
.Collapsibe {
color: #CCCCCC;
float: left;
font: 20px/20px arial;
height: 22px;
margin: 4px 0 0 6px;
text-align: center;
width: 20px;
}
.Collapsibe:hover {
color: #fff;
}
.hidden {
display: none !important;
}
.SideTitleWrp {
width: 220px;
height: 30px;
background: url('//bayanbox.ir/blog/pap/templates/PlusMinus.png') no-repeat top left #666;
}
.plus {
background-position: left -30px;
}
ul.ulList {padding:0;margin:0;}
ul.ulList li {
float:right;
width: 150px;
}
اینم html:
<box:post_list flag="pic" max="9">
<div id="SliderWrap">
<a id="Next">بعدی</a>
<div class="SlidesWrap">
<ul id="SlidesCont">
<view:post_list>
<li>
<div class="SlideImg"><a href="(*post_link*)"><img alt="" src="(*post_image*)"></a></div>
<div class="slideContent"><h2><a href="(*post_link*)">(*post_title*)</a></h2>
</div>
</li>
</view:post_list>
</ul>
</div>
<a id="Prev">قبلی</a>
</div>
</box:post_list>
بنده برناه نویس نیستم، منتهی میخوایم برای مسجد، یک قالب در وبلاگ بیان ایجاد کنم که عملا با استفاده از کدهای از پیش آمده و ویرایش کردن اوناست ... در حال حاضر یک اسلایدر گذاشتم تا آخرین تاویر مسجد رو نشون بده و داره درست کار میکنه، منتهی یه مشکلی که داره، تو نمایش دادن، برعکس عمل میکنه ... ینی جدیدترین تصویر رو در آخرین مکان نشون میده ... حالا میخواستم ببینم برای رفع این مشکل باید چی کار کنم؟ ( http://sahebmsq.blog.ir/ )
این کد جاوا اسکریپتشه!
<script src="//blog.ir/media/script/blog.min.js?ax8IM4" charset="utf-8"></script> <script>(function(){
window._rb={id:'91VSmx46qGy4BMKb', vi:'763037556a91cd65337ed22b81a943e0', dh:'2bc9cc2ec639638132bc7da3cf831f89', fp: 'repf=287&reph=6ZDL4ZqnQaFJ5jeqdPW8bQ==&repc=display_stat&rept=1436609325&vsc=121219&vwc=291281'};
var s=document.createElement('script'),
h=document.getElementsByTagName('script')[0];
s.async="async";
s.src='//radar.bayan.ir/rb.js?v=e2';
h.parentNode.insertBefore(s,h);
}())</script>
<noscript><img src="//radar.bayan.ir/91VSmx46qGy4BMKb/rb.gif?nos&vi=763037556a91cd65337ed22b81a943e0&dh=2bc9cc2ec639638132bc7da3cf831f89&refx=" alt="" title="a" border="0"></noscript>
<script src="//blog.ir/media/script/jquery-1.8.2.min.js?1" type="text/javascript"></script>
<script>
//<![CDATA[
$(function(){
$('a.tab').click(function(){
$('ul.tabs li').removeClass('active');
$(this).parents('li:first').addClass('active');
$('#tabs_contain div.tab_cnt').removeClass('tab_cnt_active');
$($(this).attr('rel')).addClass('tab_cnt_active');
});
$('#ModalBG').click(function() {
$('#Modal').fadeOut();
});
function PAPslider() {
var $Container = $('ul#SlidesCont'),
$Items = $('ul#SlidesCont').find('li'),
$Next = $('#Next'),
$Prev = $('#Prev'),
Size = $Items.size(),
PerPage = 3,
NPages = Math.ceil(Size/(PerPage + 0.001)),
Cur = 0,
SlideWidth = 195.2,
Speed = 1000,
Duration = 5000;
Pointer = 0,
StandBy = false;
function moveToSlide(t)
{
$Container.animate({
right: -t*SlideWidth});
Cur = t;
}
function Next() {
if (Cur >= Size - PerPage)
return;
moveToSlide(Cur+1);
}
function Prev() {
if (Cur <= 0)
return;
moveToSlide(Cur-1);
}
function First() {
if (Cur <= 0)
return;
moveToSlide(0);
}
function Slide(){
StandBy = false;
window.clearInterval(timer);
timer = setInterval(Slide, Duration);
if (Cur >= Size - PerPage)
First();
else
Next();
}
var timer;
$Next.click(function () {
StandBy = true;
Next()
AutoSlider(true);
});
$Prev.click(function () {
StandBy = true;
Prev()
AutoSlider(true);
});
function AutoSlider(t, m)
{
if (typeof(m) === "undefined" || StandBy) m = 1;
if (t)
{
window.clearInterval(timer);
timer = setInterval(Slide, Duration * m);
}
else
{
window.clearInterval(timer);
}
}
window.AutoSlider = AutoSlider;
$('#SliderWrap').hover(function() {
AutoSlider(false);
}, function() {
AutoSlider(true, 0.1);
});
AutoSlider(true);
}
PAPslider();
$('a.rate-button').hover(function() {
var leftPos = $(this).position().left+24,
topPos = $(this).position().top-4,
$tip = $(this).find('div.tip');
$tip.css({'top':topPos ,'left': leftPos}).stop(true, true).fadeIn();
}, function() {
$(this).find('div.tip').stop(true, true).fadeOut();
});
$('.comments').hover(function() {
var leftPos = $(this).position().left+24,
topPos = $(this).position().top,
$tip = $(this).find('div.tip');
$tip.css({'top':topPos ,'left': leftPos}).stop(true, true).fadeIn();
}, function() {
$(this).find('div.tip').stop(true, true).fadeOut();
});
$('.SideTitleWrp').click(function() {
var $target = $(this).parent().find('.cnt');
if ($target.hasClass('hidden')) {
$target.removeClass('hidden');
$(this).removeClass('plus');
} else if (!$target.hasClass('hidden') ) {
$target.addClass('hidden');
$(this).addClass('plus');
}
});
});
//]]>
</script>
<script type="text/javascript" src="http://bayanbox.ir/view/2674611354452678868/jquery-1.8.2.min.js"></script>
این کد css:
#SliderWrap {
background: #5E5E5E url("//cdn.bayan.ir/blog/templates/55/body.png") repeat scroll 0% 0%;
margin: 0 auto 5px;
overflow: hidden;
position: relative;
width: 642px;
}
.SlidesWrap {
width: 1755px;
margin-left: 2.5px;
float: right;
overflow: hidden;
position: relative;
}
ul#SlidesCont {
width: 1755px;
position: relative;
float: right;
padding: 0;
margin: 10px 23px 0px 20px;
}
ul#SlidesCont li {
width: 190px;
float: left;
position: relative;
list-style: none;
direction: rtl;
margin-left: 5px ;
-moz-transition: all .2s;
-webkit-transition: all .2s;
-o-transition: all .2s;
}
ul#SlidesCont li:hover {
background-color: ;
box-shadow: 0 0 0px #222;
-moz-box-shadow: 0 0 0px #222;
-webkit-box-shadow: 0 0 0px #222;
}
ul#SlidesCont li:hover .slideContent {
color: #333;
}
ul#SlidesCont li:hover h2 a {
color: #fff;
}
ul#SlidesCont li .SlideImg {
background-color: #c7c7c7;
border: 4px solid #666;
height: 100px;
margin: 10px 12px 5px;
overflow: hidden;
width: 175px;
}
ul#SlidesCont li:hover .SlideImg {
border-color: #048AD6;
}
ul#SlidesCont li h2 a {
color: #eee;
font-size: 16px;
font-weight: bold;
margin: -8px 3px 0px -12px;
display:inline-block;
text-decoration: none;
font-family:"b nazanin","Times New Roman", Times,Arial,Helvetica;;
}
ul#SlidesCont li .slideContent {
color: #ccc;
margin: 5px 10px 10px;
text-align: center;
clear: both;
font: 12px/20px tahoma;
}
#Prev, #Next {
bottom: 0;
cursor: pointer;
height: 100%;
position: absolute;
width: 25px;
text-indent: -9999px;
z-index: 10;
text-align:center;
font: 11px/25px tahoma;
}
#Next {
right: 0;
background: url('http://bayanbox.ir/view/7036204748272633734/next.png') no-repeat center right #666;
}
#Next:hover {
background-color: #048AD6;
color:#fff;
background-position: center left;
}
#Prev {
left: 0px;
background: url('http://bayanbox.ir/view/3691375668913263580/prev.png') no-repeat center left #666;
}
#Prev:hover{
background-color: #048AD6;
color:#fff;
background-position: center right;
}
div.tip {
position: absolute;
height: 22px;
border:1px solid #999;
border-left:0;
white-space: nowrap;
background-color: #777;
display: none;
padding: 0 7px;
color: #fff;
}
.Collapsibe {
color: #CCCCCC;
float: left;
font: 20px/20px arial;
height: 22px;
margin: 4px 0 0 6px;
text-align: center;
width: 20px;
}
.Collapsibe:hover {
color: #fff;
}
.hidden {
display: none !important;
}
.SideTitleWrp {
width: 220px;
height: 30px;
background: url('//bayanbox.ir/blog/pap/templates/PlusMinus.png') no-repeat top left #666;
}
.plus {
background-position: left -30px;
}
ul.ulList {padding:0;margin:0;}
ul.ulList li {
float:right;
width: 150px;
}
اینم html:
<box:post_list flag="pic" max="9">
<div id="SliderWrap">
<a id="Next">بعدی</a>
<div class="SlidesWrap">
<ul id="SlidesCont">
<view:post_list>
<li>
<div class="SlideImg"><a href="(*post_link*)"><img alt="" src="(*post_image*)"></a></div>
<div class="slideContent"><h2><a href="(*post_link*)">(*post_title*)</a></h2>
</div>
</li>
</view:post_list>
</ul>
</div>
<a id="Prev">قبلی</a>
</div>
</box:post_list>