Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CrosswordOptions

Options for the plugin

Hierarchy

  • CrosswordOptions

Index

Properties

Optional acrossListAppendTo

acrossListAppendTo: Element | JQuery | string

Where to append the across list By default the list will be appended to the root element

Optional acrossListTitle

acrossListTitle: string

Title for the across list

default

Across clues

Optional classes

classes: object

Css classes to use

Type declaration

  • Optional board?: string

    Class for the board

    default

    c-crossword__board

  • Optional cell?: string

    Class for each cell

    default

    c-crossword__cell

  • Optional cellActive?: string

    Class for active cell

    default

    c-crossword__cell--active

  • Optional cellCorrect?: string

    Class for correct cells

    default

    c-crossword__cell--correct

  • Optional cellIncorrect?: string

    Class for incorrect cells

    default

    c-crossword__cell--incorrect

  • Optional clue?: string

    Class for cells with clue

    default

    c-crossword__clue

  • Optional clueActive?: string

    Class for active clue

    default

    c-crossword__clue--active

  • Optional clueCorrect?: string

    Class for correct clue

    default

    c-crossword__clue--correct

  • Optional clueIncorrect?: string

    Class for incorrect clue

    default

    c-crossword__clue--correct

  • Optional clueList?: string

    Class for the cluests lists

    default

    c-crossword__clues__list

  • Optional cluesListContainer?: string

    Class for the clues list container

    default

    c-crossword__clues

  • Optional cluesListTitle?: string

    Class for the clues list title

    default

    c-crossword__clues__title

  • Optional disabled?: string

    Class for the disabled state

    default

    c-crossword--disabled

  • Optional field?: string

    Class for cells fields

    default

    c-crossword__clue__field

  • Optional firstLetter?: string

    Class for cells with the first letter of the clue

    default

    c-crossword__cell--first-letter

  • Optional firstLetterAcross?: string

    Class for across cells with the first letter of the clue

    default

    c-crossword__cell--first-letter-across

  • Optional firstLetterDown?: string

    Class for down cells with the first letter of the clue

    default

    c-crossword__cell--first-letter-down

  • Optional hint?: string

    Class for cells that are hints

    default

    c-crossword__clue--hint

  • Optional light?: string

    Class for cells with content or field

    default

    c-crossword__clue--light

  • Optional listItem?: string

    Class for list items

    default

    c-crossword__list-item

  • Optional root?: string

    Root element

    default

    c-crossword

  • Optional row?: string

    Class for each row

    default

    c-crossword__row

Optional definition

definition: CrosswordDefinition

Definition to use

Optional disabled

disabled: boolean

Disable the widget

default

false

Optional downListAppendTo

downListAppendTo: Element | JQuery | string

Where to append the across list By default the list will be appended to the root element

Optional downListTitle

downListTitle: string

Title ofr the down list

default

Down clues

Optional feedback

When to show the feedback. "clue" to show feedback on clue completion (all letters)

default

clue

Optional ignoreCase

ignoreCase: boolean

Ignore case checking the letters

default

true

Optional namespace

namespace: string

Namespace for events

default

jq-crossword

Methods

Optional createBoard

  • createBoard(): JQuery
  • Override the default creation of the board

    example
    $(".crossword").crossword({
         definition:definition,
         createBoard:()=>{
             return $(`<div class="my-custom-board"></div>`);
         }
    })
    
    see

    CrosswordGame._createBoard

    Returns JQuery

Optional createCell

  • createCell(definition: CrosswordCell): JQuery
  • Override the default creation of the cell Please note that jq-crossword requires some classes and attributes to work, those could not be override

    example
    $(".crossword").crossword({
         definition:definition,
         createCell:(definition)=>{
             return $(`<div class="my-custom-cell" data-x="${definition.x}" data-y="${definition.y}"></div>`);
         }
    })
    
    see

    CrosswordGame._createCell

    Parameters

    • definition: CrosswordCell

    Returns JQuery

Optional createCellField

  • createCellField(definition: CrosswordCell): JQuery
  • Override the default creation of the field of a cell

    example
    $(".crossword").crossword({
         definition:definition,
         createCellField:(definition)=>{
             return $(`<input class="my-custom-field">`);
         }
    })
    
    see

    CrosswordGame._createCellField

    Parameters

    • definition: CrosswordCell

    Returns JQuery

Optional createCluesList

  • createCluesList(across: boolean): JQuery
  • Override the default creation of a list of clues

    example
    $(".crossword").crossword({
         definition:definition,
         createCluesListContainer:(definition)=>{
             return $(`<ul class="my-custom-create-clues-list"></ul>`);
         }
    })
    
    see

    CrosswordGame._createCluesList

    Parameters

    • across: boolean

    Returns JQuery

Optional createCluesListContainer

  • createCluesListContainer(across: boolean): JQuery
  • Override the default creation of clues list container This element is optional.

    example
    $(".crossword").crossword({
         definition:definition,
         createCluesListContainer:(definition)=>{
             return $(`<div class="my-custom-create-clues-list-container"></div>`);
         }
    })
    
    see

    CrosswordGame._createCluesListContainer

    Parameters

    • across: boolean

    Returns JQuery

Optional createCluesListItem

  • createCluesListItem(definition: CrosswordClueDefinition): JQuery
  • Override the default creation of a clues list item

    example
    $(".crossword").crossword({
         definition:definition,
         createCluesListItem:(definition)=>{
             return $(`<li class="my-custom-create-clues-list-item"></li>`);
         }
    })
    
    see

    CrosswordGame._createCluesListItem

    Parameters

    • definition: CrosswordClueDefinition

    Returns JQuery

Optional createRow

  • createRow(rowIndex: number): JQuery
  • Override the default creation of the row

    example
    $(".crossword").crossword({
         definition:definition,
         createRow:(rowIndex)=>{
             return $(`<div class="my-custom-row my-custom-row--${rowIndex}"></div>`);
         }
    })
    
    see

    CrosswordGame._createRow

    Parameters

    • rowIndex: number

    Returns JQuery

Generated using TypeDoc