Question: I have a standard menu using ul and li tags. And in my database, I have a table Users with a field 'certificate' and depending the value of this 'certificate', the user will see or not some items of the menu.

I was reading some texts and I think I will have to use `ActionFilters`. Is this right?

So, how can I render different menus depending which user is accessing?

thanks!!

Answer: 
Just FYI, there is an excellent mathematical aggregation plugin for jQuery: [jQuery Calculation](http://www.pengoworks.com/workshop/jquery/calculation/calculation.plugin.htm)

Using that plugin may also indirectly solve your issue.

It's usage would reduce your script to:

```
$('.total').text($('.amount').sum());

```
You are converting the parseFloat into a string, then adding it to total. Only add .toFixed(2) to the final line, once things have been added.

```
var total = 0;
$(".amount").each(function() {
    var value = $(this).val();
    value = (value.length < 1) ? 0 : value;
    var tmp = parseFloat(value);
    total += tmp;
});
$(".total").text(total).toFixed(2);

```