I have a small problem with event-functions not seeing the
this.options-variable.
Small example:
http://event.pastebin.com/m249d7f9d
I tried to work around it by supplying this in the data-parameter
for every .bind(),
but it is an ugly solution I think.
Also, is it bad to just call .empty()
Hello everybody
It is my first post here I guess. I must say - I love jQuery, thank
you !
A few days ago I faced a problem that I cannot overcome and hope you
can help me. In the group archive I saw similar problem, but solved in
the way I have it solved, which is not sufficient for me right now.
no jQuery .click() method for your result.
So use jQuery selectors like this :
$('#clickme').click();
--
View this message in
context:http://old.nabble.com/simple-question-regarding-trigger-jquery-events...
Sent from the jQuery General Discussion mailing list archive at
Nabble.com
();
--
View this message in
context:
http://old.nabble.com/simple-question-regarding-trigger-jquery-events...
Sent from the jQuery General Discussion mailing list archive at
Nabble.com.
--
View this message in context:
http://old.nabble.com/simple-question-regarding-trigger-jquery-events
Hi, I needed events calendar for my site. This calendar should :
1. highlight date that had events
2. If i click it, it'll go to events page or show alert about what
events that occur that date.
I try to use datepicker to do this. For #2 i can do it using onSelect
(dateText). But i can't figure
to run, so I can never see any console.log() output from inside a
mouse-click handler...
Any advice anyone?
--
View this message in
context:http://www.nabble.com/JQuery-events-and-a-possible-scoping-error-on-m...
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
inside a
mouse-click handler...
Any advice anyone?
--
View this message in
context:http://www.nabble.com/JQuery-events-and-a-possible-scoping-error-on-m...
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
ver see any console.log() output from inside a
mouse-click handler...
Any advice anyone?
--
View this message in context:http://www.nabble.com/JQuery-events-and-a-possible-scoping-error-on-m...
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
, but I am
never getting any of the callbacks to run, so I can never see any
console.log() output from inside a mouse-click handler...Any advice anyone?--
View this message in
context:http://www.nabble.com/JQuery-events-and-a-possible-scoping-error-on-m...
Sent from the jQuery General Discussion
is as I expect during the above looping, but I am
never getting any of the callbacks to run, so I can never see any
console.log() output from inside a mouse-click handler...Any advice anyone?--
View this message in
context:http://www.nabble.com/JQuery-events-and-a-possible-scoping-error-on-m
m" is not what I'm expecting - possibly due to the scope of actOnElem? I'm not entirely sure...I've added console.log() calls to the above logic, and everything is as I expect during the above looping, but I am never getting any of the callbacks to run, so I can never see any
console.log() output from
Agreed :)
First off, I'd like to sincerely thank both olsch01 and charlie for
their help, as well as the superb website of list member Karl
Swedberg. Between their help and that web site, I have a completely
generalized solution I am very happy with!
It was Karl's www.learningjquery.com site, and
Glad you found your own solution so fast, Blake!
If you want to slide the info divs up and down using the same link,
you could also use the nice toogle function. Then you just have to do
something like this:
$(.peekaboo).each( function() {
$(this).click( function() {
var
the above looping, but I am never getting any of the callbacks
to run, so I can never see any console.log() output from inside a
mouse-click handler...
Any advice anyone?
--
View this message in context:
http://www.nabble.com/JQuery-events-and-a-possible-scoping-error-on-my-part
Hi all,
I normally do this with livequery:
$('.mylink').livequery(function(event) {
$(this).mycustomFunction();
});
So any new .mylink's on a page would also be bound with my custom
function.
How can I do this with the new LIVE event?
Hi All,
I am trying to add two event on one button
Events are 'click' 'blur'
But when ever I am trying to click on button which is having two event, then
first its executing 'blur' event, logically it should execute 'click' event
first.
Is it bug of javascript? Or am I doing something wrong :(
Hello, folks -- I'm very new at this, so please pardon my ignorant
question.
I have a text field and a select input. My code sets the text field
when the select changes.
What I'd like to do is have it NOT do this when the page is first
loaded, but only when the user touches one of the select
Hi All,
I've been using an iframe to create a 'selector' (a kind of a select
with a filter in it) and have been trying to fire an event (change) to
update the input status. This is the code when I select an option:
$('table tbody tr')
.click(function() {
var area
Hello,
I have the following:
$('#Professor').click(function(){
if ( this.checked ) {
$('#ProfessorField').show();
$('#SubscriptionsField').show();
} else {
$('#ProfessorField').hide();
$('#SubscriptionsField').hide();
}
})
Basically on
Try putting the bulk of your code in a separate function:
$(function() {
// do check on document ready
myFunction();
// make click work
$('#Professor').click(myFunction);
});
function myFunction() {
if ( $('#Professor').get(0).checked ) {
$('#ProfessorField').show();
Hi everybody,
I have the next silly problem:
$(myobject).bind('myevent', function() {
var anotherobject = new MyCustomObject();
$(anotherobject).bind('anotherevent', function() {
// code here
});
});
and then I write these two lines:
$(myobject).trigger('myevent');
Hi everyone!
I have a problem with binding events in jQuery. I didn't figured out
why, but when i'm tryin to bind a callback to links ( $(elm).click
(function() ), it doesn't works. but works fine with
elm.onclick = function() ...
the same thing in 1.2.6 and 1.3.1, IE and FF...
The question is:
Cleaning that up is not Jquery's job as far as I know but the JScript
garbage collector (which basically depends on the browser). The
garbage collector is pretty smart so it shouldn't be any leak...
serious leaks used to happen only on Circular References especially in
IE6 for example, but even
Hi,
I've got a question I was hoping someone could shed some light on for
me.
Suppose you have a div like so:
div id=container
input type=checkbox name=check value=1 One br/
input type=checkbox name=check value=2 Two br/
input type=checkbox name=check value=3 Three br/
/div
1)
I have a page where I need to trigger a function call when a user
changes the value of either end of the slider. I create the slider
when the DOM is ready using this:
$('#productmatrix-slider').slider({ min: sliderMin, max:sliderMax,
range: true, change: function(e,ui) { submitProductMatrix() }
Hello.
Can I do these steps using jQuery:
1) store old events of elements;
2) bind new events to the elements;
3) remove the new events;
4) restore the old events.
I have a drop down menu. I want to hide it when a user clickes
anywhere else.
Hi folks,
I have a page with a photo on it. I load the comments for this photo
via an ajax request:
var item_id_val = $(#item_id).val();
$.post(/show_comments, item_id: item_id_val }, function(data)
{
/* Update the comment_section div. */
$(#comment_section).html(data);
});
That
Possibly one of the most frequently asked questions:
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F
On Jul 8, 1:54 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi folks,
I have a page with a photo on it. I load the comments for
Are you using the Livequery plugin to bind your events? If not, then the
event binding, that presumably is setup in some other source file (other
than the HTML that's coming in via your load), won't even run against the
new code from the AJAX load. Using Livequery will let you keep the code
Hey guys,
I'm rather new at this but I've got a problem with setting priorities
to events that has kept me up all night.
The issue is quite simple:
- An image is clicked
- A floating box appears with the image preview and a Change Image
button
- If you click the Change Image button, it'll toggle
I want a unified way of raising/handling events in my JavaScript
codebase. As I'm already using jQuery, it'd be nice to reuse its
smarts. :)
On Apr 2, 5:35 pm, chrismarx [EMAIL PROTECTED] wrote:
interesting, for what purpose would you use this functionality?
why not just
var monkey =
This works:
var monkey = { name: 'Dave' }
$(monkey).bind('climb', function(monkey) { alert(this.name + ' is
climbing!'); });
$(monkey).trigger('climb');
I really just wanted to check that this was expected functionality -
and isn't going to disappear anytime soon - as I'd like to lean on it
I'd not rely on anything that is not in the docs. I suffered from
these changes in the past.
If you want a safe way to use this, you should check:
jQuery.Collection: http://flesler.blogspot.com/2008/01/jquerycollection.html
You just need to import the methods bind, unbind and trigger, and that
The following example that's given in the Event/error page at (http://
docs.jquery.com/Events/error) does not work. Based on my understand of
the example, this is supposed to bind the function to the browsers
onerror function and pass the msg, url, and line. Instead of doing
this, it just passes
Hi everyone,
I have an event that is not being listened and I can't figure out why.
The thing is that everything is working fine while all my html code is
static, but as soon as I modified it with some data pulled from the db, the
click() events doesn't trigger the actions any more.
What I'm
http://localhost/allonenet/index.html
If you mouse over the globe in the top left, you'll see it fades in,
then fades out, then fades back in. When you mouse off, you'll see it
fade out, then back in, then back out. The relevant code is:
$('body').append('div id=fill/div');
I've got a getJSON request from a different domain which will be
going down for a few hours while that domain upgrades its servers.
What happens to a getJSON request when the url you request will not
return any HTTP traffic? Does it just hang? Does it fail gracefully
or return a boolean value
Hi,
I want to bind events when certain elements are added to the HTML DOM.
The elements are assembled as strings and then set with jquery methods
like .html(htmlString), .append(htmlString). It looks like this is the
job of the jquery load event.
I want to unbind events when the elements are
I want to access the event properties layerX and layerY. I found that
these only work the way I would have expected in Firefox. In IE I need
to use the offsetXY properties to get what I want, but then in Opera
and Safari these properties are giving me the XYoffset values of the
elements within
Having upgraded from jquery version 1.1.3.1 to 1.2.1 I've noticed a
problem within internet explorer whilst using interface elements.
This may be interface elements specific, though I have my doubts, or
it may be something with the latest release of jquery.. either way I'm
not really qualified to
Hi
I posted a question earlier, this is the updated version based on
further understanding.
in order fir Jquery to recognise the events of the second form I had
to nest the code this this:
$('form').submit(function(event){
//$('#content').empty();
Hello,
i have some problems:)
i want to load an loginequester into my page:
function loadLoginbox(Target) {
$(Target).load(index.php?m=loginc=loadLoginbox);
}
the loginbox is loaded but no events run.(
$('#openLogoutbox').click(function() {
Maybe I'm not understanding binding correctly, but when I select a
different item from the list below, the change() event fires twice.
Why is it doing this?
select id=testselect
option value=1Testing1/option
option value=2Testing2/option
option value=3Testing3/option
I want to use jQuery as one of potentially many DHTML engines for my
site. Therefor I want to move the events from my XHTML code to a
JavaScript includes. I've not yet had anyone help me get any of the
functions working though someone suggested using addEventListener. I'm
not really good with
Just make this:
$(#header1).click(function(){
$(#div01).BlindToggleVertically(1000,null, 'bounceout');
return false;
}):
:D...Very simple.
On 4/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I want to use jQuery as one of potentially many DHTML engines for my
site. Therefor I want to
Awesome-sauce! Your code at first didn't do anything. Then I added an
onload event...THIS works...
function init() {
$(#header1).click(function(){
$(#div01).BlindToggleVertically(1000,null, 'bounceout');
return false;})
}
window.onload = init;
Now I can add any other DHTML library and give my
47 matches
Mail list logo