March 29, 201511 yr Can anyone tell me what the best way to achieve what this site does please? http://bootsnipp.com/snippets/featured/profile-card They show a bootstrap code snippet on their site which is interactive or an option to view the source HTML / CSS via a click of a button. Is there a plugin or similar to achieve this on WP? If not, what would be the best way to achieve the same results by manually coding it? Thanks guys!
March 29, 201511 yr I'd say the easiest and most reliable method is to embed an iframe in your page that links to the hosted code on GitHub. You can use JavaScript to toggle between the tabs, each tab contains a different iframe linking to that snippet. There are many other ways of doing this, but this is the most straightforward seen as we should now be hosting our version-controlled code on a repository like Github these days.
March 31, 201511 yr Author Good idea! I think a code playground would work as well like Codepen or JSFiddle? Cheers Rob!
April 21, 201511 yr I was going to say that you can embed a Codepen which is essentially the same thing. Doesn't have version control but would be a lot less work
Create an account or sign in to comment