1

Hello I have passed value of div lang attribute in my jquery function.this is working perfect in all browse except IE.

 While inspects in FIREFOX div look like below code.

<div lang="1760@239.0000@349.0000@449.0000@plain make it@Plain make@Plain@Georgia Gray@8x16@10x20@12x24@No@45@10x20@check2@myCheckbox2@000000@70@90" id="myCheckbox2" style="left: -3000px; top: 883px; margin: 1px;" class="checkboxArea1"><input type="checkbox" class="outtaHere" value="2" id="check2" name="f[]"></div>

While inspects in IE div look like below code.

<div style="margin: 1px; left: -3000px; top: 883px;" id="myCheckbox2" lang="1760@239.0000@349.0000@449.0000@plain make it@Plain make@Plain@Georgia Gray@8x16@10x20@12x24@No@45@10x20@check2@myCheckbo" class="checkboxArea1"><input id="check2" class="outtaHere" name="f[]" value="2" type="checkbox"></div>

You can see the difference of div lang attributes value. In firefox it takes all value of lang but in IE the last 3 value is not displayed as well fourth value from last is cut down so i have get this values undefined in IE.

Please suggest me how can i resolve this?

4

2 に答える 2

3

Use data instead of the lang attribute....

<div data-lang="1760@239.0000@349.0000@449.0000@plain make it@Plain make@Plain@Georgia Gray@8x16@10x20@12x24@No@45@10x20@check2@myCheckbox2@000000@70@90" id="myCheckbox2" style="left: -3000px; top: 883px; margin: 1px;" class="checkboxArea1"><input type="checkbox" class="outtaHere" value="2" id="check2" name="f[]"></div>

You can then access it in javascript (using jQuery) like this...

$("#myCheckbox2").data("lang");
于 2012-11-21T13:19:45.707 に答える
-2

Please Upload following js file for solving ie problem

<script src="css-backgroundposition-shorthand.js" type="text/javascript"></script>
<script src="css-boxshadow.js" type="text/javascript"></script>
<script src="css-transitions.js" type="text/javascript"></script>
<script src="grunt.js" type="text/javascript"></script>
<script src="html5shiv-printshiv.js" type="text/javascript" ></script>
<script src="html5shiv.js" type="text/javascript"></script>
<script src="ie8compat.js" type="text/javascript"></script>
<script src="img-apng.js" type="text/javascript"></script>
<script src="websockets.js" type="text/javascript" ></script>   
<script type="text/javascript" src="modernizr.js"></script>
于 2012-11-21T13:47:11.937 に答える