Jump to content

How to include jQuery script on Page Display Record Template


Recommended Posts

I need to add keyframes to CSS dynamically, so I will need to insert a script to database record display template.

The jQuery library is available on database record display template?

In my case, can I simple add this example script to the end of the template code to dynamically insert the css statement?

var supportedFlag = $.keyframe.isSupported();
    name: 'trapdoor-sequence',
    '0%': {'height': '70px'},
    '30%': {'height': '10px'},
    '60%': {'height': '30px'},
    '100%': {'height': '10px'}




Link to comment
Share on other sites

I have done a quick test with:

  $("body").append("random sentence");});

Not working...


Where did you add it? jQuery should be loaded as a window element so should be available throughout the framework.

Link to comment
Share on other sites

Hello @Jim M,

Let me explain better. I am just parsing the script code above anywhere in the record display template of the database (Pages > Templates > HTML > Database Templates > Display > record). It doesn't work.

I supose that to load as a window element I have to create a javascript file with the code (Pages > Templates > JS > Page JS > JS > teste_name.js), right?

I have done that, but could not find any documentation on how to include this javascript file in the display record template.

I also have not found any documantation on how to add variables to the script that should be dynamically inserted on each record display.

Could you help? Thanks!

Link to comment
Share on other sites

  • 2 weeks later...


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...