The jquery.prettyPhoto attachment calls the script to display on the page
When I move:
<script src="js/jquery.prettyPhoto.js"></script> To:
<script type="text/javascript"> ... </script> Then the script begins to appear on the page with the bold part:
style = "border: none; overflow: hidden; width: 500px; height: 23px;" allowTransparency = "true"> '}, s); var o = this, u = false, a, f, l, c, h, p, d = e (window) .height (), v = e ...
The script contacts this information:
Class: prettyPhoto Use: Lightbox clone for jQuery Author: Stephane Caron (http://www.no-margin-for-errors.com) Version: 3.1.5 How to move script from .js file to page correctly ?
When the contents of a javascript contains a closing script </script> , it can cause the browser analyzer to misinterpret the script block code.
The code is here:
<script type="text/javascript"> alert("</script>"); </script> Will not work, and the output you see in the browser will be
"); As if the browser read the script block as
**script start tag ->** <script type="text/javascript"> alert("</script> **<- script end tag** Decision
There are two well-known solutions for the <script>...</script> inside the script block:
- Divide the line into two separate lines and combine them with
+
- Wrap the entire block of script code with a block of comment code:
Please note that in the second example DOES NOT WORK if you only have a closing tag, because the browser will mark this closing line as the tag that should have closed your original
<scrip>.
This example will not work:
In particular, for your code, this is jsfiddle , which fixes it.
No mistakes. https://jsfiddle.net/rL9h958e/1/
The script had a lot of = = problems, as well as bad html.
Social_Tools looks suspicious in all cases,
social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a></div>' + '<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></div>' + '<div class="facebook">