从外部页面加载子级 [英] Load child from external page

查看:38
本文介绍了从外部页面加载子级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮我编辑此jQuery吗,而不是从页面上的任何地方提取#product_name_source,而是从#Altitude div中提取它.如您所见,我在那里尝试了一些操作,但似乎URL http://google.com #parent #child 中不能有多个div.有人能帮忙吗?

Can someone help me edit this jQuery so that instead of pulling the #product_name_source from anywhere on the page it takes it from within the #Altitude div. As you can see, I've tried something there but it seems that you can't have multiple divs in a URL http://google.com #parent #child. Anyone able to help?

$('body').ready(function(){

    var product_name = 'Altitude';

    $('#product_name').load('http://cdn.jeremyblaze.com/theme_info.html #' + product_name + '#product_name_source');

});

推荐答案

我发现这可行.

$('#product_name').load('http://cdn.jeremyblaze.com/theme_info.html #' + product_name + ' #product_name_source');

这篇关于从外部页面加载子级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆