J'ai le code JavaScript suivant que je voudrais convertir en jQuery mais je n'ai pas de chance.Conversion de javascript vers jQuery
var mySplitResult = xvotesString[htmlid].split('~');
target3 = document.getElementById ('xvote-' + htmlid);
target3.style.width = mySplitResult[0] + 'px';
if (target4 = document.getElementById ('mnma-' + htmlid));
target4.innerHTML = mySplitResult[1];;
if (target5 = document.getElementById ('mnmb-' + htmlid));
target5.innerHTML = mySplitResult[2];;
if (target6 = document.getElementById ('mnmc-' + htmlid));
target6.style.display='none';;
if (target6 = document.getElementById ('mnmd-' + htmlid));
target6.style.display='block';
target7 = document.getElementById ('xvotes-' + htmlid);
target7.className = 'star-rating-noh';
Toute aide est grandement appréciée.
Ma première recommandation serait de déplacer tous vos 'echo''d code Javascript en dehors des balises de serveur pour le rendre plus facile à lire. – Aaron
Yikes! ________ –
ce serait mieux si vous postez ce que vous avez déjà essayé, donc nous pouvons vous dire ce qui ne va pas ... –