Skip to main content
Working from scratch, following simplicity

Add new comment

Anonimo (not verified) Thu, 04/04/2013 - 18:37

<p>io userei mustache.js, comunque le variabili vanno dichiarate con var anche all'interno della funzione o diventano parte dell'oggetto globale.
Inoltre se proprio non vuoi usare un sistema di template potresti usare un codice più jquery style tipo:

var pipe_number = $('<li>').attr('id','penultimo').text('diametro');

inoltre per essere più javascript strict, nell'usare parseInt è consigliabile mettere il secondo parametro opzionale ossia la base.
Ultima nota, il selettore:
$('ul#prova')
è più lento di $('#prova') e non aggiunge nulla visto che gli dovrebbero essere univoci.

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Nicola Rainiero

A civil geotechnical engineer with the ambition to facilitate own work with free software for a knowledge and collective sharing. Also, I deal with green energy and in particular shallow geothermal energy. I have always been involved in web design and 3D modelling.