I have a specific question. How do I embed external .js or .css file in a php file extension?
It does not work the way I embed it in html file extension.
I have a specific question. How do I embed external .js or .css file in a php file extension?
It does not work the way I embed it in html file extension.
You would usually include these inside the <head>
tags
<link rel="stylesheet" type="text/css" href="myStyles.css">
<script src="myScript.js"></script>
But if you must use php for whatever reason, you can use
<? include "myScript.php"; ?>
EDIT:
In response to your comment about targeting outputted text, you would simply echo the text between an identifiable tag. Eg:
<span id:="targetThis">
<? echo "Text" ?>
</span>
Now you can target the text in Css using:
#targetThis {
color: red;
}
You can also grab it using JQuery using:
$('#targetThis') then do whatever it is you wanted to do with it...
Eg
$('#targetThis').html('Edited Text');