html - Using <script> in CSS -
is there way write script in css , call or execute whenever required ?
i need <script>
tag executed .
i need this..
css code
#execute{ <script> ..some script.. </script> }
so whenever use
<html> . . . .<div id="execute" /> . . . . </html>
so if change script changes reflected everywhere.
is possible?
edit:
is possible keep <script></script>
tags inside js file , host it. , call function() html script executed everywhere need it.
can show me example, tutorial how can it. don't have information js file , how function should called.
thank all
does have in css? jquery great, simple way you're asking. put style information in css (what it's intended for) , keep javascript in html or .js file. take @ http://jquery.com. code this
$(function() { $('#execute') .somecoolfunction() .anothercoolfunction(); });
you use $(function() { /* code */ });
run code when document ready, , use $('#execute')
grab element execute
tag. can lot of cool javascript jquery element.
Comments
Post a Comment