![]() ![]() If using a launcher, this step is usually done for you. The following are absolute must-haves in order to get Mine Chem loaded up and working correctly. ![]() Ultimately, it is recommended to do modding through a launcher such as Feed the Beast or the AT Launcher, since they usually provide mod packs that include Minechem and handle a lot of the initial setup they may also provide an option for a vanilla Minecraft with just Minecraft Forge installed. The following instructions are for the latest version, 5.0.5. As of version 5.0.5 for Minecraft 1.7.10, Minechem machines use Redstone Flux from Thermal Expansion however, older versions for Minecraft 1.6.4 use Universal Electricity. A Microscope and Chemist's Journal to analyze everything and record discoveries.A Chemical Synthesis Machine to combine basic elements and molecules in order to recreate items.A Chemical Decomposer to break down items and blocks into their constituent elements and molecules.However, your basic Minechem setup should have. Display basically deleting the element from your view, but you can still see it in DevTools.Familiarize yourself with Minechem by taking a look at the various Machines, Elements, and Molecules you have at your disposal. I would recommend you do display, depending on how you make your webpage. Visibility fits your situation more, but it will leave a blank transparent space as big as the element it was applied to. Also, you can select text, copy, paste, and do everything you could normally do, even though it's invisible. Note that opacity makes the element still display, just you can't see it as much. document.getElementById('foo').style.visibility = hidden ĭocument.getElementById('foo').style.opacity = 0 ĭocument.getElementById('foo').style.display = none Instead, if you want to just not display it, you can style it in JS using the visibility, opacity, and display properties. So, for the example, if you want to delete the tag, it's basically deleting its data, so if you change the outerHTML to an empty string, it's like deleting it. I'm still a newbie too, but here is one simple and easy way: You can use outerHTML, which is the whole tag, not just a portion:ĮX: blahblahblah's innerHTML would be blahblahblah, and outerHTML would be the whole thing, blahblahblah. Most of them also provide a way to set up a function (like pageInit) to run as soon as the DOM is ready to be manipulated, long before window load fires. It's very important to understand the underlying stuff going on, both in terms of JavaScript fundamentals and DOM fundamentals, but libraries deal with a lot of inconsistencies, and also provide a lot of handy utilities - like a means of hooking up event handlers that deals with browser differences. Or consider using a library like jQuery, Prototype, YUI, Closure, or any of several others to smooth over those browser differences for you. You'll probably want a function for hooking up events so you don't have to repeat that logic every time. Note that I've had to put in some handling to deal with browser differences. ![]() then call pageInit() from a script tag at the very end of your page body (just before the closing tag), or from within the window load event, though that happens very late in the page load cycle and so usually isn't good for hooking up event handlers (it happens after all images have finally loaded, for instance). Really old or non-standard browser, try DOM0 IE (IE9 finally supports the above, though) Var btn = document.getElementById('btnRemoveDummy') ītn.addEventListener('click', removeDummy, false) Instead, in your JavaScript, you can hook them up with the newer (circa year 2000) way instead: The next step is to take it further and avoid using onXYZ attributes for hooking up event handlers. You seem to have good instincts in that your JavaScript code is in its own file and such. However, that style of setting up event handlers is old-fashioned. Var elem = document.getElementById('dummy') īut you don't need (or want) a form for that at all, not if its sole purpose is to remove the dummy div. ![]() If you want to remove the element and not submit the form, handle the submit event on the form instead, and return false from your handler: You're handling the click event on a submit button. What's happening is that the form is getting submitted, and so the page is being refreshed (with its original content). ![]()
0 Comments
Leave a Reply. |