jQuery vs Lectora 17

georgeb
georgeb Community Member Posts: 43
Hi all, not sur eif this is the right place to ask / notify:

I tried to do something with jQuery. So to get going I started the Part 1 blog by Trivantis: https://www.trivantis.com/blog/using-jquery-lectora-customize-e-learning-courses-part-1/

But: The first test already fails. Is this because I'm using Lectora 17? (Publisher, desktop)

Anyone else has problems? Or maybe cool jquery examples like a horizontal drag drop exercise?

Comments

  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    What are you trying to do that failed and how did you do it? There is no issue using jQuery with version 17.
  • georgeb
    georgeb Community Member Posts: 43
    Disabling the check boxes.

    When I load the page (preview and published to html) I don't see the page as it should. Like it doesn't load the styling.

    (similar like when you load a page when an action has a missing target)
  • timk
    timk Community Member Posts: 1,244 ✭ Legend ✭
    The code from the blog article should work (as long as you've deactivated Seamless Play). If you copied the code directly from the blog to Lectora, you should be aware that you have to replace all the fancy quotes (which aren't quotes) with real quotes:
    $("input").click(check_and_limit);
    
    function check_and_limit() {
    if ($("input:checked").length == 3) {
    $("input:not(:checked)").attr("disabled", true)
    } else {
    $("input").attr("disabled", false)
    }
    }
  • georgeb
    georgeb Community Member Posts: 43
    Aha, that works, thanks!