Where do i put the $ scripts?


Hey, im trying to add some scripts to my site, lets take for example the search button.

class=“ui search” // this is html…

But this part :
source: content

var content = [
{ title: ‘Andorra’ },
{ title: ‘United Arab Emirates’ },
{ title: ‘Afghanistan’ },
// etc

where do i put the “$” part? i tried to insert everything into a script tag but it didnt work… thank you!


You probably inserted your JS stuff somewhere in <head>...</head> or at least before your search element was created. Technically this is a question of jQuery people )) But you should always put your JS into a “dom ready” function. For instance

    <!-- include jquery files here -->
        $(function() {
            //your JS code goes here
    <!-- your page here -->