css - jqGrid image in a column not working in firefox -
good morning all,
i have show 16x40 pixel image in jqgrid column, changes when click on it; @ purpose, defined formatter follow:
function dataviewlink(cellvalue, options, rowdata, action) { var chartlink = "<div style='float:left;'><img id='_addtochart" + options.rowid + "' class='ui-icon-addtochart' onclick='devtogglechartchecked(" + options.rowid + ")'></img></div>"; return chartlink; } and created 2 css classes different images:
.ui-icon-addtochart { content: url(../images/addtochart.jpg) !important; } .ui-icon-removefromchart { content: url(../images/removefromchart.jpg) !important; } then, dynamically switch these classes using jquery. works fine on chrome, there no way working on firefox. images not show on firefox.
i have found issue related 'content' attribute on firefox:
content url not display image on firefox browser
and tried suggested workarounds, none of them worked me.
i cannot show these images firefox.
this little problem driving me crazy. have suggestion?
thank in advanced.
bruno
it seems found solution; changed formatter with:
function dataviewlink2(cellvalue, options, rowdata, action) { var chartlink = "<div style='float:left;' id='_addtochart" + options.rowid + "' class='ui-icon-addtochart ui_add_dev' onclick='devtogglechartchecked(" + options.rowid + ")'></div>"; return chartlink; } and css classes:
.ui-icon-addtochart { background: url(../images/addtochart.jpg); height: 16px; width: 144px; } .ui-icon-removefromchart { background: url(../images/removefromchart.jpg); height: 16px; width: 215px; } it works both on chrome , on firefox.
thank anyway!
bruno
Comments
Post a Comment