This commit is contained in:
elclanrs 2014-01-25 16:15:04 -05:00
parent a943db7d20
commit be9f66a800
4 changed files with 14 additions and 15 deletions

View file

@ -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>-->

View file

@ -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

File diff suppressed because one or more lines are too long