Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter coder0815

    (@coder0815)

    I figured this out myself:

    The problem is the selector ‘.quiz’ in the js file to get the session.
    In my case i have several other elements with class=”quiz …”. So this breaks the plugin.

    Change in client-side.php @ line 48: change

    <div class=”quiz” id=”<?php echo $session;?>”>

    to

    <div class=”quiz”>
    <input type=”hidden” id=”quiz-session” name=”quiz-session” value=”<?php echo $session;?>”/>

    and in quiz.js change every

    var session=$(“.quiz”).attr(“id”);

    to

    var session=$(‘#quiz-session’).val();

    You should read several stuff:
    https://www.w3.org/TR/html4/types.html#type-id

    “ID and NAME tokens _must_ begin with a letter ([A-Za-z]) …”

    And in your js don’t use:

    $(this).css…
    $(this).attr…
    $(this).somethingelse….

    Better:

    var $this=$(this);
    $this.css..
    $this…..

    Cheers.
    coder

    <div class=”quiz” id=”<?php echo $session;?>”>

    to

    <div class=”quiz”>
    <input type=”hidden” id=”quiz-session” name=”quiz-session” value=”<?php echo $session;?>”/>

    and in quiz.js change every

    var session=$(“.quiz”).attr(“id”);

    to

    var session=$(‘#quiz-session’).val();

    I implemented this but did not work out …
    Kindly help

    Thread Starter coder0815

    (@coder0815)

    forget this plugin!

    It seams that this is no longer maintained!

    There was never a response from the developer!

    If you can write PHP and JS and have a look at the source you would say forget this.
    It’s broken by design!

    coder

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: SS Quiz] Broken’ is closed to new replies.