MyBB Community Forums

Full Version: Alpine.js for MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It adds the required scripts for the Alpine.js library to your MyBB theme and enables you to use the Alpine.js magics that are not allowed by the MyBB 1.8 theme engine.

For all the details:

👉 https://community.mybb.com/mods.php?acti...w&pid=1538

Happy Coding!
What can be done with this framework that cannot be done with jQuery? ( which mybb supports by default )
Unlike jQuery, it allows you to create JS operations within HTML.

An example:

<div x-data="{ open: false }">
    <button @click="open = true">Expand</button>
 
    <span x-show="open">
      Content...
    </span>
</div>

For all: https://alpinejs.dev/
you can do this with Jquery.

<script type="text/javascript">
$(document).ready(function() {
$("#elmid").on("click",function() {
......
});
});
</script>
<div id="elmid">
   ......
</div>




anyway good luck .
What's happening? Are we competing with two different libraries? Anyone can use what they want. jQuery is old and cumbersome to me now. I love the innovation and the convenience it offers and wanted to share it for the MyBB community.
(2023-02-12, 07:13 PM)tedem Wrote: [ -> ]What's happening? Are we competing with two different libraries? Anyone can use what they want. jQuery is old and cumbersome to me now. I love the innovation and the convenience it offers and wanted to share it for the MyBB community.

Yes, that's right, anyone can use anything they want . I just asked if it might have an advantage over jQuery.
I did not mean to offend you.
Okey, sorry.