Hi action writers
Does anyone have a very… very… simple example of how to add something to the begining of a div
“I think” I know I have to add the script and then use fwMove but I just cant find an example which I can understand.
What I wish to do is add some code in front of the div tag on which the action is applied to. I have had a look at the crowbar action, but I just cant work out what is the minimum I need to make this happen and what is not nessassery.
Sorry for what is probably a very basic question
Thanks you in advance
pems
Find the div the action item is attached to (line 6)
Check the search returned something (line 7)
Create a dummy item that prefixes the div using fwAddEnclosing set to false so it only creates the opening tag (line 8)
Use this wrapper to append your prefix code. In this case a simple comment (line 9)
Depending on what you want to add you may be better adding the code in at line 8 and doing away with a wrapper item.
I hope this helps.
Regards,
Tim.
On 7 Aug 2011, at 10:01, pems wrote:
What I wish to do is add some code in front of the div tag on which the action is applied to. I have had a look at the crowbar action, but I just cant work out what is the minimum I need to make this happen and what is not nessassery.