20
20
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
21
21
<![endif]-->
22
22
</ head >
23
- < body >
23
+ < body data-spy =" scroll " data-target =" #navbar-example " >
24
24
25
25
<!-- Navbar -->
26
- < nav class ="navbar navbar-default navbar-fixed-top ">
26
+ < nav class ="navbar navbar-default navbar-fixed-top "id =" navbar-example " >
27
27
< div class ="container ">
28
28
<!-- Brand and toggle get grouped for better mobile display -->
29
29
< div class ="navbar-header ">
39
39
<!-- Collect the nav links, forms, and other content for toggling -->
40
40
< div class ="collapse navbar-collapse " id ="bs-example-navbar-collapse-1 ">
41
41
< ul class ="nav navbar-nav navbar-right ">
42
+ < li >
43
+ < a href ="#demo1 "> Demo1</ a >
44
+ </ li >
42
45
< li >
43
46
< a href ="https://github.com/nirajrajgor/jquery-upload-image-customization " target ="_blank ">
44
47
< i class ="fa fa-github "> </ i > Github
50
53
</ nav >
51
54
52
55
< 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 ">
57
57
< 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 >
75
73
</ form >
76
74
77
75
</ div >
78
76
</ div >
77
+
79
78
</ div >
80
79
81
80
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
82
81
< script src ="https://code.jquery.com/jquery-3.2.1.min.js "> </ script >
83
82
<!-- Include all compiled plugins (below), or include individual files as needed -->
84
83
< script src ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js "> </ script >
85
84
< script src ="js/uploader.js "> </ script >
85
+ < script >
86
+ $ ( function ( ) {
87
+ $ ( 'body' ) . scrollspy ( { target : '#navbar-example' } )
88
+ } ) ;
89
+ </ script >
86
90
</ body >
87
91
</ html >
0 commit comments