jquery to remove dupicate elements from list by value : I am trying to remove li elements which have duplicate values.
I have list as shown below:

     <ul>
      <li value="1" name="moon" id="moon1">Moon<li>
      <li value="2" name="moon" id="moon2">Moon<li>
      <li value="1" name="moon" id="moon3">Moon<li>
      <li value="3" name="moon" id="moon4">Moon<li>
      <li value="4" name="moon" id="sun1">Sun<li>
      <li value="5" name="moon" id="sun2">Sun<li>
      <li value="4" name="moon" id="sun3">Sun<li>
     <ul>

I need something like this:

     <ul>
      <li value="1" name="moon" id="moon1">Moon<li>
      <li value="2" name="moon" id="moon2">Moon<li>
      <li value="3" name="moon" id="moon4">Moon<li>
      <li value="4" name="moon" id="sun1">Sun<li>
      <li value="5" name="moon" id="sun2">Sun<li>
     <ul>

I am very basic to jquery, please help me out. Thanks in advance. 




