javascript - Build embeddable HTML page -


i'm new html5

i'm trying make basic paint/whiteboard webpage embeddable other website.

the whiteboard consist of 3 files: index.html, app.js , style.css

what i'm asking how make more widget embeddable where?

i have did many searches , confused, between building jquery widget http://alexmarandon.com/articles/web_widget_jquery/#loading-javascript-libraries

or don't have there many separate files?

any recommendation , guidance highly appreciated thanks

i think answer here depends on target audience.

@lucasnadalutti correct iframe may universally accepted way embed entire html page, if page needs interact host site's other elements, data, or server in way, you'll want pursue approach.

since you're creating widget meant embedded in other people's websites, target audience other developers, since ones might choose use widget on sites build.

assuming developers target audience widget, create wordpress plugin, jquery plugin, or number of other framework-specific plugins make easy developers use code.

the choice yours framework create for, , decision based on place think demand type of widget highest...

but if you're stating out, i'd recommend creating jquery plugin public github repo well-written readme explain how use widget.

here's example: https://github.com/carhartl/jquery-cookie

edit
per comment, here resources , examples more specific needs:

here'a resource how build jquery plugin:
https://learn.jquery.com/plugins/basic-plugin-creation/

owl carousel example of jquery plugin requires html, css, , js files. see link example of how implement plugin:
http://owlgraphic.com/owlcarousel/#demo

page setup + css:

<!-- important owl stylesheet --> <link rel="stylesheet" href="owl-carousel/owl.carousel.css">  <!-- default theme --> <link rel="stylesheet" href="owl-carousel/owl.theme.css">  <!--  jquery 1.7+  --> <script src="jquery-1.9.1.min.js"></script>  <!-- include js plugin --> <script src="assets/owl-carousel/owl.carousel.js"></script> 

html:

<div id="owl-example" class="owl-carousel">   <div> content </div>   <div> content </div>   <div> content </div>   <div> content </div>   <div> content </div>   <div> content </div>   <div> content </div>   ... </div> 

js:

 $(document).ready(function() {     $("#owl-example").owlcarousel();   }); 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -