How can I change the value of the href
attribute of a <link>
and src
of a <script>
.
Real problem, I have two screens that are in different levels (different folders),
in which both are accessed by the window.load
that is within the modal in option Open
.
In the first screen I access the modal and the external css and javascript files are accessed by 2 levels above ../../
and in the second screen they are accessed with three levels ../../../
Example:
jQuery:
$("#pesquisaClienteCss").attr("href","../../view/css/pesquisaCliente.css");
html:
<link id="pesquisaClienteCss" href="../../view/css/pesquisaCliente.css" rel="stylesheet" type="text/css" >
I need when I have a $("#pesquisaCliente).dialog("open");
attr
modify the href
of the link increasing a level of folder ../
could understand?