javascript - prevent line break after jeditable trigger -
i want edit field provided jeditable stays in same line text triggered it. created jsfiddle show mean
https://jsfiddle.net/xu1ree7v/8/
as can see, edit fields on next line... tried "white-space: nowrap;" , "display: inline;" of seems ignored jeditable. javascript looks this
$(document).ready(function () { $(".display-date").editable('www.example.com', { type: 'select', data: "{'belgrade':'belgrade','paris':'paris','london':'london', 'selected':'belgrade'}", cancel: 'cancel', submit: 'ok', }); }); $(".edit-trigger").click(function () { $(this).prev().trigger(".display-date"); });
and html
<p style="font-size:10pt; white-space: nowrap;display: inline;">next meeting: <div class="display-date select_next_jc" style="font-size:10pt; white-space: nowrap;display: inline;">test-time <a class="edit-trigger">edit</a> </div> </p>
thanks carl
use style: 'inherit'
in jeditable options:
$(document).ready(function () { $(".display-date").editable('www.example.com', { type: 'select', data: "{'belgrade':'belgrade','paris':'paris','london':'london', 'selected':'belgrade'}", cancel: 'cancel', submit: 'ok', style: 'inherit' }); });
jsfiddle: https://jsfiddle.net/06g8q2g8/
this cause newly created form inherit same style you've set on editable element (including display: inline
).
Comments
Post a Comment