开发者

Need help with Mobile CSS instead of jQuery

开发者 https://www.devze.com 2023-04-03 07:35 出处:网络
There is no way for me to control the pages of our mobile site, however I can modify the CSS.My goals is to hide an element so it doesn\'t appear on our mobile site. If there is a way to tell it to us

There is no way for me to control the pages of our mobile site, however I can modify the CSS. My goals is to hide an element so it doesn't appear on our mobile site. If there is a way to tell it to use the closest <tr> I would be fine. If I could use jQuery I would do this but I cannot:

$('.ex').closest('tr').attr('style', 'display:none')

<table>
....
<tr>
  <td colspan="2">
    <font class="colors_productname">
      <span class="mapprice"></span>
    </font>
  </td>
</tr>
开发者_C百科<tr> **/* I WANT TO DISPLAY:NONE HERE /***
  <td colspan="2">
      <span class="ex">Exclusive Price</span>
      <font color="red">&nbsp;&nbsp;</font><br>
      <select>
        <option value="1636">[Subtract -$282.34]</option>
      </select>
  </td>
</tr>
...
</table>

I believe I am close but it doesnt hide the select yet:

option[value="1636"] {display:none}

span.ex + font + select{display:none}


Ok I figured it out. Since this is using mobile css it may not work on all older phones:

.ex {display: none}
span.ex + font + br + select{display:none}
0

精彩评论

暂无评论...
验证码 换一张
取 消