I have jquery with class= modal i want to call that class when page load how to do using javascript or php
You can use either
$(document).ready(function(){ /*Code Here/* });
(which is equivalent to $(function(){ /*Code Here/* });
)
to execute the code when the DOM is ready, or you can use
$(document).load(function(){ /*Code Here/* });
to execute the code once all sub-elements have also been loaded, i.e. images.
To do something after page has been loaded, use jQuery like:
$(function(){
// code that should run after page has finished loading
});
You can put your code just before the </body>
tag, like this:
<script type="text/javascript>
$('.modal')....
</script>
</body>