简体   繁体   中英

Jquery .load - get <div> featured products (opencart) from index.php to index.html same domain

javascript is definately not one of my strong points and normally I get by quite well. however.

what i have is (for purpose of information) site http://mystore.co.uk which by default will lead you to index.html as the home page.

I then have index.php which is my opencart store.

on index.php i have a featured products module installed and what I wish to do is take that entire div and place it onto my index.html page.

What is the javascript .load function script that I need to use to do this. I have been looking for an answer but I think I have propably overlooked it several times due to frustration and confusion. any help you can offer would be appreciated.

Thanks in advance.

尝试一下,假设#yourhiddenDiv在index.html中,而#yourdiv是您要从index.php中获取的文件,并且两个文件都在同一域中:

$('#yourhiddenDiv').load('index.php #yourdiv').hide().fadeIn('slow');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM