2020 <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
2121 <![endif]-->
2222 </ head >
23- < body >
23+ < body data-spy =" scroll " data-target =" #navbar-example " >
2424
2525 <!-- Navbar -->
26- < nav class ="navbar navbar-default navbar-fixed-top ">
26+ < nav class ="navbar navbar-default navbar-fixed-top " id =" navbar-example " >
2727 < div class ="container ">
2828 <!-- Brand and toggle get grouped for better mobile display -->
2929 < div class ="navbar-header ">
3939 <!-- Collect the nav links, forms, and other content for toggling -->
4040 < div class ="collapse navbar-collapse " id ="bs-example-navbar-collapse-1 ">
4141 < ul class ="nav navbar-nav navbar-right ">
42+ < li >
43+ < a href ="#demo1 "> Demo1</ a >
44+ </ li >
4245 < li >
4346 < a href ="https://github.com/nirajrajgor/jquery-upload-image-customization " target ="_blank ">
4447 < i class ="fa fa-github "> </ i > Github
5053 </ nav >
5154
5255 < div class ="container ">
53- < div class ="row ">
54- < h1 > Image Upload with Preview, Restriction on file Size & Dimensions</ h1 >
55- </ div >
56- < div class ="row ">
56+ < div class ="row " id ="demo1 ">
5757 < div class ="col-xs-12 ">
58- < form action ="# " method ="post ">
59- < div class ="row ">
60- < div class ="form-group ">
61- < label class ="col-sm-2 col-sm-offset-2 control-label "> Profile Picture</ label >
62- < div class ="col-sm-6 ">
63- < label class ="btn btn-primary btn-outline profile " for ="my-profile-file-selector ">
64- < input id ="my-profile-file-selector " type ="file ">
65- Upload
66- </ label >
67- < span class ='' id ="upload-profile-file-info "> </ span >
68- < h4 id ="upload-profile-error " class ="text-danger "> </ h4 >
69- < img id ="upload-profile-image " src ="" class ="img-responsive " alt ="">
70- < button class ="btn btn-primary btn-outline " id ="remove-profile-btn "> Remove</ button >
71- </ div >
72- </ div >
73- </ div >
74-
58+ < h2 class ="title "> Demo1 - Simple Image Preview</ h2 >
59+ </ div >
60+ < div class ="col-sm-4 col-md-4 col-xs-12 ">
61+ < div class ="block-heading ">
62+ < h3 > Select Image</ h3 >
63+ </ div >
64+
65+ < form action ="# " method ="post " id ="demo1-form ">
66+ < label class ="btn profile " for ="my-profile-file-selector ">
67+ < input id ="my-profile-file-selector " type ="file "> Upload
68+ </ label >
69+ < span class ='' id ="upload-profile-file-info "> </ span >
70+ < h4 id ="upload-profile-error " class ="text-danger "> </ h4 >
71+ < img id ="upload-profile-image " src ="" class ="img-responsive " alt ="">
72+ < button class ="btn " id ="remove-profile-btn "> Remove</ button >
7573 </ form >
7674
7775 </ div >
7876 </ div >
77+
7978 </ div >
8079
8180 <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
8281 < script src ="https://code.jquery.com/jquery-3.2.1.min.js "> </ script >
8382 <!-- Include all compiled plugins (below), or include individual files as needed -->
8483 < script src ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js "> </ script >
8584 < script src ="js/uploader.js "> </ script >
85+ < script >
86+ $ ( function ( ) {
87+ $ ( 'body' ) . scrollspy ( { target : '#navbar-example' } )
88+ } ) ;
89+ </ script >
8690 </ body >
8791</ html >
0 commit comments