$("#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.
Related Contents:
- Set timeout for ajax (jQuery)
- How to apply !important using .css()?
- How to disable HTML links
- horizontal scrollbar on top and bottom of table
- Replacing css file on the fly (and apply the new style to the page)
- How to generate a simple popup using jQuery
- Can I use HTML tags in the options for select elements? [duplicate]
- JSFiddle code not working in my own page
- How to style “input file” with CSS3 / Javascript? [duplicate]
- Using HTML5 file uploads with AJAX and jQuery
- How to disable scroll without hiding it?
- Changing nav-bar color after scrolling?
- “Mixed content blocked” when running an HTTP AJAX operation in an HTTPS page
- jQuery: Get selected element tag name
- How to silently hide “Image not found” icon when src source image is not found
- Use images like checkboxes
- jquery submit form and then show results in an existing div
- Hide scrollbar while still being able to scroll with mouse/keyboard [duplicate]
- Bootstrap Dropdown with Hover
- How to auto-scroll to end of div when data is added? [duplicate]
- How to dynamically create ‘@-Keyframe’ CSS animations?
- How can I remove the “No file chosen” tooltip from a file input in Chrome?
- focus doesn’t work in IE
- width/height after transform
- Responsive horizontal page sliding
- :touch CSS pseudo-class or something similar?
- how to assign javascript variable value to php variable [duplicate]
- scrollTop animation without jquery [duplicate]
- How to swipe top down JQuery mobile
- Scale element proportional to Background Cover with jQuery
- jQuery jump or scroll to certain position, div or target on the page from button onclick [duplicate]
- When loading an html page via ajax, will script tags be loaded?
- Center flex item in container, when surrounded by other flex items
- how to disable DIV element and everything inside [duplicate]
- Uncaught TypeError: Cannot read property ‘top’ of undefined
- Possible to associate label with checkbox without using “for=id”?
- jQuery Validation using the class instead of the name value
- How do I abort image load requests without using window.stop()
- Fill available spaces between labels with dots or hyphens
- jQuery position DIV fixed at top on scroll
- How to replace html element with ajax response?
- I want to show list items as 2 or more columns (dynamic alignment)
- Can I save input from form to .txt in HTML, using JAVASCRIPT/jQuery, and then use it?
- Changing image on hover
- Increase CSS brightness color on click with jquery/javascript?
- How to display Image dynamically on UI?
- Bootstrap Dropdown menu is not working
- Large dynamically sized html table with a fixed scroll row and fixed scroll column
- Select a row from html table and send values onclick of a button
- How to show hidden divs on mouseover?