Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form class="article-footnote-form footnote-form" style="margin-top:10px" >
- <div class="form-group row">
- <div class="col-md-9">
- <textarea class="form-control" name="footnote" rows="3" autofocus></textarea>
- </div>
- <div class="col-md-3">
- <button class="btn btn-primary" type="submit" id="articleFootnoteBtn">Add Annotation</button>
- </div>
- </div>
- </form>
- $(".article-footnote-form").submit(function(e){
- e.preventDefault();
- $("#textareaId").keypress(function (e) {
- if(e.which == 13 && !e.shiftKey) {
- $(this).closest("form").submit();
- e.preventDefault();
- return false;
- }
- });
Add Comment
Please, Sign In to add comment