From: Eridius <bas...@gmail.com>
Date: Sun, 12 Aug 2007 07:45:20 -0700 (PDT)
Local: Sun, Aug 12 2007 10:45 am
Subject: Re: [jQuery] Creating plugins
Well i did getting it working with plain javascript. I have tried to get into jQuery this weekend and it is just not working. I I one big difference between mootools and Jquery from using both is the I think jQuery and mootools a pretty similiar frameworks but i think Ganeshji Marwaha wrote: -- > Eridius, > Whatever u choose is upto u, but i just want u to be make a clear and > Anyways, the demo now will reflect creation of class outside $(function()) > But, the funny part in this piece of code is that, it is not jquery at > Have fun. > On 8/12/07, Eridius <bas...@gmail.com> wrote: >> That does no achive what i want. I can only declare and instance of the >> I guess maybe jQuery is not what i am looking for, i mean jQuery seems to >> Ganeshji Marwaha wrote: >> >>> why do i get error saying that test is not a function of t? >> > Because you are approaching it wrong. This is how u can achieve what u >> > $.ajax_request = function(options) { >> > You can see a demo of it here... >> > Although it is possible to do this, doesn't mean that it is the right >> > Also, as John Resig mentioned in a reply to ur post, creating a class >> > Have fun... and welcome to the world of jquery, the world that created >> > -GTG >> > On 8/11/07, Eridius <bas...@gmail.com> wrote: >> >> ok here is my code: >> >> jQuery.ajax_request = function(options) >> >> test = function() >> >> why do i get error saying that test is not a function of t? >> >> Ganeshji Marwaha wrote: >> >> > When you create a plugin that will be executed on a selected set of >> >> > jQuery.fn.myPlugin = function() {} >> >> > When you create a plugin that is going to be executed statically, >> >> > jQuery.myPlugin = function() {} >> >> > Effectively, jQuery is an instance of a class and jQuery.fn is >> >> > Hope that helps >> >> > -GTG >> >> > On 8/11/07, Eridius <bas...@gmail.com> wrote: >> >> >> I don't know what happen with the last post but let me try to >> >> >> The only way i see documenetation for building plugins is so you >> >> >> $('#whatever').plugin(); >> >> >> Now this is all good but I want to know something different. I >> >> >> var whatever = new someplugin(); >> >> >> This way of creating a new class is one thing i love about >> >> >> var ajax_request = new Class( >> >> >> var ajax_request_handle = new ajax_request(); >> >> >> Is this possible n jQuery? >> http://www.nabble.com/Creating-plugins-tf4254598s15494.html#a12108667 >> >> -- >> -- View this message in context: http://www.nabble.com/Creating-plugins-tf4255335s15494.html#a12114767 Sent from the JQuery mailing list archive at Nabble.com. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||