Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ How do you reuse HTML & JS elements

Posted by: Chris Dale Mar 20 2023, 06:45 AM

Hi all,

I'm trying to build a bootstrap page from a template that has a portfolio section within it that allows you to filter out objects on the page. This all works fine but I would like to add multiple portfolio sections to the same page, each as a separate entity. At the moment I'm stuck with the copied sections affecting each other.

Can I somehow reuse the existing portfolio section again? If so, how do I go about it?


Thanks in advance.

Chris

Posted by: Christian J Mar 20 2023, 07:19 AM

Hello!

QUOTE(Chris Dale @ Mar 20 2023, 12:45 PM) *

At the moment I'm stuck with the copied sections affecting each other.

In what way, the styling or scripting? I'm not familiar with Bootstrap, unfortunately.

QUOTE
Can I somehow reuse the existing portfolio section again? If so, how do I go about it?

Not sure what you mean with "reuse" here. You can certainly show one section at the time using e.g. javascript or iframes (though separate HTML pages would be more robust).

Perhaps there's a conflict between ID values (each one needs to be unique) or some javascript functions/variables. Impossible to tell without seeing the page, could you post a link on the forum?


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)