Good day. I decided to make a website, but because of my interesting ideas, I had to use the js-plugin.
So the essence of what, js-plug-ins have the settings of the plugin itself. They look like this:

//Вставляется в html-страницу, например pluginName(".main", { firstOption: "true", secondOption: false }); 

So, I want to remove these plugin settings, completely. Tell me, please, what to change, so that everything would work without:

 //Вставляется в html-страницу, например pluginName(".main", { firstOption: "true", secondOption: false }); 

I understand that ".main" should be written somewhere in the js-file, but where?

Here is the plugin itself: http://pastebin.com/fgaydWae

Closed due to the fact that the question essence is not clear to the participants by aleksandr barakin , user194374, cheops , fori1ton , VenZell July 7 '16 at 8:55 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    If I understand correctly, you need to remove from html an element with the class '.main' and the contents of the script.

    Then make a call to the settings in the js file and create a '.main' element in front of them:

     //В js файле var main = document.createElement('div'); main.className = 'main'; document.body.appendChild(main); // Или найдите контейнер через document.querySelector('#containerId'); pluginName(".main", { firstOption: "true", secondOption: false }); 

    In html at the end of the body connect the script:

     <script type="text/javascript" src="yourJsFile.js"></script> 
    • you need to remove the element with the class '.main' from html - no, I need to remove the plugin settings. Well, it's hard to understand, but I'm too lazy to explain. - gm-111