Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Model Data"
Bootstrap 3.3.0 Snippet by
alatas
3.3.0
jQuery
Preview
HTML
JS
View Full Screen
Fork
Fork this
1.1K
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div class="col-md-12"> <h4>Bootstrap Snipp for Modal Data</h4> <p data-placement="top" data-toggle="tooltip" title="Edit"> <button class="btn btn-primary btn-xs" data-title="Edit" data-toggle="modal" data-target="#infomodal" >Open Modal</button> </p> <p data-placement="top" data-toggle="tooltip" title="Edit"> <input type="text" id="dataarea"> </p> <div class="modal fade" id="infomodal" tabindex="-1" role="dialog" aria-labelledby="edit" aria-hidden="true"> <div class="modal-dialog" style="width:1200px;"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button> <h4 class="modal-title custom_align" id="Heading">Service Data</h4> </div> <div class="modal-body"> <table id="mytable" class="table table-bordred table-striped"> <thead> <th></th> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Address</th> <th>Email</th> <th>Contact</th> </thead> <tbody> <tr> <td> <input type="radio" id="selectedradio" name="selectedradio" value="1" class="checkthis" /> </td> <td>1</td> <td>Mohsin</td> <td>Irshad</td> <td>CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan</td> <td>isometric.mohsin@gmail.com</td> <td>+923335586757</td> </tr> <tr> <td><input type="radio" id="selectedradio" name="selectedradio" value="2" class="checkthis" /></td> <td>2</td> <td>Mohsin</td> <td>Irshad</td> <td>CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan</td> <td>isometric.mohsin@gmail.com</td> <td>+923335586757</td> </tr> <tr> <td><input type="radio" id="selectedradio" name="selectedradio" value="3" class="checkthis" /></td> <td>3</td> <td>Mohsin</td> <td>Irshad</td> <td>CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan</td> <td>isometric.mohsin@gmail.com</td> <td>+923335586757</td> </tr> <tr> <td><input type="radio" id="selectedradio" name="selectedradio" value="4" class="checkthis" /></td> <td>4</td> <td>Mohsin</td> <td>Irshad</td> <td>CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan</td> <td>isometric.mohsin@gmail.com</td> <td>+923335586757</td> </tr> </tbody> </table> </div> <div class="modal-footer "> <button type="button" class="btn btn-success" id="dataselect"><span class="glyphicon glyphicon-ok-sign"></span>Select</button> </div> </div> </div> </div> </div> </div> </div>
$(document).ready(function(){ $("#dataselect").click(function () { var selectedlength = $("input[type='radio'][name='selectedradio']:checked").length; if(selectedlength > 0){ var selectedValue = $("input[type='radio'][name='selectedradio']:checked").val(); $('#dataarea').val(selectedValue); $('#infomodal').modal('hide'); } }); });
Related:
See More
Template
Now UI Kit PRO
131.3K
108
Responsive Data Cards (Bootstrap 4)
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76