coder0815
Forum Replies Created
-
Forum: Plugins
In reply to: [SS Quiz] [Plugin: SS Quiz] Brokenforget 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
Forum: Plugins
In reply to: [SS Quiz] [Plugin: SS Quiz] Templates not savedplease see my patch @
http://ww.wp.xz.cn/support/topic/plugin-ss-quiz-broken?replies=2
Forum: Plugins
In reply to: [SS Quiz] [Plugin: SS Quiz] BrokenI 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:
http://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