Hi,
Yes, you can use any code in your transformation code according your needs. However, first of all, I would recommend you to register the jQuery on your page. You can register the jQuery with 
JavaScript web part.
This web part has 
Linked file property where you can add link to Kentico 
CMS jQuery library:
Linked file:  
~/CMSScripts/jquery/jquery-core.jsOr, you can register the jQuery in 
HEAD HTML web part or in 
head section of your master page template or page template or with following code:
CMS.GlobalHelper.ScriptHelper.RegisterJQuery(Page) 
public static void RegisterJQuery(
Page page
) 
For more information, please refer to our API reference guide:
http://devnet.kentico.com/downloads/kenticocms_api.zipBest regards,
Miro Remias.