Skip to content

Instantly share code, notes, and snippets.

@sotayamashita
Last active August 5, 2016 06:31
Show Gist options
  • Save sotayamashita/61a5cad518a237139ddfd051ac5dfa1b to your computer and use it in GitHub Desktop.
Save sotayamashita/61a5cad518a237139ddfd051ac5dfa1b to your computer and use it in GitHub Desktop.
Validate that jQuery works in android 4.1 ~ 4.3

How to validate

Use Genymotion to emulate specific Android version and access localhost from it.

index.html:

<!-- 3.x -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<!-- 2.x -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<!-- 1.x -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!doctype html>
<h1>Validate ...</h1>
<script>
if (typeof jQuery === 'undefined') {
  console.log('jQuery not available');
} else {
  console.log('jQuery available');
}
</script>

Result

4.1 4.2 4.3
1.x
2.x
3.x

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment