Skip to content

Auto-move elements

The CSS class appginihelper-automove can be useful for example when rendering HTML on serverside in PHP (file: hooks/TABLENAME.php , function TABLENAME_dv() ).

Just add your custom HTML to $html variable and add the CSS-class appginihelper-automove (+ options).

AppGini Helper Javascript Library will automatically move those custom elements to a different place after page-load.

Class

  • appginihelper-automove

Parameters

  • data-target
    jQuery selector, for example fieldset, form, #custom-container-id

  • data-position
    Options: prepend | before | after | (any other string = append )

Example

Usage in HTML

Note the CSS-class appginihelper-automove and the additional attributes data-target and data-position:

1
2
3
<div class="alert alert-info appginihelper-automove" data-target="fieldset" data-position="before">
    This is my custom info box
</div>

Usage in TABLENAME_dv-hook

1
2
3
4
5
6
7
// file: hooks/TABLENAME.php
function TABLENAME_dv($selectedID, $memberInfo, &$html, &$args)
{
    $html .= '<div class="alert alert-info appginihelper-automove" datatarget=".page-header" data-position="before">'
        . 'This is my <b>custom</b> info box'
        . '</div>';
}

See also