Using an ajax call I have returned the partialView HTML of a page, but before I display it I wish to pull information from the main div. This data is just size information, for if I create a floating window.
Code:
<div class="window-details" data-height="500px" data-width="500px">more data here</div>
this.PopUp = function (url, title) {
$.ajax(url)
.success(function (partialViewHtml) {
var partialViewDom = $(partialViewHtml);
var thisDiv = $(".window-details", partialViewDom);
I can see the data in chromes debugger when hovering over partialViewDom, but the class selection does not appear to have worked. Any clues? Does it not parse correctly? Thanks.
partialViewHtml? If it's'<div class="window-details" data-height="500px" data-width="500px">more data here</div>', then there is no child of that HTML with classwindow-details, which is what you're trying to select.