Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.sourceforge.jsdialect.swipebox;
 
Thymeleaf processor to show a "fancybox" image carrousel. Usage:
 <div js:swipebox="true">
         <a href="image1.jpg" title="This is image 1">Image 1</a>
         <a href="image2.jpg" title="This is image 2">Image 2</a>
         <a href="image3.jpg" title="This is image 3">Image 3</a>
     </div>
 
 
    private final JsDialect dialect;
    public SwipeboxAttrProcessor(JsDialect dialect) {
        super("swipebox");
        this. = dialect;
    }
    @Override
    public int getPrecedence() {
        return 100000; // Higher precedence than Standard dialect attributes
    }
    @Override
    public ProcessorResult processAttribute(Arguments argumentsElement elementString attributeName) {
        .addScript(arguments.);
        .addScript(arguments.);
        .addLink(arguments.);
        new SwipeboxCommand(argumentselementattributeName).execute();
        return .;
    }
New to GrepCode? Check out our FAQ X