$("#mydiv").load(location.href + " #mydiv");
Always take note of the space just before the second # sign, otherwise the above code will return the whole page nested inside you intended DIV. Always put space.
More Related Contents:
- How to make page loaders/animations/transitions
- Set timeout for ajax (jQuery)
- When we using alert vs popup div tag? [closed]
- How to hide css and js version details from weppalyzer in PHP
- Download the text over image using jquery
- Make header and footer files to be included in multiple html pages
- Replacing css file on the fly (and apply the new style to the page)
- Animate element to auto height with jQuery
- “Mixed content blocked” when running an HTTP AJAX operation in an HTTPS page
- How to show popup message like in Stack Overflow
- Using jQuery how to get click coordinates on the target element
- Dropdown select with images
- Responsive horizontal page sliding
- Scale element proportional to Background Cover with jQuery
- how to assign javascript variable value to php variable
- How to build simple tabs with jQuery?
- Bootstrap Dropdown with Hover
- CSS Textarea that expands as you type text [duplicate]
- How can I get all a form’s values that would be submitted without submitting [duplicate]
- How to show hidden divs on mouseover?
- How to make superfish dropdown menu responsive?
- Placeholder for contenteditable div
- How to keep elements non-refreshed
- How do you swap DIVs on mouseover (jQuery)?
- Center an Image vertically and horizontally using CSS
- Change background on button click, using CSS only? [duplicate]
- Jquery/Javascript Opacity animation with scroll
- Can I save input from form to .txt in HTML, using JAVASCRIPT/jQuery, and then use it?
- Difference between jQuery’s .hide() and setting CSS to display: none
- How to replace the entire html webpage with ajax response?