Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.sourceforge.jsdialect.toggle;
 
Thymeleaf processor to add animation to hide and show content. Second argument tell if it should be collapsed at start. Usage:
 <h1 jquery:toggle="someId, true">Show text</h1>
    ...
    <div id="someId"> Lorem ipsum... </div>
 
 
    private JsDialect dialect;
    public ToggleIdAttrProcessor(JsDialect dialect) {
        super("toggleId");
        this. = dialect;
    }
    @Override
    public int getPrecedence() {
        return 10000;
    }
    @Override
    public ProcessorResult processAttribute(Arguments argumentsElement elementString attributeName) {
        .addScript(arguments.);
        new ToggleIdCommand(argumentselementattributeName).execute();
        return .;
    }
New to GrepCode? Check out our FAQ X