JQuery :: Making Sense Of Prototype Debates?
Apr 22, 2010
So for a research topic at school, I chose to do web development software trends, to see if there are any general commonalities. One sub-topic I chose to do was Javascript, and where it seems to be heading. After reading a bit about it (I'm very new to web development), I learned that jQuery and Prototype seemed to be the most popular options when using javascript, but I didn't understand why they are compared against each other so often. If jQuery is a library, and Prototype is a framework, why would people only choose one or the other? I know some people use both, and I also realize that there's minor conflicting syntax issues, but I was hoping someone with more experience could help me understand why a framework and a library can be compared head to head.
View 6 Replies
ADVERTISEMENT
Nov 27, 2011
The code :
$('.TextHover').editable('/Task/SaveTags.php', {
type : 'text',
cancel : 'Cancel',
submit : 'Ok',
[Code]...
I put on alert to help me debug the returned value.What I need to show on alert is the 3, text of td with id='tId'.$(this).closest('tr').closest('td#tId').text() wouldn't work.$(this).closest('tr').next('td').html() returns null.
View 3 Replies
View Related
Jun 15, 2009
I want to use prototype js to have it submitted without refreshing the page.
View 4 Replies
View Related
Nov 25, 2011
According to ECMAScript, the root of the prototype chain is Object.Prototype. Each object has an internal property [[Prototype]] that could be another object or NULL.... However, it also says that every function has the Function prototype object: Function.Prototype, it confused me, because a function is an object, for a function object, what is its function prototype and object prototype..For example:
var x = function (n) {return n+1;};
what is the relationships of x, Object.Prototype and Function.Prototype
View 5 Replies
View Related
Dec 14, 2009
I am trying to get to the bottom of javascript object, prototypes etc. I have a fairly good grasp of it, but I get confused the closer I get to the base object.prototype. FIrst of all, I was under the impression that all objects descend directly from Object. But some objects (like Array) seem to inherit properties and methods from the function.prototype. So does this mean that the chain is like this:
object -- function -- array Second, I noticed (on the mozilla javascript reference site that object.prototype inherits properties and methods from function.prototype and vice versa!? How can this be? I must be missing something important about understanding the chain?
View 24 Replies
View Related
May 16, 2007
I want ask you if, for a web portal/application, is better prototype or Jquery? I don't want to innesc some type of flame, but after the announce that drupal use JQuery and that the new Wordpress
2.2 use Jquery I ask myself if my choice of use prototype.js is the bettere choice.
View 5 Replies
View Related
May 7, 2009
QUESTION ONE: When is use of the jQuery prototype object appropriate, and when is it not?
BACKGROUND:I am still trying very hard to identify the error that is prohibiting me from incorporating a jQuery plug-in into my site in a manner similar to the way that the author of the plug-in has incorporated it into his.Although I have sought consultation with the author, he appears uninterested in working with me.My still fledgling knowledge of jQuery tells me that the author of the plug-in and my implementation of his plug-in are constructed differently.Whereas I use jQuery's prototype property to reference my method and then assign my method anonymously to my HTML document as follows: $().myJQMethod().The author of the plug-in does something very different.I have extracted from the author's plug-in and my implementation of it. Links to the source pages have been included.
CONSTRUCT A (The jQ_Impromptu Plug-In):
(function($) {
$.prompt = function(message, options) {
})(jQuery);[code]...
QUESTION TWO: Although I am able to implement the author's method, it is not performing as it should. When the alert box appears with focus the hosting HTML page is suppose to show through with dimmed opacity.My implementation does not achieve this effect. Firebug has alerted to me to the following breakpoint, but I am poorly unable to interpret it.
View 3 Replies
View Related
Nov 30, 2010
I read the documentation on the noconflicts() to mean that Prototype should be loaded first and then:
<script
This all worked great in all browsers except in IE8 which had no clue what jQuery() meant. IE8 says jQuery is undefined.
So I reversed the order of loading, jQuery first then Prototype, and now everybody is happy. Did I just read the documentation wrong or is there something else here I should be worried about?
View 2 Replies
View Related
Apr 10, 2010
I am using protype for valadation and Jquery am using for calendar, Here is my script ,
[Code]...
View 3 Replies
View Related
Nov 24, 2011
I've previously written an image carousel with lightbox and to be honest forgot about it for quite a long time. I've just been tasked with making a few modifications (I wrote this code about 6 months ago)
Now, the problem I have is that I now need to call the internal method from the ligthbox plugin.
I've tried setting a reference to this like this but it just won't play ball. I can see that the ajax feed gets called but unfortunately I can't then access it.
[Code]...
View 3 Replies
View Related
Jan 5, 2010
Is there a jQuery way of doing this Prototype bind?
var func = myFunction;
setTimeout
func.bind
this
, 1000
;
View 2 Replies
View Related
Dec 9, 2010
I have developed a widget. I am using the jquery core api. Im having a problem when the widget is used in a weebly site. I know weebly uses prototype and I am using the workaround:
var $j = jQuery.noConflict(); however there is still a clash of some sort. I think every prototype.js function is being called or something because the page is taking a long long time to load as there are many requests being made which look like this:
[Code]...
View 3 Replies
View Related
Apr 17, 2010
I am newer in Jquery. How to create the prototype object and custom object in Jquery.
View 2 Replies
View Related
Jun 10, 2011
Which one is easier? and which gives best design and interface?
View 1 Replies
View Related
Feb 23, 2011
I have been trying in vain for many days to resolve a conflict between javascript libraries. My homepage uses jquery horizontal css menubar + a combined mootool and prototype accordian type sliding information box in the middle of the webpage. I find that the highlighter of the css menubar does not work when prototype.js is also loaded on the same page. I have read somewhere that $ should be replaced however I have tried every possible option and none works. I have jquery loading first as it is on my template, with this:
<script type='text/javascript' src='../Web/Templates/jquery-1.3.2.js'></script>
<script type='text/javascript' src='js/example.js'></script>
And my mootool and prototype loades further below like this:
<script type="text/javascript" src="scripts/intro/prototype.lite.js"></script>
<script type="text/javascript" src="scripts/intro/moo.fx.js"></script>
<script type="text/javascript" src="scripts/intro/moo.fx.pack.js"></script>
<script type="text/javascript">
function init(){
var stretchers = document.getElementsByClassName('box');
var toggles = document.getElementsByClassName('tab');
var myAccordion = new fx.Accordion(
toggles, stretchers, {opacity: false, height: true, duration: 600}
);
//hash functions
var found = false;
toggles.each(function(h3, i){
var div = Element.find(h3, 'nextSibling');
if (window.location.href.indexOf(h3.title) > 0) {
myAccordion.showThisHideOpen(div);
found = true;
}
});
if (!found) myAccordion.showThisHideOpen(stretchers[0]);
}
</script>
View 1 Replies
View Related
Aug 30, 2010
I need to know how to add an event to a button. The specific issue is that I want to add an event which is a prototype function of a class. Consider the following as an example:
MyTestClass = function() {
this.firstName = "Pete";
this.lastName = "Johnson";
[code]....
View 2 Replies
View Related
Jan 8, 2010
I want to write a plugin, say 'myPlugin' which I can use like
Code:
$('#myID').myPlugin() ;
$('#myID').myPlugin.test() ;
The plugin I wrote looks like
Code:
(function($){
$.fn.myPlugin = function() {
// do something
} $.fn.myPlugin.test = function() {
var $this = $(this) ;
// do something ;
}})(jQuery) ;
This works and it doesn't work. It works because test() is called, but this is not the element with id '#myID' it is $.fn.myPlugin. To fix this I tried the following
Code:
(function($){
$.fn.myPlugin = function() {
// do something
} $.fn.myPlugin.prototype.test = function() {
var $this = $(this) ;
// do something ;
}})(jQuery) ;
but now the function 'test' is unknown.
View 6 Replies
View Related
Feb 27, 2011
I tried load method super as smartupdater orPeriodicalUpdater (Prototype). Now the problem is that I have to build a cycle (loop) and each time I have to change the time (that I take from database) so how method (function) can I use to load external code (example load()) modifying continuosly the timeout?
View 1 Replies
View Related
Jan 28, 2010
I don't know if this will work, but I'm trying to put a google map on my website and in IE, the div containing the map needs to have a width value in pixels in order for the API to center the map properly. want a div with 100% width, which is inside another expanding column. This works everywhere but IE. My question is, Is there a way, using jQuery, to get the div to discover its inherent width and then apply that in pixels, as an inline style, to that tag? It would also have to redefine its width when the window resizes.
View 2 Replies
View Related
May 8, 2010
I am trying to build a calendar that has clickable dates that reveal a pop up box with the event of the day when you click on them.I have got some basic functionality at the moment with the pop up working on one date,making it work on multiple dates.at the moment I have the pop up box positioned relative and and am using the toggle function to switch the display form none to block.I need to work out how to position the pop up box no matter which date you click on?here is the mark up for part of the table:
<tr>
<td>21</td>
<td>22</td>
[code]....
View 1 Replies
View Related
May 28, 2009
I'm looking for a plugin or good explained tutorial about making a dropline menu using jQuery.
What I need: two levels - main and submenu support for "current" state submenu visible when main element has a class of current
View 1 Replies
View Related
Aug 10, 2009
I m very new to use ajax. but i know the basics of ajaxcall and basics of javascript. Please help me how to start with makingajax call ..please give me also sample code
View 1 Replies
View Related
May 27, 2009
[code]I've got a long navigation, and pages slide in and out of view.Troubles are, if the user impaitently clicks a load of links while the page loading and sliding in is happening, it melts my (probably poorly written) code.So, I'm trying to stop the user from clicking on any other buttons,while the page loader is doing it's thing.
View 8 Replies
View Related
Jan 10, 2010
im trying to make a sliding tab menu, The menu is already made with animations and such, however now im trying to integrate the menu with the Divs i have for each menu item. I really just need something to start me off.. Basically on click i want the current selected item and div to fadeOut to the left and the newly selected to fadein from the right..
JQUERY
$
'span'
.click
[Code].....
View 3 Replies
View Related
Jan 21, 2011
Forgive the extremely basic question but I can't find something that addresses it. I have a navigation bar that is a series of list elements. I want to pop open a subnavigation bar when you mouse over one of the elements.
The slightly different thing about this one is that in the html the subnav div sits outside the main navigation div, ie they are not related. What I want to do is keep the subnavigation bar if you move your mouse from the main nav down to the subnav, and hide it again once the mouse leaves either the subnav or the main nav.
My problem is that any of the ways I can think of doing it, once the mouse leave on the main nav is called i can't stop it from going.[URL]...
View 9 Replies
View Related
Sep 19, 2010
I'm getting started at javascript and jQuery, I want to make a calculator for my services, for example, checking a box will add value to a total.For example theres a textbox that asks how much gallons of paint will be used, the value of each gallon is 30 dollars, so the user can write for example 2 on the input and a div will output 60. I think that would be made with .change(), but in the demo of the documentations appears a selection list, and I can't figure out how to make an input work like that.
View 1 Replies
View Related