$.ajax({ type: "Get", url: "/User/ResetPassword/", success: function (data) { $("#divId").html(data); } });
Friday, 12 April 2013
jquery ajax call to partial view in MVC3
Saturday, 15 December 2012
scrollto - jQuery scroll To Element
Here is jquery code
<script> function scrollToId(id) { $("html, body").animate({ scrollTop: $('#'+id).offset().top }, 1000); } </script>
Here is HTML
<ul class="menu"> <li><a onclick="scrollToId('Div1')">Example of a Link</a></li> <li><a href="#Div2">The Active Link</a></li> </ul>
Thursday, 25 October 2012
How to enable jQuery intellisense in Visual Studio
There are two ways to enable jQuery intellisense in an external js file.
First Method :
To use the jQuery intellisense in an external javascript file, use the following configuration line on top of your javascript file.
Second Method:
Simply drag-n-drop the jQuery library from Solution Explorer to the opened external JavaScript file.
![]() |
jQuery Intellisense in Visual Studio (1) |
![]() |
jQuery intellisense in Visual Studio (2) |
Scroll to an element smoothly using jQuery
To get a smooth scrolling effect using one line of jQuery. You can use this small function of jQuery. It works especially well with click.
<html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script>
$(document).ready(function (){
$("#click").click(function (){
$('html, body').animate({
scrollTop: $("#div1").offset().top
}, 2000);
});
});
</script>
<div id="div1" style="height: 1000px; width 100px">
test
</div>
<br/>
<div id="div2" style="height: 1000px; width 100px">
test 2
</div>
<button id="click">click me</button>
</html>
Sunday, 23 September 2012
What is .NET
.NET is a software framework developed by Microsoft Corporation to build different types of application.
We can build following types of application using .net framework
We can build following types of application using .net framework
- Console Application
- Windows Applications
- Web Applications
Here is a list of programming languages supported by .NET framework.
- C# ( C Sharp)
- VB (visual basic)
- F# (F Sharp)
- etc.
Thursday, 20 September 2012
How to use jQuery in ASP.NET
In this tutorial, We will learn how to use jQuery with ASP.NET.
For this your have to do some simple tasks.
- First Add new website in visual studio and save it on your computer's File system.
- Now Open your website and Create a new page or use Default.aspx page (which is created automatically for you by Visual Studio.)
- Now, We are going to use jQuery in our website so we have to import some jQuery files in our webpage.
- Visual studio 2010 already have these files for you in script folder. You can just drag and drop these files to your webpage's head section or manually put them.
- We will use jquery-1.4.1.js here ( You can also use other version of jquery file).
- After adding these files Your page will look like this.
![]() |
Explanation : The Explanation is quite simple. When our webpage gets ready, a function is called which binds button1's click event to a function (event handler for click event ) and when
Wednesday, 19 September 2012
Difference between jquery.min.js and jquery.js ?
Both support the same functions. jquery.min.js is a compressed version of jquery.js (whitespaces and comments stripped out, shorter variable names, ...) in order to preserve bandwidth. In terms of functionality they are absolutely the same. It is recommended to use this compressed version in production environment.
Source : Stackoverflow
Subscribe to:
Posts (Atom)