Re: Jquery questions - IE9 compatibility issue

Anonymous
Not applicable

Jquery questions - IE9 compatibility issue

I am trying to add a Custom Head HTML to give spacing to my form. The code is working fine in Chrome, Safari, Firefox and IE10 except for IE9. Please see my code below.

<script language="JavaScript" src="https://app.marketo.com/js/public/jquery-latest.min.js" type="text/javascript"></script>
<script type="text/javascript" language="Javascript">
// use no conflict mode for jQuery
if (typeof $jQ == 'undefined') { var $jQ = jQuery.noConflict();}
$jQ(document).ready(function($){
  // find the form input's li element
  $AddPad = $('#State').closest('li');
  // get the li's parent current padding value if it exists
  $curPad = parseInt($AddPad.css('padding-bottom'))  + 65;
  // set the new padding value
  $AddPad.css('padding-bottom',$curPad + 'px');
  $AddPad = $('#Contact_Status').closest('li');
  // get the li's parent current padding value if it exists
  $curPad = parseInt($AddPad.css('padding-bottom'))  + 75;
  // set the new padding value
  $AddPad.css('padding-bottom',$curPad + 'px');
})
</script>


Are there any compatibility issue for jquery code for IE9 browser?
Tags (1)
1 REPLY 1
Alok_Ramsisaria
Level 10

Re: Jquery questions - IE9 compatibility issue

Hi Ian,

 

Instead of using Jquery, to add spacing you can simply use CSS on the form tag in your code. This will be working fine in all browser versions.

If you need more help, please share the Page URL and we can share the CSS code accordingly.