Skip to Content

JavaScript File

URL: https://playhouse.com.ua/catalog/view/javascript/revolution/common.js
HTTP Status: 200 OK
MIME Type: application/javascript
Last Modified: Sat, 15 Jun 2024 18:58:11 GMT
Download Time: Less than a second
Cookies: None
Size: 59 KB
HTTP Headers:  6 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1function getURLVar(key) {

2 var value = [];

3

4 var query = String(document.location).split('?');

5

6 if (query[1]) {

7 var part = query[1].split('&');

8

9 for (i = 0; i < part.length; i++) {

10 var data = part[i].split('=');

11

12 if (data[0] && data[1]) {

13 value[data[0]] = data[1];

14 }

15 }

16

17 if (value[key]) {

18 return value[key];

19 } else {

20 return '';

21 }

22 }

23}

24

25$(document).ready(function() {

26 // Highlight any found errors

27 $('.text-danger').each(function() {

28 var element = $(this).parent().parent();

29

30 if (element.hasClass('form-group')) {

31 element.addClass('has-error');

32 }

33 });

34

35 // Currency

36 $('#currency .currency-select').on('click', function(e) {

37 e.preventDefault();

38

39 $('#currency input[name=\'code\']').attr('value', $(this).attr('name'));

40

...

</html>