|
@@ -5,10 +5,6 @@ module.exports = {
|
|
|
|
|
|
name: 'adaptive',
|
|
|
|
|
|
- options: {
|
|
|
- adaptiveWidth: $('<p class="idealforms-field-width"/>').appendTo('body').css('width').replace('px','')
|
|
|
- },
|
|
|
-
|
|
|
methods: {
|
|
|
|
|
|
// @extend
|
|
@@ -16,6 +12,10 @@ module.exports = {
|
|
|
|
|
|
var self = this;
|
|
|
|
|
|
+ var $dummy = $('<p class="idealforms-field-width"/>').appendTo('body');
|
|
|
+
|
|
|
+ this.opts.adaptiveWidth = $dummy.css('width').replace('px','')
|
|
|
+
|
|
|
function adapt() {
|
|
|
|
|
|
var formWidth = self.$form.outerWidth()
|
|
@@ -37,7 +37,7 @@ module.exports = {
|
|
|
self._getField(this).find(self.opts.error).addClass('hidden');
|
|
|
});
|
|
|
|
|
|
- $('p.idealforms-field-width').remove();
|
|
|
+ $dummy.remove();
|
|
|
}
|
|
|
|
|
|
}
|