I want to have a dialog window with an input. I could use the default jQuery-ui one, but I am using one that incorporate bootstrap. However, the input only appears the first time that it is opened, any subsequent times the dialog is opened, the input is missing. How would this be remedied?
Here is the HTML:
<!DOCTYPE html>
<html>
<head lang="en">
<link rel="stylesheet" href="../bower_components/jquery-ui/themes/base/jquery.ui.all.css">
<link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../bower_components/bootstrap3-dialog/css/bootstrap-dialog.min.css">
<link rel="stylesheet" href="../bower_components/bootstrap-datepicker/css/datepicker3.css">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h3>Hello!</h3>
<div>
<span>Enter a Zip Code: </span>
<input type="text" id="zip">
<button id="getEvents" class="btn btn-primary">Get events!</button>
</div>
<div class="datepicker"></div>
<div id="events"></div>
<button id="addItemButton">Add an item</button>
<div id="addItemDialog"><input type="text" id="newItem"></div>
<script src="../bower_components/jquery/jquery.min.js"></script>
<script src="../bower_components/jquery-ui/ui/jquery-ui.js"></script>
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="../bower_components/bootstrap3-dialog/js/bootstrap-dialog.js"></script>
<script src="../bower_components/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="js/calendar.js"></script>
</body>
</html>
Here is the JS:
$(function () {
"use strict";
var url,
year,
month,
zip,
date,
events = [],
newItem;
$("#addItemDialog").hide();
$(".datepicker").datepicker({dateFormat: "yy-mm-dd"}).click(function(){
$("#events").empty();
date = $(".datepicker").datepicker("getDate");
//console.dir(date.toISOString().substr(0, 10));
$(events).each(function(i, event){
//console.log(event);
if(event.date.substr(0, 10) === date.toISOString().substr(0, 10)){
console.log(event.title);
$("#events").append("<h4 class='event'>" + event.title + "</h4>");
}
});
});
$("#getEvents").on("click", function () {
zip = $("#zip").val();
if(isValidUSZip(zip)){
zip = zip.substr(0, 5);
getCalendar();
}else{
BootstrapDialog.show({
message: "You must enter a valid zip code!",
buttons: [{label:"OK", action: function(dialog){dialog.close();}}],
draggable: true
});
}
});
function isValidUSZip(sZip) {
return /^[0-9]{5}(?:-[0-9]{4})?$/.test(sZip);
}
function getCalendar() {
$.ajax({
type: "GET",
url: "http://www.hebcal.com/hebcal/?v=1&cfg=json&nh=on&nx=on&year=now&month=x&ss=on&mf=on&c=on&zip=" + zip +"&m=72&s=on",
success: function (data) {
console.dir(data);
$(data.items).each(function(index, item){
//console.dir(item.date.substr(0, 10));
events.push(item);
});
}
});
}
$("#addItemButton").on("click", function(){
BootstrapDialog.show({
message: $("#newItem"),
buttons: [{
label: "Enter",
action: function(dialog){
newItem = $("#newItem").val();
events.push({date: new Date(date).toISOString(), title: newItem});
dialog.close();
}
}]
});
});
});
I took a time and make this fiddle, aparently everything is working fine:
I doubt about this line for a moment, but still uncommented is going right:
$(function () {
//"use strict";
var url,
year,
month,
zip,
date,
events = [],
newItem;
http://jsfiddle.net/r2FyC/3/
Related
Are there any Event Listeners that can be attached to a word. So when the word is clicked, information like a definition can be displayed on the page. Using jQuery
Thanks,
Adam
Sorry for not posting code. I have to make it so that when the user clicks on the name of a person in the list, the box of data on the right side of the screen fills with the description of the location of the artwork. Which is in my JSON file.
Here is my code so far
<!DOCTYPE html>
<hmtl lang="en">
<head>
<meta charset="utf-8" />
<title>AJAX</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
<script src="jquery.js" type="application/javascript"></script>
<script src="ajax.js" type="application/javascript"></script>
</head>
<body>
<div id="loaded-data"></div>
<div id="result-box"></div>
</body>
</hmtl>
$(function() {
let request = $.ajax({
method: 'GET',
url : 'people.json',
dataType: 'json',
});
request.done(function(data) {
let list = data.body.list;
let resultBox = $('#result-box');
let unorderedList = $('<ul>');
resultBox.append(unorderedList);
for (let person of list) {
let listItem = $('<li>');
listItem.text(person.name);
listItem.attr('data-url', person.links[0].href);
unorderedList.append(listItem);
}
});
request.fail(function(response) {
console.log('ERROR: ' + response.statusText);
});
});
{
"links":[{"rel":"self","href":"http://www.philart.net/api/people.json"},{"rel":"parent","href":"http://www.philart.net/api.json"}],
"head":{"title":"People","type":"listnav"},
"body":{
"list":[
{"name":"Adam","links":[{"rel":"self","href":"http://www.philart.net/api/people/325.json"}]},
{"name":"Abigail Adams","links":[{"rel":"self","href":"http://www.philart.net/api/people/157.json"}]},
{"name":"John Adams","links":[{"rel":"self","href":"http://www.philart.net/api/people/410.json"}]},
{"name":"Samuel Adams","links":[{"rel":"self","href":"http://www.philart.net/api/people/439.json"}]},
{"name":"Lin Zexu","links":[{"rel":"self","href":"http://www.philart.net/api/people/347.json"}]},
{"name":"James A. Zimble","links":[{"rel":"self","href":"http://www.philart.net/api/people/345.json"}]},
{"name":"Doris Zimmerman","links":[{"rel":"self","href":"http://www.philart.net/api/people/171.json"}]}
]
}
}
Teemu has already mentioned a way to accomplish this behavior in the comment. You can do it as follows
// handle click and add class
$(".word").click(function() {
var word = $(this).text()
alert(word);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div>
<p class="word">Hello</p>
</div>
You could replace the word and wrap it with a div.
$('p').html(function(index, value) {
return value.replace(/\b(here)\b/g, '<div class ="event">here</div>');
});
$('.event').click(function() {
console.log('definition');
});
<p>This is the information: Click here.</p>
I'm trying to build a search input with the autocomplete feature. However, the suggestions depend on the input and are not static - which means that I have to retrieve the list every time the user types into the field. The suggestions are based on Google autosuggest: "http://google.com/complete/search?q=TERM&output=toolbar".
I'm currently using http://easyautocomplete.com.
This is my code:
var array = [];
var options = {
data: array
};
$("#basics").easyAutocomplete(options);
$("#basics").on("keyup",function() {
var keyword = $(this).val();
array = [];
updateSuggestions(keyword);
});
function updateSuggestions(keyword) {
$.ajax({
type: "POST",
url: "{{ path('suggestKeywords') }}",
data: {keyword:keyword},
success: function(res){
var res = JSON.parse(res);
for(var i in res)
{
var suggestion = res[i][0];
array.push(suggestion);
console.log(suggestion);
}
}
});
var options = {
data: array
};
$("#basics").easyAutocomplete(options);
}
I know this is not a very good way to do this - so do you have any suggestions as to how to do it?
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Autocomplete functionality</title>
<link href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<!-- Javascript -->
<script>
$(function() {
var availableTutorials = [
"ActionScript",
"Boostrap",
"C",
"C++",
];
$("#automplete-1").autocomplete({
source: availableTutorials
});
});
</script>
</head>
<body>
<!-- HTML -->
<div class="ui-widget">
<p>Type "a" or "s"</p>
<label for="automplete-1">Tags:</label>
<input id="automplete-1">
</div>
</body>
</html>
Consider the following code:
<html>
<head>
<meta charset="UTF-8">
<title>title...</title>
<link type="text/css" rel="stylesheet" href="jquery-ui-1.10.4.custom.css" />
<script type="text/javascript" src="jquery-1.10.2.js"></script>
<script type="text/javascript" src="jquery-ui-1.10.4.custom.min.js"></script>
</head>
<body>
<div id="dialog1" style="display: none">
<p>some text</p>
</div>
<input id="but1" type="button" value="clickme" />
</body>
<script>
$("#but1").on ('click', {valu: 1}, f);
$("#dialog1").dialog({ autoOpen:false });
function f (event) {
console.log(event.data.valu); // EXISTS
$.ajax({
type: "POST",
url: "event.xml",
dataType: "xml",
success: function (result) {
console.log(event.data.valu); // DOESN'T EXIST
var promptDialog = $("#dialog1");
var promptDialogButtons = {};
promptDialogButtons['ok'] = function(){
$("#dialog1").on('click', { valu: 0 }, f);
$("#dialog1").click();
$("#dialog1").dialog('close');
};
promptDialogButtons['cancel'] = function(){
$("#dialog1").dialog('close');
};
promptDialog.dialog({ width:333, modal: true, title: "sometitle", buttons:promptDialogButtons});
$("#dialog1").dialog('open');
}
});
}
</script>
</html>
When clicking on "clickme" and then "ok" the output will be:
1
1
0
TypeError: event.data is null
Why is event.data.valu forgotten in the $.ajax() after recursion? No redeclaration of parameter event in the $.ajax(). Please fill in the valid path to the JQuery libraries. Use any valid event.xml file.
Apparently the jquery-ui dialogue does handle the click event of the ok button differently. your problem could be solved by calling the function f directly within the success function.
f({ data:{
valu: 0
}
});
see http://jsfiddle.net/klickagent/3L1zro7w/8/
for a working example
I'm working on a tournament bracketing system, and I found a library called "JQuery bracket" which can help a lot. But there are some problems:
I was planning to retrieve team names (and possibly match scores) from a PostgreSQL database and put them on the brackets. However, the data must be in JSON, and the parser is in Javascript. I can't seem to figure out a workaround.
Original code:
<html>
<head>
<title>jQuery Bracket editor</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.json-2.2.min.js"></script>
<script type="text/javascript" src="jquery.bracket.min.js"></script>
<link rel="stylesheet" type="text/css" href="jquery.bracket.min.css" />
<style type="text/css">
.empty {
background-color: #FCC;
}
.invalid {
background-color: #FC6;
}
</style>
<script type="text/javascript">
function newFields() {
return 'Bracket name [a-z0-9_] <input type="text" id="bracketId" class="empty" /><input type="submit" value="Create" disabled />'
}
function newBracket() {
$('#editor').empty().bracket({
save: function(data){
$('pre').text(jQuery.toJSON(data))
}
})
$('#fields').html(newFields())
}
function refreshSelect(pick) {
var select = $('#bracketSelect').empty()
$('<option value="">New bracket</option>').appendTo(select)
$.getJSON('rest.php?op=list', function(data) {
$.each(data, function(i, e) {
select.append('<option value="'+e+'">'+e+'</option>')
})
}).success(function() {
if (pick) {
select.find(':selected').removeAttr('seleceted')
select.find('option[value="'+pick+'"]').attr('selected','selected')
select.change()
}
})
}
function hash() {
var bracket = null
var parts = window.location.href.replace(/#!([a-z0-9_]+)$/gi, function(m, match) {
bracket = match
});
return bracket;
}
$(document).ready(newBracket)
$(document).ready(function() {
newBracket()
$('input#bracketId').live('keyup', function() {
var input = $(this)
var submit = $('input[value="Create"]')
if (input.val().length === 0) {
input.removeClass('invalid')
input.addClass('empty')
submit.attr('disabled', 'disabled')
}
else if (input.val().match(/[^0-9a-z_]+/)) {
input.addClass('invalid')
submit.attr('disabled', 'disabled')
}
else {
input.removeClass('empty invalid')
submit.removeAttr('disabled')
}
})
$('input[value="Create"]').live('click', function() {
$(this).attr('disabled', 'disabled')
var input = $('input#bracketId')
var bracketId = input.val()
if (bracketId.match(/[^0-9a-z_]+/))
return
var data = $('#editor').bracket('data')
var json = jQuery.toJSON(data)
$.getJSON('rest.php?op=set&id='+bracketId+'&data='+json)
.success(function() {
refreshSelect(bracketId)
})
})
refreshSelect(hash())
$('#bracketSelect').change(function() {
var value = $(this).val()
location.hash = '#!'+value
if (!value) {
newBracket()
return
}
$('#fields').empty()
$.getJSON('rest.php?op=get&id='+value, function(data) {
$('#editor').empty().bracket({
init: data,
save: function(data){
var json = jQuery.toJSON(data)
$('pre').text(jQuery.toJSON(data))
$.getJSON('rest.php?op=set&id='+value+'&data='+json)
}
})
}).error(function() { })
})
})
</script>
</head>
<body>
Pick bracket: <select id="bracketSelect"></select>
<div id="main">
<h1>jQuery Bracket editor</h1>
<div id="editor"></div>
<div style="clear: both;" id="fields"></div>
<pre></pre>
</div>
</body>
</html>
After the data is retrieved, upon display, you are going to want to add disabled to the html input element. For instance:
<input type="text" id="bracketId" class="empty" disabled>
This will render your text field uneditable.
If you are looking to do this as people are filling out their brackets, I would suggest you either add a <button> after each bracket or fire a jquery event with the mouseout() listener that adds the disabled attribute to your input fields.
I'll try and make this as understandable as I can,my app designed and developed using a cloud based app maker is a multiple choice sports game. The HTML, CSS and JavaScript layout and buttons are completed but I want to add the finishing touches.
I have the basic code for when the user clicks the correct button so the score increases I think.... (I just need to change it so it works within my game.)
<div id="output">0</div>
$('#target1').click(function(){
$('#output').html(function(i, val){
return val * 1 + 1 });
});
and I know for incorrect its...
$('#target2').click(function(){
$('#output').html(function(i, val){
return val * 1 - 1 });
});
But first I am stuck on how to carry the score from question 1 over to all the other questions so that it increases/decreases then I'm not sure how to create a simple leaderboard once the games finished. My final problem will be where to place the code correctly as well. The easiest or simplest way will be very much appreciated, thank you for taking the time to read this.
Tiggzi HTML code is this...
<head>
<script type="text/javascript" src="res/lib/detectmobilebrowser.js">
</script>
<script type="text/javascript">
var screen_mobile = true;
var screen_width = 320;
var screen_height = 480;
var browser_mobile = is_mobile_browser();
if (screen_mobile && !browser_mobile && top == window)
{
top.location.href = './mob-screen-B626.html';
}
</script>
<title>
Question 1
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent"
/>
<link type="text/css" href="res/lib/jquerymobile/1.0/jquery.mobile-1.0.css" rel="stylesheet"
/>
<link type="text/css" href="files/views/assets/asset-1312828" rel="stylesheet" />
<script type="text/javascript" src="res/lib/store/json2.js">
</script>
<script type="text/javascript" src="res/lib/jquery/jquery-1.6.4.js">
</script>
<script type="text/javascript" src="res/lib/jquerymobile/jquery.mobile.iepatch.js">
</script>
<script type="text/javascript" src="res/lib/jquerymobile/1.0/jquery.mobile-1.0.js">
</script>
<script type="text/javascript" src="res/lib/mobilebase.js">
</script>
<script type="text/javascript" src="res/lib/store/jstore.js">
</script>
<script type="text/javascript" src="res/lib/event/customEventHandler.js">
</script>
<script type="text/javascript" src="res/lib/base/sha1.js">
</script>
<script type="text/javascript" src="res/lib/base/oauth.js">
</script>
<script type="text/javascript" src="res/lib/base/contexts.js">
</script>
<script type="text/javascript" src="res/lib/base/jsonpath.js">
</script>
<script type="text/javascript" src="res/lib/base/jquery.xml2json.min.js">
</script>
<script type="text/javascript" src="res/lib/base/api.js">
</script>
<script type="text/javascript" src="res/lib/base/impl.js">
</script>
<script type="text/javascript" src="res/lib/phonegap.js">
</script>
<script type="text/javascript" src="res/lib/childbrowser.js">
</script>
<script type="text/javascript" src="res/lib/barcodescanner.js">
</script>
<link href="res/css/mobilebase.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script language="JavaScript" type="text/javascript">
if (navigator.userAgent.match(/iP/i))
{
$(window).bind('orientationchange', function(event)
{
$('meta[name="viewport"]').attr('content', 'initial-scale=1.0,maximum-scale=1.0, ' + ((window.orientation == 90 || window.orientation == -90 || window.orientation == 270) ? "height=device-width,width=device-height" : "height=device-height,width=device-width"));
}).trigger('orientationchange');
}
</script>
<div data-role="page" style="min-height:480px;" id="j_38" class="type-interior">
<div data-role="header" data-position="fixed" data-theme='a' data-add-back-btn="false"
name="mobileheader2" id="j_40" class='mobileheader4'>
<h1 dsid="mobileheader2">
Question 1
</h1>
</div>
<div data-role="content" id="j_41" name="mobilecontainer2" class="mobilecontainer4"
dsid="mobilecontainer2" data-theme='b'>
<link href="screen-B626.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="screen-B626.js">
</script>
<div name="mobilelabel1" id="j_42" dsid="mobilelabel1" data-role="tiggr_label" class='mobilelabel3'>
Who won the Barclays Premier League from 1993-1994?
</div>
<div class="mobilebutton7_wrapper ">
<a data-role="button" name="BR" dsid="BR" class=' mobilebutton7' id='j_43' data-inline='false'
data-theme='a' tabIndex="1">Blackburn Rovers</a>
</div>
<div class="mobilebutton8_wrapper ">
<a data-role="button" name="AR" dsid="AR" class=' mobilebutton8' id='j_44' data-inline='false'
data-theme='a' tabIndex="2">Arsenal</a>
</div>
<div class="mobilebutton9_wrapper ">
<a data-role="button" name="MU" dsid="MU" class=' mobilebutton9' id='j_45' data-inline='false'
data-theme='a' tabIndex="3">Manchester Utd</a>
</div>
<div class="mobilebutton10_wrapper ">
<a data-role="button" name="LI" dsid="LI" class=' mobilebutton10' id='j_46' data-inline='false'
data-theme='a' tabIndex="4">Liverpool</a>
</div>
<div class="mobilebutton11_wrapper ">
<a data-role="button" name="Home" dsid="Home" class=' mobilebutton11' id='j_47'
data-icon='arrow-l' data-iconpos='left' data-inline='false' data-theme='a' tabIndex="5">Home</a>
</div>
</div>
</div>
</body>
JavaScript code is this...
/*
* JS for Question 1 generated by Exadel Tiggzi
*
* Created on: Sunday, February 26, 2012, 02:05:40 PM (PST)
*/
/************************************
* JS API provided by Exadel Tiggzi *
************************************/
/* Setting project environment indicator */
Tiggr.env = "apk"; /* Object & array with components "name-to-id" mapping */
var n2id_buf = {
'mobilecontentlayer6': 'j_13',
'mobileheader6': 'j_14',
'mobilecontainer6': 'j_15',
'mobilelabel3': 'j_16',
'mobilefooter6': 'j_17',
'annotationslayer6': 'j_18',
'mobilelabel1': 'j_42',
'BR': 'j_43',
'AR': 'j_44',
'MU': 'j_45',
'LI': 'j_46',
'Home': 'j_47'
};
if ("n2id" in window && n2id != undefined) {
$.extend(n2id, n2id_buf);
} else {
var n2id = n2id_buf;
}
function pageItem(pageName, pageLocation) {
this.name = pageName;
this.location = pageLocation;
}
Tiggr.AppPages = [
new pageItem('Question 5 ', 'screen-D8D7.html'), new pageItem('Incorrect!!!', 'screen- B60E.html'), new pageItem('News', 'screen-5FA9.html'), new pageItem('T&C', 'screen-A553.html'), new pageItem('Question 1 ', 'screen-B626.html'), new pageItem('Question 4 ', 'screen-5661.html'), new pageItem('Question 3 ', 'screen-BFDF.html'), new pageItem('Home', 'screen-1865.html'), new pageItem('Question 2 ', 'screen-4717.html'), new pageItem('current', 'screen-B626.html')];
function navigateTo(outcome, useAjax) {
Tiggr.navigateTo(outcome, useAjax);
}
function adjustContentHeight() {
Tiggr.adjustContentHeight();
}
function adjustContentHeightWithPadding() {
Tiggr.adjustContentHeightWithPadding();
}
function unwrapAndApply(selector, content) {
Tiggr.unwrapAndApply(selector, content);
}
function setDetailContent(pageUrl) {
Tiggr.setDetailContent(pageUrl);
}
/*********************
* GENERIC SERVICES *
*********************/
/*************************
* NONVISUAL COMPONENTS *
*************************/
var datasources = [];
/************************
* EVENTS AND HANDLERS *
************************/
// screen onload
screen_B626_onLoad = j_38_onLoad = function() {
createSpinner("res/lib/jquerymobile/images/ajax-loader.gif");
Tiggr.__registerComponent('mobilecontentlayer6', new Tiggr.BaseComponent({
id: 'mobilecontentlayer6'
}));
Tiggr.__registerComponent('mobileheader6', new Tiggr.BaseComponent({
id: 'mobileheader6'
}));
Tiggr.__registerComponent('mobilecontainer6', new Tiggr.BaseComponent({
id: 'mobilecontainer6'
}));
Tiggr.__registerComponent('mobilelabel3', new Tiggr.BaseComponent({
id: 'mobilelabel3'
}));
Tiggr.__registerComponent('mobilefooter6', new Tiggr.BaseComponent({
id: 'mobilefooter6'
}));
Tiggr.__registerComponent('annotationslayer6', new Tiggr.BaseComponent({
id: 'annotationslayer6'
}));
Tiggr.__registerComponent('mobilelabel1', new Tiggr.BaseComponent({
id: 'mobilelabel1'
}));
Tiggr.__registerComponent('BR', new Tiggr.BaseComponent({
id: 'BR'
}));
Tiggr.__registerComponent('AR', new Tiggr.BaseComponent({
id: 'AR'
}));
Tiggr.__registerComponent('MU', new Tiggr.BaseComponent({
id: 'MU'
}));
Tiggr.__registerComponent('LI', new Tiggr.BaseComponent({
id: 'LI'
}));
Tiggr.__registerComponent('Home', new Tiggr.BaseComponent({
id: 'Home'
}));
for (var idx = 0; idx < datasources.length; idx++) {
datasources[idx].__setupDisplay();
}
adjustContentHeightWithPadding();
j_38_deviceEvents();
j_38_windowEvents();
screen_B626_elementsExtraJS();
screen_B626_elementsEvents();
}
// screen window events
screen_B626_windowEvents = j_38_windowEvents = function() {}
// device events
j_38_deviceEvents = function() {
document.addEventListener("deviceready", function() {
adjustContentHeightWithPadding();
});
}
// screen elements extra js
screen_B626_elementsExtraJS = j_38_elementsExtraJS = function() {
// screen (screen-B626) extra code
}
// screen elements handler
screen_B626_elementsEvents = j_38_elementsEvents = function() {
$("a :input,a a,a fieldset label").live({
click: function(event) {
event.stopPropagation();
}
});
$('[name="BR"]').die().live({
vclick: function() {
if (!$(this).attr('disabled')) {
Tiggr.navigateTo('Incorrect!!!', {
transition: 'pop'
});
}
},
});
$('[name="AR"]').die().live({
vclick: function() {
if (!$(this).attr('disabled')) {
Tiggr.navigateTo('Incorrect!!!', {
transition: 'pop'
});
}
},
});
$('[name="MU"]').die().live({
vclick: function() {
if (!$(this).attr('disabled')) {
Tiggr.navigateTo('Question 2 ', {
transition: 'slide',
reverse: false
});
}
},
});
$('[name="LI"]').die().live({
vclick: function() {
if (!$(this).attr('disabled')) {
Tiggr.navigateTo('Incorrect!!!', {
transition: 'pop'
});
}
},
});
$('[name="Home"]').die().live({
vclick: function() {
if (!$(this).attr('disabled')) {
Tiggr.navigateTo('Home', {
transition: 'slide',
reverse: false
});
}
},
});
}
$("body").undelegate("pagebeforeshow").delegate("#j_38", "pagebeforeshow", function(event, ui) {
j_38_onLoad();
});
Many thanks if you are going to reply, I've tried my best searching and testing to get this score counter and leader board but I found it difficult to get results or anything basic.