7

I want to delete the first word from my <li> only if the text overflows from it.

Here is my nav bar

Any ideas?

Here is my code.

<div class="box-heading box-sections box-block">
    <div class="nav">
        <ul id="menu">
            <?php foreach ($products as $product){ ?>
            <li><a href="#Section<?php echo $product['product_id']; ?>"><?php echo $product['name']; ?></a></li>
            <?php } ?>
        </ul>
    </div>
</div>

I want my <li> to show ANIMALS, CARS, CITYSCAPE and delete "CUSTOM" from it.

Werner
  • 2,126
  • 2
  • 22
  • 34
Ali Zia
  • 3,825
  • 5
  • 29
  • 77
  • 1
    http://stackoverflow.com/questions/7668636/check-with-jquery-if-div-has-overflowing-elements this will help you to check weather element is overflow or not – Nishit Maheta Oct 23 '15 at 07:18