-
Posts
142 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by j.silver
-
I fully agree with Ingolme. I have covered advanced level of PHP topics, but what I had been doing was understanding the tutorial/code but not playing with it to see how exactly the code works, relying only on getting ready-made codes and tailoring them to my need. Then came the problem, that I found myself not able to modify the code as I wanted to or getting unexpected results that I could not manage to fix. Now, I have decided to go back to the basics, play with the code to get in-depth knowledge of how exactly PHP handles the code.
-
What about a linked CSS file, should it be treated like a linked js and placed at the bottom of the body tag, or it should always be in the header, or makes no difference? My guessing is that it should always be in the header to make each and every bit of html load with proper CSS styling applied to it. There should be no lag between loading html and styling it. Am I correct?
-
Is hosting the files on CDN better than hosting them locally, especially with regards to speed of site loading, particularly on mobile devices? If there is a pro-con comparison between the two, it would help a lot. When we say hosting locally do we mean downloading the jQuery file to one of our site's files, e.g. js, and linking to it there?
- 5 replies
-
- jQuery
- jQuery library
-
(and 2 more)
Tagged with:
-
Thanks, Ingolme. But my question was not about what went wrong, it was about the Notice error: "My understanding prior to this was that Notice means something bad in the code but it is not an error and would not stop the code from executing. But the code has not executed in this example. Since the code is not executing, I am not seeing the real difference between Notice and other forms of errors that prevent codes from executing. Any clarification please?"
-
Dear all: below division spat an unexpected result. The first line of code makes $var7 equals 50; this later value is then divided by 7. Strangely, the output was 10. How come? <?php $var7 = 10; ?> Multiplication: <?php echo $var7 * 5; ?><br /> Division: <?php $var7/7; echo $var7; ?><br />
-
Dear all: I have the following php line of code: <?php $var2 = 5; ?> += : <?php $var2 += 4; echo var2; ?><br /> Because of the lack of the dollar sign before var2 following the echo, it spat out the following error: += : Notice: Use of undefined constant var2 - assumed 'var2' in C:xampphtdocsTutorialsPHPw3schoolsintegers.php on line 29var2 My understanding prior to this was that Notice means something bad in the code but it is not an error and would not stop the code from executing. But the code has not executed in this example. Since the code is not executing, I am not seeing the real difference between Notice and other forms of errors that prevent codes from executing. Any clarification please?
-
Many thanks, justomeguy
- 5 replies
-
- jQuery
- jQuery library
-
(and 2 more)
Tagged with:
-
Many thanks, justomeguy
- 4 replies
-
- jQuery
- jQuery release
-
(and 1 more)
Tagged with:
-
Yes. It loads with version 1.7.1 or earlier only, and I inserted this particular version in the code to enable anybody testing the code to see it loading, whereas increasing said version results in no load. Why is it so?
- 4 replies
-
- jQuery
- jQuery release
-
(and 1 more)
Tagged with:
-
Many thanks, dsonesuk. This is very valuable info. and should be essential especially to speed up loading in mobile devices. If you may kindly share a sample could, it would be a nice demonstration, or state what should I write to google sample codes of what you have explained.
-
Dear all: I am linking jQuery from the internet as well as linking a local js file. Both the code and js file content are shown below. To test if it is loading or not, the alert function is used. Despite having a jQuery release 2.1.4 already, it loads with release 1.7.1 or earlier only. Why is it not loading with subsequent releases? <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery</title> <script src="http://google.com/jsapi"></script> <script src="js/scripts.js"></script> </head> <body> </body> </html google.load('jquery','1.7.1'); google.setOnLoadCallback(function(){alert('Loaded!'); });
- 4 replies
-
- jQuery
- jQuery release
-
(and 1 more)
Tagged with:
-
Do you mean using the likes of PHP's include/require etc.? The same for css files, it is said you should load the minimum css (background, font colours, layout styling etc) for page to show fully rendered, all other css is loaded by using JavaScript to place links to these remaining css styling in the <head>...</head>, this js code again is placed at the bottom of page before body tag. Can you please elaborate further.
-
In a js tutorial of w3schools it is mentioned that calling a js file is done either in the head or body; if in the body, it is preferable to be at the bottom to avoid slowing down page loading should the js loading is slow. Since the browser reads the page from top to bottom, it will hit the head first. Does that mean calling a js file at the bottom of the body is better than calling it in the head?
-
Just a bit of update. There is release 2.x of jQuery, latest, that is not supported by some older browser releases. It reads from jQuery website: jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8. So one has to choose earlier 1.x release for all browser compatibility.
- 3 replies
-
- jQuery
- browser compatibility
-
(and 2 more)
Tagged with:
-
Dear all: If I will learn js, jQuery, Ajax, and json, do I need to additionally learn bootstrap? What extra value would I get from bootstrab?
-
Subsequent to posting the above question, I have done some more search on the topic and found two different opinions: one preferring local connection to be in the safe side should the jQuery library in the internet was down for whatever reason; the other is preferring the opposite, claiming to get faster linking especially on mobile devices. Both conflicting opinions might render the above question valid.
- 5 replies
-
- jQuery
- jQuery library
-
(and 2 more)
Tagged with:
-
Dear all: I am intending to use jQuery for an FAQ collapsible/uncollapsible text. Because my FAQ will contain essential information, I am keen to have it visible to everybody. Is there any limitation in relation to browser support of jQuery that I should be aware of?
- 3 replies
-
- jQuery
- browser compatibility
-
(and 2 more)
Tagged with:
-
Dear all: I know it is not usually normal to make double links of any file, however, since jQuery library can be linked to the page via the internet or locally, can we do both linking to achieve guaranteed loading if one fails and to make sure that getting the first link of the two would mean a faster loading? Is there any harm of doing so?
- 5 replies
-
- jQuery
- jQuery library
-
(and 2 more)
Tagged with:
-
Dear all: Below is how we can collapse and uncollapse a block of text suitable for FAQ or other similar effects, using HTML5. It seems it is supported by Chrome so far. The browser, however, will automatically highlight the output of the <summary> tag with a box. Is there a way of removing such box? Thanks. <!DOCTYPE html> <html> <body> <article class="collapsible_faq"> <details> <summary>Why do You Operate this Type of Business?</summary> <p>This is a feature of collapsing and uncollapsing a block of text using HTML5. It is just supported by chrome so far and Safari has started working on it. You should click on the little arrow to the left to collapse and uncollapse the text. </p> </details> <details> <summary>In Which Countries Do You Presently Work?</summary> <p>This is a feature of collapsing and uncollapsing a block of text using HTML5. It is just supported by chrome so far and Safari has starting working on it. You should click on the little arraow to the left to collapse and uncolapse the text. </p> </details> </article> </body> </html>
-
Dear all: May I kindly request a help in providing a nice code for collapsing and expanding a block of text, e.g., blah blah blah read more... then at the bottom of the expanded page a way to collapse the block to original status. I searched the web and found some code in js, a language I don't know. Can that be achieved in PHP or html?