هاست لینوکس

آخرین بسته‌ی MyBB: نسخه‌ی 1.8.27 MyBB منتشر شد


امتیاز موضوع:
  • 0 رأی - میانگین امتیازات: 0
  • 1
  • 2
  • 3
  • 4
  • 5
ایجاد ساید بار کنار سایت یا کلیک کردن
#3
درود

با تشکر از میدوی عزیز برای این که قابلیت باز و بسته شدن با کلیک را ایجاد کنید نیاز به کمی جاوا اسکریپت دارید

خوب من برای تکمیل کردنش نحوه ی کلی قرار دادنش رو براتون میگم البته هنوز خودم این کد را تست نکردم و نمیدونم آخرش چه شکلی میشهTongue

به قالب مورد نظر و سپس قالب های گروه بندی نشده برید سپس به هدر اینکلود
کد زیر را آخر کد ها کپی کنید و ذخیره

کد:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
<script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>

    <script type="text/javascript">
    $(function(){
        $('.slide-out-div').tabSlideOut({
            tabHandle: '.handle',                     //class of the element that will become your tab
            pathToTabImage: 'images/contact_tab.gif', //path to the image for the tab //Optionally can be set using css
            imageHeight: '122px',                     //height of tab image           //Optionally can be set using css
            imageWidth: '40px',                       //width of tab image            //Optionally can be set using css
            tabLocation: 'left',                      //side of screen where tab lives, top, right, bottom, or left
            speed: 300,                               //speed of animation
            action: 'click',                          //options: 'click' or 'hover', action to trigger animation
            topPos: '200px',                          //position from the top/ use if tabLocation is left or right
            leftPos: '20px',                          //position from left/ use if tabLocation is bottom or top
            fixedPosition: false                      //options: true makes it stick(fixed position) on scroll
        });

    });

    </script>

سپس به قالب هدر یا جایی که که میخواهید باکس اونجا رویت بشه برید و کد زیر را در جای مناسب قرار بدید ( تست کنید ببینید کجا بهتره)

کد:
<div class="slide-out-div">
            <a class="handle" href="http://link-for-non-js-users.html">Content</a>
            <h3>Contact me</h3>
            <p>Thanks for checking out my jQuery plugin, I hope you find this useful.
            </p>
            <p>This can be a form to submit feedback, or contact info</p>
        </div>

سپس بیرد به پوسته ها و پوسته ی مورد نظر و سپس global.css

حالا کد زیر را آخر کد ها کپی کنید

کد php:
.slide-out-div {
          
padding20px;
          
width250px;
          
background#ccc;
          
border1px solid #29216d;
      


خوب حالا یک شات بزارید ببینیم چه شدBig Grin

ضمنا با جست و جو در گوگل برای مثلا : باکس جی کوری باز باز شونده مطلب و کد های آماده پیدا خواهید کرد.

نکته خط اول در کد اول
کد:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
که گذاشتیم برای فراخوانی کتاب خانه جی کوئری هستش اگه این بانک قبلا در قالب شما برای قابلیتی دیگر فراخوانی شده نیازی نیست دوباره تکرار شود.
و خط های بعدی نیز برای دستوراتی هست که به کتابخانه داده میشه

منظور کد های زیر است
کد:
<script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>

    <script type="text/javascript">
    $(function(){
        $('.slide-out-div').tabSlideOut({
            tabHandle: '.handle',                     //class of the element that will become your tab
            pathToTabImage: 'images/contact_tab.gif', //path to the image for the tab //Optionally can be set using css
            imageHeight: '122px',                     //height of tab image           //Optionally can be set using css
            imageWidth: '40px',                       //width of tab image            //Optionally can be set using css
            tabLocation: 'left',                      //side of screen where tab lives, top, right, bottom, or left
            speed: 300,                               //speed of animation
            action: 'click',                          //options: 'click' or 'hover', action to trigger animation
            topPos: '200px',                          //position from the top/ use if tabLocation is left or right
            leftPos: '20px',                          //position from left/ use if tabLocation is bottom or top
            fixedPosition: false                      //options: true makes it stick(fixed position) on scroll
        });

    });

    </script>

موفق باشید
پاسخ
 سپاس شده توسطAmin Yaghubi (۱۳۹۳/۱/۴، ۱۶:۳۰:۳۷ عصر) ، میدوری (۱۳۹۳/۱/۴، ۲۰:۰۳:۱۶ عصر) ، firstboy000 (۱۳۹۳/۱/۸، ۱۵:۲۷:۰۲ عصر) ، شماره مجازی (۱۴۰۱/۸/۲۶، ۰۱:۵۱:۵۲ صبح) ، گراف مسنجر (۱۴۰۱/۱۰/۳، ۰۴:۱۳:۵۸ صبح) ، چارتر ۴۲۴ (۱۴۰۲/۹/۱۲، ۱۵:۱۴:۳۲ عصر)


پیام‌های داخل این موضوع
ایجاد ساید بار کنار سایت یا کلیک کردن - توسط dozanani - ۱۳۹۳/۱/۳، ۲۱:۴۷:۳۱ عصر
RE: ایجاد ساید بار کنار سایت یا کلیک کردن - توسط صالح غلامیان - ۱۳۹۳/۱/۴، ۱۴:۴۷:۳۰ عصر

موضوع‌های مشابه…
موضوع نویسنده پاسخ بازدید آخرین ارسال
Thumbs Down آموزش طریقه اضافه کردن ایکون در کنار آدرس سایت diyarbikasan 18 15,838 ۱۳۹۰/۳/۸، ۱۱:۲۱:۲۷ صبح
آخرین ارسال: Cancer9003

پرش به انجمن:


کاربرانِ درحال بازدید از این موضوع: 1 مهمان