Welcome Guest, Not a member yet? Register   Sign In
where to write JS code

[eluser]Mitja B.[/eluser]
What you suggest where to write JS code.

The code like this

    $("form input[@type='text']").addClass("input");
    $(".date-pick").css("width", "100px");
    $("input[@name='duration_in_hour'], input[@name='number_of'], input[@name='price_eur'], input[@name='price_eur_simobil']").css("width", "70px");

to write it in view file or in controller file.

If in controler where

function content_add()

$this->load->view('admin/content_add', $data);    


Why should you use PHP to load js?

[eluser]Mitja B.[/eluser]
i can load it in .html too. But i load page with view. How can i load js then?

By placing the normal js link in the view?!

Theme © iAndrew 2016 - Forum software by © MyBB