I'm currently working on a website showcasing various HTML and CSS spinners and loaders. Each example opens a modal window upon click, where I aim to display the corresponding code for that spinner so users can easily copy and implement it in their own projects.
To achieve this, I am utilizing jQuery's .load() function to load the specific "text" for each spinner/modal window like so:
$(".htmlcode").load("content/" + fileName + ".html");
This successfully loads the correct file and HTML data, however, the issue arises as the HTML is being parsed, displaying the animation instead of the actual code itself.
I'm seeking advice on the best approach to overcome this hurdle.
If you're interested in exploring similar functionality, check out another website with comparable features:
Thank you!