Home › Forums › Back End › Edit XML with PHP › Re: Edit XML with PHP
June 21, 2010 at 2:12 pm
#78301
Historical Forums User
Participant
Well it looks great, but it looks like they are using as1/as2 in this article. I did find several other things but my main area of concern is getting jquery to rename attributes in multiple html tags.
//edit
I did find this:
Code:
$(‘input.title[name]’).each(function() {
/* create a jquery object from the DOM object */
var $input_with_name = $(this);
/* add the new attribute with the title value */
$input_with_name.attr(“newNameAttribute”, $input_with_name.getAttribute(‘name’));
/* remove the old attribute */
$input_with_name.removeAttr(‘name’);
});
but I need to know how to title them sequentially
ie. title1, title2, title3, etc.