Search Results

Search found 5 results on 1 pages for 'maju'.

Page 1/1 | 1 

  • jQuery scrollTop not working in chrome but working in Firefox

    - by Maju
    I have used a scrollTop function in jquery for navigating to top. But strangely 'The smooth animated scroll' stopped working in safari and chrome(scrolling without smooth animation) after I made some changes. But it is working smoothly in Firefox. What could be wrong? Here is the jquery function i used, jQuery $('a#gotop').click(function() { $("html").animate({ scrollTop: 0 }, "slow"); //alert('Animation complete.'); //return false; }); HTML <a id="gotop" href="#">Go Top </a> CSS #gotop { Cursor: pointer; position: relative; float:right; right:20px; /*top:0px;*/ }

    Read the article

  • How to maximize a floating div width when one div is removed or hidden?

    - by Maju
    I have two div columns sidebar(left) and page-content(right). I toggle removing and adding 'sidebar' using jquery but unable to maximize '#page-content' to take up the empty space when sidebar is removed.I tried removing 'margin-left:250px;' but the #page-content is going to the bottom. In short i want Toggle before | sidebar | page-content | Toggle after | page-content                | but it happens like | sidebar | | page-content                | Please help. Here is the css and jquery used. Thanx css #sidebar { float:left; width:185px; color:#333; padding:25px 25px; } #page-content { margin-left:250px; padding:25px 35px 25px 25px; color:#333; } jQuery $(document).ready(function() { $('a#side-toggle').click(function() { $('#sidebar').toggle(400); return false; }); });

    Read the article

  • jquery How to refresh pages when resize happens?

    - by Maju
    I have some indicator displays settings which float above a menu. Problem is when someone resizes the 'indicators stays on the same place', the page needs to 'refreshed to position correctly'. How to have a page refresh by itself when it detects the page is being resized? or is there any better way to do it? jQuery function findPosY(b) { var a = 0; if (b.offsetParent) { while (1) { a += b.offsetTop; if (!b.offsetParent) { break } b = b.offsetParent } } else { if (b.y) { a += b.y } } return a } function findPosX(b) { var a = 0; if (b.offsetParent) { while (1) { a += b.offsetLeft; if (!b.offsetParent) { break } b = b.offsetParent } } else { if (b.x) { a += b.x } } return a } function setNotifications() { $("#shortcut_notifications span").each(function () { if ($(this).attr("rel") != "") { target = $(this).attr("rel"); if ($("#" + target).length > 0) { var a = findPosY(document.getElementById(target)); var b = findPosX(document.getElementById(target)); $(this).css("top", a - 31 + "px");//-24 $(this).css("left", b + 83 + "px")//+60 } } }); $("#shortcut_notifications").css("display", "block") } CSS #shortcut_notifications { display:none; } .notification { color:#fff; font-weight:700; text-shadow:1px 0 0 #333; background:transparent url(../images/bg_notification.png) no-repeat center; position: absolute;/*absolute*/ width:37px;/*37*/ height:37px; display:block; text-align:center; padding-top:17px; color:#ffffff; } #nav li { display:block; float:right; padding:19px 21px; text-align: left; position:relative; height:24px; font-size:16px; } HTML <li class="settings"><a class="settings" href="#">Settings</a> <ul> <li><a href="#">Game Settings</a></li> <li><a href="#">Transactions </a></li> </ul> </li>

    Read the article

  • Collpasible menu needs all header needs to be closed on initial loading

    - by Maju
    I have a sidebar with collapsible menu it works fine but all the values come expanded the initial loading time.I want it to be closed on load and toggled thereafter. Here is the jquery used // Sidebar Toggle var fluid = { Toggle : function(){ var default_hide = {"grid": true }; $.each( ["pagesnav", "commentsnav", "userssnav", "imagesnav"], function() { var el = $("#" + (this == 'accordon' ? 'accordion-block' : this) ); if (default_hide[this]) { el.hide(); $("[id='toggle-"+this+"']").addClass("hidden"); } $("[id='toggle-"+this+"']") .bind("click", function(e) { if ($(this).hasClass('hidden')){ $(this).removeClass('hidden').addClass('visible'); el.slideDown(); } else { $(this).removeClass('visible').addClass('hidden'); el.slideUp(); } e.preventDefault(); }); } ); } } jQuery(function ($) { if($("[id^='toggle']").length){fluid.Toggle();} }); here is the html <span class="ul-header"><a id="toggle-pagesnav" href="#" class="toggle visible">Content</a></span> <ul id="pagesnav"> <li><a class="icn_manage_pages" href="#">Manage Pages</a></li> <li><a class="icn_add_pages" href="#">Add Pages</a></li> <li><a class="icn_edit_pages" href="#">Edit Pages</a></li> <li><a class="icn_delete_pages" href="#">Delete Pages</a></li> </ul> <!-- End Content Nav --> <!-- Start Comments Nav --> <span class="ul-header"><a id="toggle-commentsnav" href="#" class="toggle visible">Comments</a></span> <ul id="commentsnav"> <li><a class="icn_manage_comments" href="#">Manage Comments</a></li> <li><a class="icn_add_comments" href="#">Add Comments</a></li> <li><a class="icn_edit_comments" href="#">Edit Comments</a></li> <li><a class="icn_delete_comments" href="#">Delete Comments</a></li> </ul> here is the css used .toggle { display:block; } .ul-header a.visible { background:url('../img/icons/small/toggle_close.png') no-repeat scroll 97% 50%; } .ul-header a.hidden { background:url('../img/icons/small/toggle_open.png') no-repeat scroll 97% 50%; } Please help.

    Read the article

  • Jquery : How to load a function after some interval or after end of another function or event

    - by Maju
    I need to run a function 'setNotifications()' after a timed delay or at the end of completion of the previous animation('#topannounce' animation).But jQuery is not running the 'setNotifications()'after the animation. What should I do? or is there a better way to run the function?Plz hlp.Thanx. Here is the jQuery I have. $('a#resetbtn').bind('click', function(){ //setNotifications(); $.cookie('notificationBar', 'open'); //$('#topannounce').animate({opacity: 1.0}, 3000).fadeIn('slow'); $('#topannounce').fadeIn('slow'); setNotifications(); }); function setNotifications() { alert("load:setNotifications..."); }

    Read the article

1