code works at jsfiddle but not on my site [closed]

岁酱吖の 提交于 2019-12-23 16:45:34

问题


here are three sections to jsfiddle CSS, Javascript and HTML so there should be a way to have an HTML file with three sections which say Drop CSS code here, Drop HTML Here and Drop Javascript here. It doesn't work yet but currently I have

<html>
<head>
<title>Some Title</title>
<style type="text/css" media="screen">

<!-- CSS Section From JSfiddle Goes Here -->

</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js">           </script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {

// Javascript Section From JSfiddle Goes Here

});
</script>
</head>
<body>

<!-- HTML Section From JSfiddle Goes Here -->

</body>
</html>

It seems like this would be an easy thing do do mindlessly like it could be automated or can it ? Seems like a lot of people are are finding the examples at JSfiddle not helpful because there is some magic going on at JSfiddle which they are not sharing with us.


回答1:


You can do this pretty easily. Save your fiddle and then click the share button. Take the full screen edit URL and paste it into a new tab. Right click in the main area where the example is and view the source. Save that and you have a working copy.



来源:https://stackoverflow.com/questions/12942633/code-works-at-jsfiddle-but-not-on-my-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!