کارهای برتر انجمن

shnoit

Well-Known Member
سلام
در مورد بخش کارهای برتر انجمن میخواستم توضیحاتی بهم بدین که چطوری و چگونه از java و css استفاده شده!!!!
ممنون میشم اگه نمونه خود انجمن رو توضیح بدین که بشه استفاده کرد !!!:rose:
 

eAmin

Well-Known Member
سلام.

این کد خود انجمن، در کل کار زیاد سختی نیست:
کد:
/* MAJID ONLINE FORUMS - SHOW TOP WORKS */
/* Allright reserved by MajidOnline.com (Majid Alavizadeh) July 2006 
	Ver 2.0 - April 2009*/
    
    
function slideSwitch() {
    var $active = $('#topWorkSlideShow DIV.active');

    if ( $active.length == 0 ) $active = $('#topWorkSlideShow DIV:last');

    var $next =  $active.next().length ? $active.next()
        : $('#topWorkSlideShow DIV:first');

    // uncomment below to pull the divs randomly
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 5000 );
});


document.write('<div id="topWorkSlideShow">');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=219;http://www.forum.majidonline.com/showthread.php?t=119813"><img src="topwork_files/ex000000.gif" alt="Name : Explosion | Designer : a_vray" /></a>');
    document.write('    </div>');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=218;http://www.forum.majidonline.com/showthread.php?t=118948"><img src="topwork_files/potato00.gif" alt="Name : Potato | Designer : mohammad.maher" /></a>');
    document.write('    </div>');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=217;http://forum.majidonline.com/showthread.php?p=794522"><img src="topwork_files/intro000.gif" alt="Name : Majid Online Intro | Designer : shirani" /></a>');
    document.write('    </div>');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=216;http://www.forum.majidonline.com/showthread.php?t=116287"><img src="topwork_files/devotion.gif" alt="Name : Devotion | Designer : JG.Deev" /></a>');
    document.write('    </div>');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=215;http://forum.majidonline.com/showthread.php?t=118061"><img src="topwork_files/earth-21.gif" alt="Name : Earth 2124 | Designer : Ali Rahimi" /></a>');
    document.write('    </div>');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=214;http://www.forum.majidonline.com/showthread.php?p=790870"><img src="topwork_files/Alone-pa.gif" alt="Name : Alone passage | Designer : hamed1star" /></a>');
    document.write('    </div>');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=213;http://forum.majidonline.com/showthread.php?t=117770"><img src="topwork_files/Dark-Fut.gif" alt="Name : Dark Futuristic Alley | Designer : hλdi" /></a>');
    document.write('    </div>');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=212;http://www.forum.majidonline.com/showthread.php?t=116648"><img src="topwork_files/Battlesh.gif" alt="Name : Battleship Explosion | Designer : alizap" /></a>');
    document.write('    </div>');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=211;http://www.forum.majidonline.com/showthread.php?t=116650"><img src="topwork_files/mo000000.gif" alt="Name : MajidOnline | Designer : NAKOOT" /></a>');
    document.write('    </div>');
    document.write('    <div class="active">');
    document.write('        <a href="http://www.majidonline.com/showtop.php?goto=210;http://forum.majidonline.com/showthread.php?t=116490"><img src="topwork_files/lap00000.gif" alt="Name : Laptop | Designer : Mandana_ns" /></a>');
    document.write('    </div>');
document.write('</div>');
نیاز به توضیح بیشتر داشتید، می تونم اینکار برای شما انجام بدم.
 
آخرین ویرایش:

shnoit

Well-Known Member
دوست عزیز امین جان میسی:wink:
من از کدی که گذاشتین + کدهای cssی که به نظرم میومد ربط دارن، تو یه صفحه ساده استفاده کردم، منتها جواب نداد !! نمیدونم ایراد کار من کجا بوده ! میشه نمونه ساده خود انجمن که کار کنه (جواب بده) رو تو یه صفحه بزارین به عنوان نمونه :rose:
 

shnoit

Well-Known Member
مسعود جان، اول باید فایل http://forum.majidonline.com/styles/majidonline/js/jquery-1.2.6.min.js رو تو صفحه فراخوانی کنی.
بعد به کدهای css زیر نیاز داری :
کد:
#topWorkSlideShow {
    position:relative; 
    height:120px;
    text-align: center;
}

#topWorkSlideShow DIV {
    position:absolute;
    top:0;
    left:0;
    z-index:8;
    opacity:0.0;
    height: 120px;
    background-color: #e6eaed;
}

#topWorkSlideShow DIV.active {
    z-index:10;
    opacity:1.0;
}

#topWorkSlideShow DIV.last-active {
    z-index:9;
}

#topWorkSlideShow DIV IMG {
    height: 120px;
    display: block;
    border: 0;
    margin-bottom: 10px;
}


و بعد از اون به کدهای اولین پست امین نیاز داری، که همینجا هست. :wink:

موفق باشی :neutral:
 

جدیدترین ارسال ها

بالا