jQuery Tips Everyone Should Know

A collection of simple tips to help you  In   jQuery . Back to Top Button By using the animate and scrollTop methods in jQuery you don’t need a plugin to create a simple scroll-to-top animation: $(‘a.top’).click(function (e) { e.preventDefault(); $(document.body).animate({scrollTop: 0}, 800); }); <!– Create an anchor tag –> <a class=”top” href=”#”>Back to top</a>… Continue reading jQuery Tips Everyone Should Know

Scrolling to the Top and Bottom with jQuery

Here’s a way to scroll to the top or bottom of your website with a simple click. $(function() { // the element which we want to scroll var $elem = $(‘#Mybutton’); // show the buttons $(‘#Go_up’).fadeIn(‘slow’); $(‘#Go_down’).fadeIn(‘slow’); // whenever we scroll fade out both buttons $(window).bind(‘scrollstart’, function(){ $(‘#Go_up,#Go_down’).stop().animate({‘opacity’:’0.2′}); }); // and whenever we stop scrolling… Continue reading Scrolling to the Top and Bottom with jQuery

HOW TO CALL C# METHOD FROM JAVASCRIPT FUNCTION

function getCoursesMapPoint() {       var selectedVal = JSON.stringify({ “localize”: localize }); $.ajax({ type: “POST”, url: ‘/Pages/Branches.aspx/BindCoursesPoint’ , data: selectedVal, contentType: “application/json; charset=utf-8”, dataType: “json”, success: function (response) {     var data = $.parseJSON(response.d);          },     failure: function (response) { alert(response.d); }     }) } **********************C# Code… Continue reading HOW TO CALL C# METHOD FROM JAVASCRIPT FUNCTION