fix #30
This commit is contained in:
parent
a943db7d20
commit
be9f66a800
4 changed files with 14 additions and 15 deletions
|
@ -195,7 +195,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
|
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
|
||||||
<script src="js/out/jquery.idealforms.js"></script>
|
<script src="js/out/jquery.idealforms.js"></script>
|
||||||
<!--<script src="js/out/jquery.idealforms.min.js"></script>-->
|
<!--<script src="js/out/jquery.idealforms.min.js"></script>-->
|
||||||
|
|
|
@ -5,10 +5,6 @@ module.exports = {
|
||||||
|
|
||||||
name: 'adaptive',
|
name: 'adaptive',
|
||||||
|
|
||||||
options: {
|
|
||||||
adaptiveWidth: $('<p class="idealforms-field-width"/>').appendTo('body').css('width').replace('px','')
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
// @extend
|
// @extend
|
||||||
|
@ -16,6 +12,10 @@ module.exports = {
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
var $dummy = $('<p class="idealforms-field-width"/>').appendTo('body');
|
||||||
|
|
||||||
|
this.opts.adaptiveWidth = $dummy.css('width').replace('px','')
|
||||||
|
|
||||||
function adapt() {
|
function adapt() {
|
||||||
|
|
||||||
var formWidth = self.$form.outerWidth()
|
var formWidth = self.$form.outerWidth()
|
||||||
|
@ -37,7 +37,7 @@ module.exports = {
|
||||||
self._getField(this).find(self.opts.error).addClass('hidden');
|
self._getField(this).find(self.opts.error).addClass('hidden');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('p.idealforms-field-width').remove();
|
$dummy.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
2
js/out/jquery.idealforms.min.js
vendored
2
js/out/jquery.idealforms.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue