Skip to content

1.6 to 2 conversion - unable to figure out conversion #261

Description

@PandaWood

I can't understand what needs to be done to v1.6 code to get it to work under v2.
I realize the documentation is inadequate, but even with the source code it seems like I just cannot do what I've done before.

This is my old code.

  $.nyroModalSettings
        type: 'iframe'
        minWidth: 700
        minHeight: 420
        showBackground: (elts, settings, callback)->
            elts.bg.css({opacity:0}).fadeTo 200, 0.70, callback
        hideBackground: (elts, settings, callback)->
            elts.bg.fadeOut 100, callback


    $('.someLink a').click (e)->
        e.preventDefault()
        sentence = $(@).closest('td').data('sentence').replace(/\s*/g, '')
        $.nyroModalManual
            title: sentence
            url: $(@).attr('href')

The closest I can get just doesn't work


$('.someLink a').nyroModal
        type: 'iframe'
        sizes:
            minW: 700
            minH: 420
        anim: 
            showBg: (elts, settings, callback)->
                elts.bg.css({opacity:0}).fadeTo 200, 0.70, callback
            hideBg: (elts, settings, callback)->
                elts.bg.fadeOut 100, callback


    $('.grammarLink a').click (e)->
        e.preventDefault()
        sentence = $(@).closest('td').data('sentence').replace(/\s*/g, '')
        url = $(@).attr 'href'
        $.nmManual url, title: sentence

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions