Create a working example with jsfiddle.net
Start a new thread

On Mon, Oct 24, 2011 at 9:31 AM, Masoud Yousefnejad <[email protected]>wrote:

> Im sorry to ask my question here but when I try to create new
> discussion I will get an unclear error, however
>
>
> Need help to convert short Jquery Script to Mootools
> I was wondering if someone help me to convert a short Jquery script to
> mootools i found this script in following address, this script float
> the share bar inside of the page:
> http://www.simplebloggertutorials.com/2 ... -like.html
>
> here is the script
> Code:
> [code]
> <script type='text/javascript'>
> $(document).ready(function() {
>
> var $sidebar   = $("#sharebox"),
> $window    = $(window),
> offset     = $sidebar.offset(),
> topPadding = 15;
>
> $window.scroll(function() {
> if ($window.scrollTop() > offset.top) {
> $sidebar.stop().animate({
> marginTop: $window.scrollTop() - offset.top + topPadding
> });
> } else {
> $sidebar.stop().animate({
> marginTop: 0
> });
> }
> });
>
> });
> </script>
>
> [/code]
> Thanks a million in advance.

Reply via email to