"JavaScript enclosures"?
i think it has to do with encapsulating your code inside a function so
that all vars are inside the function's scope, so not cluttering the
global namespace.
This, to avoid memory leak.
something the likes:
(function(){
/// your code goes here
})(jquery);
I have abso
hey ricardo, thanks for the input. I found the error: i was actually
hiding the load container somewhere else in the code. *sight*...
On Tue, Dec 30, 2008 at 5:52 AM, Ricardo Tomasi wrote:
>
> I don't see any click event handlers, and from what it looks you can't
> tell visually if the load() wa
haha
they are contemplating hiring me!
I already sent it back and thought I'd post it here to see the response.
Appreciate it.
I think my answers were correct..
The first argument method is 'void', correct?
On Mon, Dec 29, 2008 at 9:07 PM, Michael Geary wrote:
> Huh?
>
> Are you writing the
Concur with Michael, that's why I'd answered the obvious ones.
yea, I got those ones.
thanks
On Mon, Dec 29, 2008 at 8:55 PM, Kean wrote:
>
> Here's a few answers.
>
>
> 2. XmlHTTPrequest object, returns XHR request as obj or string, YUI
> callback augments object, jQuery callback augments string
>
> 4. http://www.json.org/
>
> 5. block / inline
>
> 6.
> as
Huh?
Are you writing these questions, or you've been given them to answer and
you're looking for help answering them, or what?
If you're looking for the answers, is the potential employer contemplating
hiring you, or hiring the rest of us in this group? :-)
The list seems to be first and fore
Richardo,
LOL
Here's a few answers.
2. XmlHTTPrequest object, returns XHR request as obj or string, YUI
callback augments object, jQuery callback augments string
4. http://www.json.org/
5. block / inline
6.
assume allLayer is array of layer1 and layer2
YAHOO.util.Dom.setStyle(allLayer, "opacity", 66%);
YA
could be the space between '<' and 'a' - "" not "< a
href...>"
On Dec 30, 2:36 am, Kean wrote:
> I'd be interested to see your html too.
>
> Ok another try
>
> jQuery(function($){
> $("a.clicker").click(function() {
> alert(this.id);
> return false;
> });
>
> });
>
> On Dec 29, 7
I don't see any click event handlers, and from what it looks you can't
tell visually if the load() was successful because on the 2nd time the
background is already red.
On Dec 29, 9:07 pm, "Alexandre Plennevaux"
wrote:
> Strange...
>
> i'm loading html inside a div, and have this callback:
>
>
I'd be interested to see your html too.
Ok another try
jQuery(function($){
$("a.clicker").click(function() {
alert(this.id);
return false;
});
});
On Dec 29, 7:54 pm, buttman wrote:
> Still not working... I still get a blank popup window :( This is all
> supposed to be inside
You have to get the execution order right.
this is just a declaration, to let javascript know that this function
exists
MyClass.prototype.init = function (){
this.imagesHolder = jQuery("#imgs");
}
jQuery("#imgs") is not executed until you do something like this.
var
Yep, I intend to use myClass outside of document ready.
I thought that in order to use jQuery as follows
this.imagesHolder = jQuery("#imgs");
inside of MyClass I would have to enclose it inside
$(document).ready(function(){...
so that DOM is ready before invoking MyClass.
Is my assumption wrong?
Still not working... I still get a blank popup window :( This is all
supposed to be inside the "document.ready()" thing, right?
On Dec 29, 10:22 pm, Kean wrote:
> This is even better.
>
> jQuery(function($){
> $("a.clicker").click(function() {
> alert(this.id);
> });
>
> });
>
> On De
*(required) Q: *Describe the difference in result of the JavaScript DOM
methods getElementById and getElementsByClassName.
*2. (required) *Given this JavaScript statement:
*
** objXHR.open('GET',**' HYPERLINK "http://"; http://myURL.com',true**
);**
*
a.* Q:* What, probably, is the t
Hi all,
I have define a xml template like this
I can use following code to query the template
var memberSection = $(reportxml).find("[id=001]");
but following does not work
// want to add a "name" attribute to the member
$(reportxml).find("[id=001]").attr("name","peter');
Why? Than
I have just started using superfish on our site http://christianmotorsports.comI am not a programmer so getting beyond the basic selection options and pasting in custom css code etc. is not clear to me. I have gone through and edited some existing css code for the general template on the site.Thi
There's a plugin call jFade that will fade/highlight colors
http://www.gimiti.com/kltan/wordpress/?p=43
On Dec 29, 1:22 pm, Tipem wrote:
> Hi,
>
> I've seen a Jquery plugin before that triggers an event which pulsates
> or highlights a div of your choice. I've also seen the plugin
> "scroll" t
Yea, use clone(true) to copy the events.
If you are using jQuery 1.3 beta you can try to use
$(selector).live('event', function(){
});
live is like bind just that new nodes added to DOM will inherit the
event.
Well, this is a trick call event delegation.
On Dec 29, 2:40 pm, Ricardo Tomasi
This is even better.
jQuery(function($){
$("a.clicker").click(function() {
alert(this.id);
});
});
On Dec 29, 7:21 pm, Kean wrote:
> Try this then
>
> jQuery(function($){
> $("a[class=clicker]").click(function() {
> alert(this.id);
> });
>
> });
>
> On Dec 29, 4:27 pm, buttma
Try this then
jQuery(function($){
$("a[class=clicker]").click(function() {
alert(this.id);
});
});
On Dec 29, 4:27 pm, buttman wrote:
> That doesn't work. When I do
>
> alert(this.id)
>
> in that function, nothing comes up. Additionally, "alert(this)" just
> displays the url.
>
> On De
Looks fine to me.
Is myClass used in other places (ie outside of your document ready)?
If so, you have to define it outside of document ready or do this
window.myClass = function() {
this.imagesHolder = null;
}
On Dec 29, 7:09 pm, bob wrote:
> Is that a correct way to create class utilizing
Is that a correct way to create class utilizing jQuery?
var myClass = null;
$(document).ready(function(){
function MyClass(){
this.imagesHolder = null;
}
MyClass.prototype.init = function (){
this.imagesHolder = jQuery("#imgs");
}
I am using the validate plugin with a form that has one select element
and no other elements. I am using the required and remote rules to
validate this element. When I click submit the first time, it
performs the remote validation, but doesn't submit the form. A second
click on the submit button
Never use a for..in loop to iterate over an array.
Without seeing the code in the context of a running test page, I can't tell
you why IE is seeing a bogus element in the array, but I can speculate that
some other code elsewhere in the page is adding a method to Array.prototype
in IE only. That m
bump =)
Hi folks,
The following snippet processes a JSON string sent back to the
browser (it is part of a poll)
function loadResults(data) {
var OPT_VOTES = 2;
var total_votes = 0;
for (id in data) {
total_votes = total_votes+parseInt(data[id][OPT_VOTES]);
alert("total_votes
> I am using the ajaxForm() to submit a form and the success function
> that is defined in the options array is firing 3 times. Any ideas?
>
> Code:
>
> var options = {
> target: '.updateStatus',
> beforeSubmit: updStatus,
> success: showResponse,
>
> I am working on an ajax app that uses jquery's form plugin and it works just
> fine until I add a file upload input into my form:
>
>
>
> If I take these input fields out, my form works fine and submits and saves
> no problem. But once I added these parts to my form html, the jquery form
> plu
> i've had this question lying for so long in the bottom of my mind, i
> thought i should finally clear it up:
>
> I'm using a lot the animate() function, using a callback, and no
> easing parameter. Such as:
>
> $('div').animate({width: 400},'fast', function(){
> $(this).addClass('visibl
???
I just looked at it in both ie and ff, all I see is 2 div
http://www.haitiwebs.com/ihaiti/vbcover/vbmagazine/mainimages/cropped_1
0.jpg" />
-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of D A
Sent
>> > Anyone using jquery.corners.js?
>> > I'm using it to create some rounded tabbed navigation. It works
>> > wonderfully in Firefox.
>
> Does this page work for you in IE?
>
> http://malsup.com/jquery/corner/
It does, but notice that there's a difference between IE and Firefox.
Specifically, th
That doesn't work. When I do
alert(this.id)
in that function, nothing comes up. Additionally, "alert(this)" just
displays the url.
On Dec 29, 7:16 pm, Mike Alsup wrote:
> > I have a bunch of anchors that look like this:
> >
> > < a href="" class="clicker" id="click_1">click here
>
> What do you mean by curvycorners adding markups?
> It's lightweight and besides the javascript (7k) you only need to add two
> divs
> http://www.haitiwebs.com/ihaiti/magazine.php?
If you view the Generated Source, there's quite a few extra Divs added
to create the corners.
For instance, on you
> > Anyone using jquery.corners.js?
> > I'm using it to create some rounded tabbed navigation. It works
> > wonderfully in Firefox.
Does this page work for you in IE?
http://malsup.com/jquery/corner/
myjsonfile.json is just a static file on your server? Then of course it will
return the whole thing. If it's a static file, your server doesn't know
anything about that count=10 parameter.
If you want to support parameters like that, you need to write some code on
your server in PHP, Python, Ruby
What do you mean by curvycorners adding markups?
It's lightweight and besides the javascript (7k) you only need to add two
divs
http://www.haitiwebs.com/ihaiti/magazine.php?
-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of D A
Sent: M
> I have a bunch of anchors that look like this:
>
> < a href="" class="clicker" id="click_1">click here
> < a href="" class="clicker" id="click_2">click here
> < a href="" class="clicker" id="click_3">click here
> #
>
> The my jquery code looks like this:
>
>
I have a bunch of anchors that look like this:
< a href="" class="clicker" id="click_1">click here
< a href="" class="clicker" id="click_2">click here
< a href="" class="clicker" id="click_3">click here
#
The my jquery code looks like this:
#
$("a[class=click
Hi... at a certain point after trying a lot of things I went back to
the nettuts tutorial.
simply changed the 'href' to 'class' changed #content to my video
container div #video
and then sighed. hehehe
The idea is to click on the already being used for other things
menu items, and have a jpg
> Anyone using jquery.corners.js?
> I'm using it to create some rounded tabbed navigation. It works
> wonderfully in Firefox.
Well...I just notices a previous discussion about jquery.curvycorners.js?
I hate to look gift horses in the mouth, as both of these are great
plugins, but i'm finding tha
Hi gurus!
I'm using Jorn's autocomplete plugin with multiple textareas - but
each one not chained to the other.
I've read Jorn's autocomplete plugin page (
http://bassistance.de/jquery-plugins/jquery-plugin-validation/ ), this
forum, and searched web, but can't find a way to chain multiple
texta
Strange...
i'm loading html inside a div, and have this callback:
$('#datascape').show().load('index.php?splash=labau',{}, function(html, result)
{
$('#datascape').css({background: 'red'});
});
yet, the callback per
thanks it works indeed. one thing though: apparently, the load() call
does load the entire html spitted by the server side script or html
page, the selector is actually "just" trimming the loaded content. So
it's not a reduction of the amount of data loaded, just a welcome help
to reduce further d
That`s why you have a callback for ajax functions. AJAX stands for
*asynchronous* Javascript and XML. That means the ajax call doesn't
wait for the answer to return. It fires the call, returns the XHR
object and the script goes on. When something is returned, the
callback function is fired, and in
Anyone using jquery.corners.js?
I'm using it to create some rounded tabbed navigation. It works
wonderfully in Firefox.
However, I can't grasp how to accommodate the workarounds it uses for
IE. It adds markup above the object to create the rounded corners, but
doesn't seem to adjust the padding
The 'pulsate' effect exists in jQuery UI (ui.jquery.com), check the
effects section.
For the scrolling, there are the localScroll and scrollTo plugins by
Ariel Flesler (http://flesler.blogspot.com/2007/10/
jquerylocalscroll-10.html)
- ricardo
On Dec 29, 7:22 pm, Tipem wrote:
> Hi,
>
> I've see
Didn't look at the source, but have you tried $(element).clone(true) ?
That sets 'deep copying' and should copy all the event handlers with
it.
On Dec 29, 11:33 am, "nikla...@googlemail.com"
wrote:
> Hello,
>
> I don't know wether it is the right place for this question but I am
> going to ask i
> thank you Mike !
>
> Now, i don't actually want to display the loaded content, just need to
> traverse it, and generate a submenu (one element per element
> found, using the h3 element attributes). Can i actually load it inside
> a variable?
Sure. I think this will work:
$('').load("myfile.
This is a better plugin and works in all browsers
http://blue-anvil.com/jquerycurvycorners/test.html
-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mike Alsup
Sent: Monday, December 29, 2008 4:39 PM
To: jQuery (English)
Subject: [jQue
thank you Mike !
Now, i don't actually want to display the loaded content, just need to
traverse it, and generate a submenu (one element per element
found, using the h3 element attributes). Can i actually load it inside
a variable?
On Mon, Dec 29, 2008 at 10:47 PM, Mike Alsup wrote:
>
>> say
> say i have a html file containing a #viewPort div, with a series of
> divs each containing an h4 tag.
>
> If the file was not external, i would simply select what i need like this:
>
> $('#dsViewport h3');
>
> Now, it is an external file, so my question is: is it possible to
> load this file vi
Changed href to class and added: var toLoad =
which was in the nettuts tutorial. (link above)
1)
$('#nav li a').click(function(){
var toLoad = $(this).attr('class')+' #video';
2)
I have added a unique class to each
3)
I have now got the destination div as:
I now need to find a way to
> Unfortunately not at the moment. To make one a have to move everything
> on another server..
> i 'll wait fotr the website to be published, then i will post again.
> Thanks a lot, anyway
> VItto
Is the #load element getting replaced when #colCont loads? If you
inspect it with Firebug is it sti
> this is driving me crazy!!
> anyway, i moved everything here
>
> http://www.pipelabitta.it/demo/
>
> and this should be it!
Same problem. The css, js, and image files all return 403 Forbidden.
You need to modify the rights on those other folders.
add to the script:
return false;
to prevent the default behaviour
$(document).ready(function(){
$('a.ajaxLink').click(function(){
var url = $(this).attr('href');
$('#ihateiframes').empty().load(url);
});
return false;
});
On Mon, Dec 29, 2008 at 3:32 PM, BlueStunt wrote:
>
> I'm trying to
Hello Friends,
say i have a html file containing a #viewPort div, with a series of
divs each containing an h4 tag.
If the file was not external, i would simply select what i need like this:
$('#dsViewport h3');
Now, it is an external file, so my question is: is it possible to
load this file v
>
> script>
>