[AC-4999] Android: WebView unable to Load jQuery from the project resource directory
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-06-02T19:00:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Jignesh Kasundra |
Assignee | Shak Hossain |
Created | 2017-05-28T04:43:27.000+0000 |
Updated | 2017-06-02T19:01:00.000+0000 |
Description
unable to load jQuery from the project resource directory , however it working if loading from the remote location
===================
Resources/app.js
==================
var win = Ti.UI.createWindow({
title: 'mywin',
backgroundColor: '#fff',
width : Ti.UI.FILL,
height : Ti.UI.FILL
});
win.open();
var regmainview = Ti.UI.createView({
top : 0,
bottom : 0,
left : 0,
right : 0,
height : Ti.UI.FILL,
width : Ti.UI.FILL,
backgroundColor : '#fdd',
visible : true
});
win.add(regmainview);
var tempwebview = Ti.UI.createWebView({
width : Ti.UI.FILL,
height : Ti.UI.FILL,
url : 'temp.html'
});
regmainview.add(tempwebview);
===================
Resources/temp.html
jQuery location : Resources/jquery.min.jslocal
===================
<html>
<head>
<script src="/jquery.min.jslocal"></script>
<script>
$(document).ready(function(){
try{
$("p").click(function(){
$(this).hide();
});
}catch(err){
alert(err);
}
});
</script>
</head>
<body>
<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>
</body>
</html>
Hello, Please close this issue. path related above issue got fixed