基本的に、ユーザーがサブ画像をクリックすると、表示プロパティをhideからshowに変更してメイン画像を変更するときに、chromeとfirefoxで作業します。ここに私のimg要素があります。JQuery CSS表示が機能しない変更
<img id="lg1" src="http...
<img id="lg2" style="display:none" src="http...
<img id="lg3" style="display:none" src="http...
と私のjsが次のようになります。IEでは
$('#graph1').click(function() {
$("#lg1").css("display","inherit");
$("#lg2").css("display","none");
$("#lg3").css("display","none");
});
$('#graph2').click(function() {
$("#lg1").css("display","none");
$("#lg2").css("display","inherit");
$("#lg3").css("display","none");
});
$('#graph3').click(function() {
$("#lg1").css("display","none");
$("#lg2").css("display","none");
$("#lg3").css("display","inherit");
});
が、私はこのエラーを取得:
Could not get the display property. Invalid argument.
とにかく、私はそれがChromeで動作させるために自分のコードを変更する可能性がありますが、 FFとIE?
ありがとうございます!
継承を他のものに変更する方法はありますか?それは何から継承していますか?すなわち、表示:ブロック – benhowdle89
どのバージョンのIE? –
なぜ 'display:inline'(または' display:block')を使うことができませんか? – zzzzBov