/SmartSmileys

Smart Smileys is a Jquery Plugin to implement Smileys in a web Page By using code. The code is very simple and easy to understand

Primary LanguageJavaScript

SmartSmileys

Usage

            $(".class").dosmile();

How I used

        jQuery(document).ready(function(){
                $(".button").click(function(){
                    if($(".inputtext").val().length > 0 ) {
                        $("#chatbox").append($(".inputtext").val() + "<br/>");
                        $(".inputtext").val("");
                        $(".smiley").dosmile();
	
                    }
                });

                $(".inputtext").keypress(function(e) {
                    if(e.which === 13) {
                        if($(".inputtext").val().length > 0 ) {
                            $("#chatbox").append($(".inputtext").val() + "<br/>");
                            $(".inputtext").val("");
                            $(".smiley").dosmile();
                        }
                    }
                });

                $(".smiley").blur(function() {
                        $(".smiley").dosmile();
                });
        });