بهمن ۱۱، ۱۳۹۱

نوسازی لانچپد در OS X

برای نوسازی لانچپد (Launchpad) باید دیتابیس اون رو حذف کرد تا دوباره از نو بسازتش.
برای این کار:
  1.  ترمینال رو باز کنید (/Applications/Utilities/Terminal)
  2. بنویسید open ~/Library/Application\ Support/Dock
  3. یک فایل با پسوند .db هست٬ پاکش کنید
  4. بارگردید به ترمینال و بنویسید sudo killall Dock (برای پسورد ازتون سوال میپرسه)
تموم!

بهمن ۰۱، ۱۳۹۱

Jquery: Sticky footer solution


It asked hundred of times, and will be asked thousands again. There are tones of answers some of them stick the div in bottom of screen, not the page, some them needs you change your html and css. But I found this solution really easy to use. It uses JQuery and works even in IE6;
Assume that your footer div has footer ID.

Put this in bottom of page:

<script type="text/javascript">
  <!--

    $(document).ready(function () {

        var docHeight = $(window).height();
        var footerHeight = $('#footer').height();
        var footerTop = $('#footer').position().top + footerHeight;

        if (footerTop < docHeight) {
            $('#footer').css('margin-top', 10 + (docHeight - footerTop) + 'px');
        }
    });

    // -->
 </script>


It just works.

source: http://blog.gaijindesign.com/jquery-stick-your-div-to-the-bottom-of-a-short-page-v2-0/