Smartyならとても簡単にポップアップが出せる

世に色々なJavascriptツールチップライブラリがありますが、Smartyを使っている方ならとても簡単にポップアップが出せちゃいます。
とはいいつつも、Javascriptライブラリを使用するんですケド。

overLIB

上記のoverLIBを使用します。

ポップアップを使いたいSmartyテンプレートで
[smarty]
{popup_init src=”/scripts/overlib.js”}
[/smarty]
overlib.jsを呼び出して、

使いたいHTMLタグに付ける属性のような感じで{popup text=”"}を記入します。

[smarty]
this
[/smarty]

これなら気軽にポップアップを使用できますね。

とっても簡単なのでさくっと出来たサンプルを置いておきます。

[smarty]
this

sticky=true
caption="PHP-SeeD"
text="


snapx=10
snapy=10}>PHP-SeeD
[/smarty]

Smartyマニュアルにデザインの変え方など詳しい情報が載っていますのでより詳しく知りたい方はそちらをどうぞ。

関連する記事:

Powered by

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">