Javascript function does not work when
function loadcontents(obj) {
var params = $(obj).attr('href').split('?');
$.getJSON(IVIDPLAY_BASE_DIR+'content/load2.php?'+params[1], function(json) {
if (json.returnval == 1) {
$('#contents').fadeOut('fast', function() { $(this).html('json.contents').fadeIn('slow'); });
}
}
is trigger to replace this div:
<div class="content">
<a href="{$content2.url}" onclick="return loadContent2(this, 'page', '2')">Click Here
</a>
</div>
in another word, there is a function being refresh by the first function and it does not work, when the second one does work.
However! when
loadContent2(this, 'page', '2')
is replace or remove
loadContent2(this, "page", "2")
like so, the first function work, but not the second!
is there a way to by pass the quote issue? if it’s a quote issue?
any help highly appreciated!
EDIT:
fire bug show no error, but it’s clearly not working as logically should.
Oh well,
You need to use this:
🙂