มาใส่ jquery UI ลงใน drupal 7 กันเถอะ

jQuery UI ย่อมาจาก jQuery User Interface ซึ่งมันก็คือปลั๊กอินของ jquery ที่จะทำให้เราใช้งานพวก tabs หรือ accordion ได้ง่ายขึ้นโดยไม่ต้องเขียนโค็ดขึ้นมาใหม่ทั้งหมด ยิ่งถ้าใครใช้ drupal 7 อยู่แล้วยิ่งง่ายแล้วครับ เพราะ drupal 7 ได้มีการนำ jquery ui ติดมาด้วยกับ core drupal เลยถ้าต้องการใช้งาน tabs หรือ accordion ก็เพียงแค่เรียกมันขึ้นมาใช้งานครับ ง่ายมากๆ

jquery ui

วิธีการเรียกใช้งาน jquery ui ใน drupal 7

ACCORDION - Code

[php][/php] [php]

Section 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Section 2

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Section 3

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

[/php]

TABS - Code

[php][/php] [php]

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.

Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

[/php]

ลองนำไปปรับใช้งานกันดูนะครับ :)

Thank : http://jromero.me/blog/jquery-ui-drupal
25

Add new comment

Fri, 07/14/2017 - 07:50

Wow that was unusual. I just wrote an really long comment but
after I clicked submit my comment didn't appear.
Grrrr... well I'm not writing all that over again. Anyways, just wanted to say great blog!

Tue, 08/08/2017 - 21:03

If you are going for best contents like me, simply pay a
visit this website all the time for the reason that it offers quality
contents, thanks

Sat, 08/12/2017 - 06:38

The truth of the matter is as a lot as we are glued to our Tv sets watching soccer and shouting, some
these clubs not often know we exist while these days
there are various supporters assembly of diverse clubs, the
problem is how a lot of are genuine. After fully recovering from his
horrible fracture, Kaka was finally given a chance to play for Sao
Paulo, in January 2001 and he didn't disappoint, scoring no less than 12 goals in 27 appearances that season. The Bianconeri is still
the strongest Italian team, and the only one surviving in the
Champions League as well. Pavel with the Inter Milan Jerseys Friendly Geminiani, said:
"I am very happy with the size of the stadium in Genoa Garo do not know, the unpleasant experiences of regret at the moment, everything is the President face to sell players How rich.

Mon, 08/14/2017 - 16:49

great put up, very informative. I wonder why the other experts of this sector do not realize this.
You must proceed your writing. I'm confident, you have a huge readers' base already!