This is a migrated thread and some comments may be shown as answers.

Problem with bind a js script

1 Answer 48 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Batbayar
Top achievements
Rank 1
Batbayar asked on 22 Apr 2014, 03:19 PM
Hello,

my script do not work on simulator when i am tapping on it. (click Event) It appears on screen but no functionality. 
The script is attached, and here is what i wrote in index.html to bind.

<div data-role="view" id="first" data-title="Puzzle" data-layout="mobile-tabstrip">
        <img src="styles/images/schlaufuchs_bg.jpg" alt="MH" class="jqPuzzle jqp-de-r3-c3" />
    </div>

Thanks
Bold

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 25 Apr 2014, 10:18 AM
Hello Batbayar,

Following your instructions, I was able to reproduce the issue. Checking the Console in the Debug options of the AppBuilder Simulator, I found the "Uncaught TypeError: Cannot read property 'msie' of undefined" at file: scripts/jquery-jqpuzzle-full-js.js (744)" error. It seems like the jQuery puzzle you are using in not developed for mobile applications, as it is checking for "msie" browsers.

However, commenting the content on line 744 in the jquery-jqpuzzle-full-js.js file, like this:
/*if($.browser.msie) $gui[0].onselectstart = function() { return false; };
else*/  $gui.mousedown(function() { return false; });
corrected the behavior of the puzzle.

Please, keep in mind this is only a "hack", that works around the current issue. And if you continue with this js library, without refactoring it for mobile usage, more issues are expected to appear.

I hope this helps.

Regards,
Kaloyan
Telerik
 

Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

 
Tags
AppBuilder Windows client
Asked by
Batbayar
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or