外部ファイル (test.html) にコンテンツ (#content) があり、index.html の別の DIV (#result) にロードします。
test.html:
<div id="content">This text should not be loaded with its DIV. <strong> May contain other tags</strong></div>
jquery:
$('#result').load('test.html #content');
index.html の結果、予期しない:
<div id="result"><div id="content">This text should not be loaded with its DIV. <strong> May contain other tags</strong></div></div>
index.html の結果、予想:
<div id="result">This text should not be loaded with its DIV. <strong> May contain other tags</strong></div>
他のタグも含む可能性のある #content の実際のコンテンツ/ HTML のみをロードするにはどうすればよいですか? その理由は、誤って他のスタイルの DIV と競合する可能性がある不要な DIV を単純に避けるためです。
どんなヒントでも大歓迎です。ありがとう