Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Prepend Jquery and PHP Re: Prepend Jquery and PHP

#83204
fbroersen
Member

you mean from within a loop?

Then you should do something like this:


$(this).prepend('">link');

The php is not executed if you loop it using jquery, so either you should loop from javascript, or from php; so in the above example, your rendered page will have 10 javascript statements, below is just one doing thesame thing.

for(var i = 0; i < 10; i++) {
$(this).prepend('link');
}