Hey,
I've got a toolbar on the bottom of my website, and I've got it to
where a user clicks on a div tag, and it reveals another div tag,
which contains the content described in the previous div. So if a
person clicks on the div with share in it, a hidden div is revealed
containing links to vario
http://docs.jquery.com/Events/live
On Thu, Jan 7, 2010 at 2:01 PM, CreativeMind wrote:
> hi,
> i'm appending a child div in a parent div. parent div has already
> child div's which have classes ws_c1 and plus.
>
> $('').addClass('ws_c1').addClass('plus').appendTo($
> ('#'+'parentdiv'+counter));
hi,
i'm appending a child div in a parent div. parent div has already
child div's which have classes ws_c1 and plus.
$('').addClass('ws_c1').addClass('plus').appendTo($
('#'+'parentdiv'+counter));
but when i try to do this
$(".ws_c1.plus").click(function() {alert('test');});
It works on other ch
The firefox doesn`t allow you to have a div inside a label. Checkout the
firebug and see how the firefox close de label tag before your div. So your
label will be empty.
On Thu, Dec 24, 2009 at 14:12, turnavies wrote:
> Hi,
>
> I'm working on a login system in CodeIgniter, where you select your
>
Hi,
I'm working on a login system in CodeIgniter, where you select your
avatar and enter your password to login.
I've accomplished this by attaching labels containing the avatar to
hidden radio buttons.
If you click on one of the avatars, the following jQuery script, that
I call on document.ready
y0, Not really, why do you need to/ or want to? you could do this
$('#Play').click(function() { $.cookies.set('WCA.Player', 'Play', { path:
'/' }) })
ha, j/k same thing, just one line. Could you just explain why you would
like to do it a different way? or where you just wondering?
shapper
Hello,
I am using the following to create a cookie and it is working fine:
$('#Play').click(function() {
$.cookies.set('WCA.Player', 'Play', { path: '/' });
});
Is there another way to do the same code but something like:
$('#Play:click').cookies.set('WCA.Player', 'Play', { path: '/' })
Hi!
I am newbie in JQuery. I want to catch click event outside and
specified class.
For example, I have a div with class "classname", and I want to attach
some actions when I click outside, in the rest of the page.
I tried with this (to get the classname where I click):
$('*').click(function(){
Look the live event: http://docs.jquery.com/Events/live#typefn
On Sat, Nov 7, 2009 at 10:49, ndes wrote:
> Hi! I was wondering if i made something wrong or this dont works in
> general. I have a drop down list that "onChange" loads some data an
> pops a list of img+text
>
> $('#selectDisplay').c
Hi! I was wondering if i made something wrong or this dont works in
general. I have a drop down list that "onChange" loads some data an
pops a list of img+text
$('#selectDisplay').change(function(){
.
//LOOP
$("#btnDisplay").append(''+respObj.jsonarray[i]['name']
+'');
.
});
I also h
Thanks for the response.
In "r" there's a div, #bloccomenu, that has inside spans that have .pul for
class. There's a space before "div.pul", so the entire string is
"#bloccomenu div.pul".
What i didn't said is that the first part runs also in IE, it's the second
that doesn't run properly.
Ja
Hi all.
I'm searching for a solution to this problem: i've put a div (passed to the
function with "r") with inside three div with class "pul". These has the
function:
function clic(r){
var blocco = r + " div.pul";
$(blocco).each(function (i)
{
$("#bloccofoto1").hide();
$("#bloccofoto2").hide();
$
Hello,
I am trying to build a menu close to a explorer or tree menu that uses
ajax. I have been able to get it working some of the time. My problem
is with the click function below. I originally used a toggle but since
it is not bound to a live event because this is has ajax generated
content it wo
I've got one for ya, JQuery and Ajax.
I want to have a button image, let's stay it's inactive state it's a
grey circle, when someone clicks it once, it'd change to a blue circle
(update associated DB field to "blue"), click it again and it becomes
a red circle (update the DB field to "red") and s
Hi. I have a table set up with a .click() function on each row so
that if it is clicked on, a class is added to the row thus changing
the background, etc. I was wondering if there was is a way to take
the id of the row that was clicked and populate a hidden field with
it. What would I need to i
Hi guys,
I'm facing this little problem, I've got a button toolbar, and users
can select rows in a table. When they have selected some row's, they
can click one of the buttons, and it invokes a callback.
Problem is, when I click the first time, there's nothing wrong. But
when I click the second
I have a button that do appear on my page through a post with jquery:
$.post(
'more_item.php',{
NumItem: NumeroItem,
Str : $("#form-itens").serialize()
},
I'm trying to execute a function "animate_next()" when a "div" element
is clicked, but it isn't working. Here is what it looks like..
$('#playground').click(function(){animate_next();});
If I put..
$('#playground').ready(function(){animate_next();});
..then it will work fine.
Here is the "div
I have this code that works:
var btnInput= document.getElementById('btnInput');
btnInput.addEventListener("click", showVal, true);
Why doesn't this work?
$('btnInput').click(showVal);
$('btnInput').bind('click', showVal);
Hello,
I've been working with jQuery about 20 hours now.
I like it.
I am looking for a demo of putting an a-element inside a div-element.
This seems to work:
$("#div99")[0].innerHTML = "I am in div99";
I'd like to handle its click-event.
I wrote this:
$("a#aInDiv99").click(function(event
This doesn't work in IE or Firefox:
$("td a.menu:contains('Main')").click();
This works in IE:
$("td a.menu:contains('Main')")[0].click();
$("td a.menu:contains('Main')").length is 1
What am I doing wrong?
I want to add a click function to an image to laod a new page
Tried this but it doesn't work
$("#i4").click(function(){
$(document).attr("href","index.php?
whichPage=slider&whichAct=0&subPage=mixnmingle");
});
The whichAct variable in the query string gets changed, which is why
it isn't
Hi
I am trying to create a nice little effect with an unordered list with
anchors to a definition list with matching ID's on each . When a
link in the is clicked, I want to delay the scroll for half a
second, and then scroll down to the right spot.
Here is what i have written so far:
JavaScrip
how to let the jqgrid refresh? without page reloading.
does jqgrid have such a method? how to call it?
Thanks in advance.
Off course, i forgot that hehe it is working great right now ;)
About that, i really don't know, sometimes i need to use it this way,
but you can try to validate using W3C tools
On 2 Jul, 17:55, John Newman wrote:
> You can't have 2 elements with the same id on the same page. Instead
> do wou
You can't have 2 elements with the same id on the same page. Instead
do
isn't that invalid html and rejected by some browsers? or is that
normal and just fine to do?
On Jul 2, 12:44 pm, Glazz wrote:
> Hi there,
>
> I have a hyperlink ( ) after i click on that hyperlink, the script
> sends
Hi there,
I have a hyperlink ( ) after i click on that hyperlink, the script
sends some data to a .php page;
That works fine, but for just one hyperlink , i want to be able to
have 2 or more hyperlinks in the same page using the same script.
Here goes the script:
$("#button").click(fun
Hi,
I have a simple list inside a table
Cancel
I have a ready event handler for click events on the anchor:
$j('.cancel_posting').click( function(e) {
if (!confirm("Are you sure you want to cancel this booking?")) {
e.preventDefault();
Hi all,
I'm confused as to why when I have:
$('a').click(function(){
alert(this);
return false;
});
the alert displays the URL defined in the href attribute, and not an
object.
Yet, if i call like say an image, it returns the object.
Thanks
ben
Hi all,
I've got a really pesky issue. For some reason, Firefox (both version
2 and 3) is firing multiple click events on checkbox elements. This
isn't happening in IE, Chrome, or Safari. I'm using event delegation,
in the form of a plugin that looks like this:
(function($) {
$.fn.delega
Sorry to post again to this group, but again jQuery has me stumped on
what seems like a simple task. I've a test doc up at
http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/jquery_xml3.html
and if you click on any of the static links (class="rlo_link") you'll
get an alert, meaning that the "
Need to know why this code below records the click in IE but does not
record the click in FF or Safari. a.adBanner is an internal link
within the same domain. Thank you in advance.
$('a.adBanner').live('click',function(){
var provider_id = $(this).attr('id');
var providerid =
Hi all,
I am running into this specific use case and could not figure out how
to do this. To simplify, I have a textarea and a DIV as code below.
The way it supposes to work is when I focus on the textarea by
clicking it, the DIV will show. Otherwise, it will be hidden. Then
when I click the DIV,
I want to change the color on every click of the div, by changing the
class and checking if hasClass. First removeClass, then addClass.
But this won't work?
Live demo:
http://www.edwinistrator.com/stuff/jquery/
http://www.w3.org/1999/xhtml"; lang="en">
Test
div { cursor: poin
I want to change the color on every click on the div, by changing the
class and checking if hasClass. First removeClass, then addClass. But
this won't work?
Live demo:
http://www.edwinistrator.com/stuff/jquery/
http://www.w3.org/1999/xhtml"; lang="en">
Test
div { cursor: pointe
Hy
My jQuery-Plugin shoud produce two buttons with a onclick-event.
Problem:
The onclick-event got fired, when I call the plugin, without clicking
on the button.
Why got the click-event fired without clicking the button?
Here my (shorted) plugin:
(function($) {
$.fn.rte = function(opt
On Apr 30, 2:24 pm, st wrote:
> I add multiple items with each click and then I want to remove them
> one by one by clicking.
>
> All is ok, but if I add 2-3 items and the click the first one,
> confirmation alert fires multiple times when i click Cancel.
> The number of times depends on how many
strange, but now it prints just "x", without included HTML.
Sorry about that too!
Try:
$(this).before(''+$close.html()+'');
Just note that $close is an actual jQuery object, so you can do
whatever jQuery stuff you want to it, such as attach events, append
text, etc.
On Apr 30, 9:33 am, st wrote:
> nope, when this function executes: $(this).before(''+$c
nope, when this function executes: $(this).before(''+$close+'');
it gives: [object Object]
:)
On Apr 30, 10:18 pm, James wrote:
> Sorry. Maybe this:
>
> function addtag() {
> var $close = $('x'); // wrap as
> jquery object
> $close.click(function() {
>
Sorry. Maybe this:
function addtag() {
var $close = $('x'); // wrap as
jquery object
$close.click(function() {
if (confirm('Are you sure you want to remove
this?')){
$(this).remove();
The second method does not allow to assign a click to variable. I get
an error.
But hack-ish method at least works, thanks! :)
On Apr 30, 9:55 pm, James wrote:
> That's because you are binding the event again to all existing
> elements with class "close".
>
> A real hack-ish workaround is doing
That's because you are binding the event again to all existing
elements with class "close".
A real hack-ish workaround is doing:
$(".close").unbind("click").bind("click", function() { ...
(this unbind all the click and rebinds them again)
A more elegant solution is to bind it only to the element
I add multiple items with each click and then I want to remove them
one by one by clicking.
All is ok, but if I add 2-3 items and the click the first one,
confirmation alert fires multiple times when i click Cancel.
The number of times depends on how many items goes after curent.
Please help to
I add multiple items with each click and then I want to remove them
one by one by clicking.
All is ok, but if I add 2-3 items and the click the first one,
confirmation alert fires multiple times when i click Cancel.
The number of times depends on how many items goes after curent.
Please help to
nd the same thing happened.
Any thoughts? This is driving me CRAZY I have only tested this in
Firefox (mult. versions) and IE7
Thanks in advance.
--
View this message in context:
http://www.nabble.com/jquery-click-not-working-correctly-tp23190969s27240p23190969.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
e CRAZY I have only tested this in
Firefox (mult. versions) and IE7
Thanks in advance.
--
View this message in context:
http://www.nabble.com/help-with-jquery-click-browser-problem-tp23190945s27240p23190945.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
binding the events with live() worked, I am all good.
Thanks goes to me for answering this I guess. ;-)
Okay, I have figured out the problem is due to the new elements not
being bound. I am going to try the various methods for correcting
this, starting with the live() event.
BTW, don't mind the double pound signs, those get escaped by
Coldfusion when the page is loaded.
Here is my situation. I have a DIV that contains some head and ordered
list tags in it. Upon initial load, I hide the contents of the lists
with slideUp() and use slideToggle(), and clicking on one of the links
in the lists populates the fields in a form.
This all works fine, until the form is su
Hi,
I'm brand new to jQuery, and so far I love it! I don't know ajax from
a cumquat and yet, here I am ajaxing around merrily, even if clumsily.
I've run into a situation where I have a grid of images, one which is
to be the default, or the main image. When I click the radio button,
it correctly
Hi,
I wrote a jQuery code to display a link in the side bar (like the ones
such as "About this group" shown in the right pane of this page)
through AJAX.
Then I want the click event on the link to be taken care of by
jQuery.
But that event is not captured by jQuery.
How can I capture the event?
Hi all,
I am new to jquery. My close click event function dosen't
work, when ever i append new html data to my div. Intially it is
working fine with static data. Please help me to fix this problem.
$(function()
{
$("#addrow").click(function()
{
a
Situation.
I have several thumbnails next to a div with id of 'image holder'. Under
that is another div with id of 'msg_body'. image_holder already shows first
thumbnail's large view image and msg_body already shows first thumbnails
description on page load.
I want to be able to click next thum
Hello
I have a simple jquery code that will put a link (on click event) on a
division. The link is read from the anchor inside of the div:
$(document).ready(function() {
$("div.picture").click(function () {
var url = $(this).find("a").attr('href');
window.location = url;
})
I've got a fairly simple form with a few dropdowns which I currently
trigger on hovers.
A use requested that instead of a hover, that the dropdowns be
triggered by a click event.
No problem, except that I need the dropdown to slideUp when the user
hovers out.
I've taken a look at the .hover docu
Hello.
I have a simple anchor href link on which I put on click event
handler:
$("#pause").click(function () {
//do something
});
When I click the link the action will be preformed and the browser
would scroll to the top of the page (because of # in the href
attribute). How do I prevent th
I use this code (jQuery) to find and fire the delete button on the
gmail tool bar, but the click (3rd line) didn't work as expected since
gmail change to the new look where buttons are now div., what is wrong
with the new gmail imageless design?
var gmCanvasFrame = $('iframe#canvas_frame');
var
Hi
I have the following html where I have a bunch of checkboxes which I
want to trigger events when checked/unchecked. But apparently the
events are not being recognized.
I have tried using various ways to access the checkboxes, but nothing
seems to work.
1)$('#manufacturers:checkbox').cl
Hi
I have the following html where I have a bunch of checkboxes which I
want to trigger events when checked/unchecked. But apparently the
events are not being recognized.
I have tried using various ways to access the checkboxes, but nothing
seems to work.
1)$('#manufacturers:checkbox').cl
Dear folk ,
I have a select box with Multiple Options
Such as below
New/Edit
1
2
3
I wanted to bind a Click event to the select box , so when ever we
Click on the Option with the NEW value
alert box appears this is my code
$("select.actions option[value=NEW]").click(function(){
aler
I want to do a onclick event for anywhere in a table row except for a
specific cell. In that cell I want to be able to click a checkbox. I
have any # of rows and 12 columns in the table. I usually use a
something like this
In this instance I also need to allow the user to check on a bunch of
ro
So, I am implementing a page on which words that have hints associated
in the DB are binded with the click event to show the Hint. Initially,
I go through and replace the words with html that goes word
So, then I bind the hint class with the click event,
$(".hint").bind("mouseup",function(e)
{
Hi Folks ,
I have some links in my Navigation bar such as below , I Used FIND
in my code , does anyone has any better solution for me ,
I also used Event Delegation in the system .
b
c
d
$("ul").bind("click",function(e){
var clicked=$(e.target);
$(this).find("a.active
both jquery-1.3.1 and 1.2.6 on FF
No beginner here, but I'm absolutely stumped. The following function
is firing twice. There are no other event handlers involved (and,
anyway, it's only whatever I put in this function that runs). I've
found a couple of messages online about similar problems but
hi all,
I hav a slideviewer... which works perfectly when i click on any
thumbnail,
main image is shown successfully...but i hav put two images
(#nextImage,#prevImage) and one
counter label..now when i click on next,prev images , sometime they
work but
not every time.. click event shows as if ima
Hello,
I've got a menu on my page that opens when clicked, and stays open
until it's reclicked or the user clicks anywhere else on the page.
Basically, it behaves the same as an application menu. The problem is
that a large part of the page is occupied by an iframe and I can't
figure out how to g
Hi.
I'm having a problem, where
$(".showEvents").click(function(e) {
var CalendarID = $($(e.target).parent()).parent();
if ( $('#data_'+CalendarID.attr('id').substr(4)).length > 0 ) {
$(e.target).attr({src : "images/down.png"});
I've a simple question..
I'm writing a function that call an event on first mouse click and
call another event on second mouse click.
But I've some problem, because work only the first mouse click:
jQuery(document).ready(function() {
$(".menu a").click(function() {
$(this).next("em").animat
Hi,
So I have the following code:
Hi,
I have the following code:
$(document).ready(function() {
$('#ctl00_ContentPlaceHolder1_btnRadioHelp').click(function
() {
$('#ctl00_ContentPlaceHolder1_Panel3').modal();
});
});
As you can tell, the server side code is ASP.NET. I
Go here:
http://www.theshedbbq.com/gulfport/photos/
Click one of the photo gallery links. In IE7, it does not return
false and immediately jumps back to the top of the page. Within the
clickhandler, I'm grabbing some data from the anchor tags' attributes,
then calling getScript(). Do I need t
Having read the handful of mentions I could find, the underlying 'why'
is still a mystery to me. I tried stepping through the code with
Firebug but can't make out why it's not working, although I have MADE
it work in this manner:
$("a").click(
function() {
var self = this;
setTimeout
Hi jQueriers,
Bumped into an oddity on Safari and Chrome. I have a HTML page and I
want to intercept all links and feed them through an ajax request
instead. So I first do this
$("a").bind("click",handleAjaxifiedLink);
which routes clicks to
function handleAjaxifiedLink(e) {
hi to all ;)
It seems that click function doesn't work on html element created on
the fly with jquery. Where am i wrong ?
When i click on the checkbox from paragraph "P2", i got the alert.
But when i click on the checkbox from paragraph "P1" created on the
fly (when i submit a button), then i go
Hi guys,
Since this is my first post I thought I'd introduce myself - I'm Mike,
working on a web startup in London. We're using jQuery (because it's
awesome!) for all of our JS needs.
However, I'm having a bit of a problem with creating a clickable menu.
In
particular, I'm trying to open a menu
Hey All,
What is the main difference between using .bind() and .click(), when I
was reading up, it was mentioning it removes event bubbling?
Thanks,
Ryan
I am having an odd behavior when calling click() on a checkbox [2] vs
manually checking a checkbox [1].
function checkbox_click(event)
{
event.stopPropagation();
do_email(enable_email.url);
if($(event.target).attr('checked'))
{
$(event.target).pa
All jQuery events are "pass throughs" in the sense you are talking about.
Merely intercepting an event with jQuery does not prevent the normal browser
behavior for that event. If you handle a click event, the browser will still
take its normal action after your code returns.
You can prevent the s
Is this a good way to let the user know that a slow-loading page is coming?
$("#menu a").click(function(e){
$.blockUI({ message: "Loading..." });
location.href = e.target;
})
I'm not very familiar with jquery, but as far as I can tell, the
.click() function isn't a pass-
$(".status_actions img").click(function(){
console.log("clicked!");
console.log($(this).attr("alt").val());
});
It puzzles me as to why this does not work...
I am having difficulties with IE6 and IE7 not invoking the click
function correctly. I have to click twice to get it to fire.
test case:
http://dev.dreimorgen.com/test.html
with IE6 or IE7 click on "item1" once then on the "Item 1 content"
link. Repeat the process once more and it should toogle
Hi,
I have an anchor tag like delete
I have attached a click event to the tag which does a POST request to
the url by doing
$("a.delete").click(function () {
$.post(url, {"id":id}, function(data){
console.log(data.msg);
});
});
The POST request goes throught, but after that - a GET
I'd like to bind both events to a div, such that:
When the div is clicked, Event A fires.
When the div is double-clicked, event B fires. But not event A.
The single-click event works fine. And the double-click works too,
except both events fire on double-click. That is, immediately after
the fir
Hello,
I have the following code works fine in ff and safari but the click event is
not handled in ie6/7
// add tracking pcWebServiceURL to the current page
function addTracking(){
var _WSURL = pcWebServiceURL;
I have a set of checkboxes and some JavaScript code to handle when the
user clicks on them. In the code below, there are functions for
selecting and deselecting a checkbox, and then there's a function to
handle event binding. And there's the $(document).ready() binding.
In Firefox when I click on
I have been working on a script, that will put a URL into a var when a
link is clicked. Then, when a second link is clicked a confirm dialog
appears, if you click ok, that var is printed.
Problem is, it works only the first time you click one of the first
links. If you click a second link, and
I expected that calling click() on a submit button would trigger a
form's submit handler, but this doesn't seem to be the case.
Example: register a jQuery submit handler:
$('form').submit(function() { alert('jquery submit handler'); });
Then click the corresponding submit button:
$('input[type=s
i load several tables contents via AJAX. after each load, i do
bind("click", function(){ ... }). this should bind it to all matching
elements of the DOM. but, in all browsers, it does apply only to newly
loaded parts, the others seem to be "disabled" somehow.
this is the real code inside function
I have worked this out to being due to the items not being part of the
DOM when the page is loaded.
I am now using live query to get around this issue.
Sorry for posting before looking properly.
Adam
On Jun 26, 2:09 am, Adam <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a page which shows data fo
Hi,
I have a page which shows data for the next 5 weekdays. It has two
buttons which submit via JQuery AjaxSubmit to move the page back and
forward days. This works fine. However, the details for each day can
be collapsed via a button that is in the results for each day, i.e.
name1 [+]day
detailed tutorial for changing the html content of a div element with
jQuery.
http://frinity.blogspot.com/2008/06/change-div-content-with-jquery.html
--
Fahad
http://frinity.blogspot.com - a blog from a web addict
Hi there,
Please see my example here: http://www.hellobenlau.net/jquery/test.htm
So basically, I want to select a list item from Group A, and when the
transfer button is clicked, it gets transfered to Group B.
However, once transferred, the list items in Group B doesn't respond
to any click func
I apologize if this gets posted twice, but it looks like my last
attempt to post got swallowed by the ether.
I'll make it short:
I have flot and ui tabs. Because I'm processing a rather large set of
data, and excanvas, switching the datasets graphed takes a few
seconds. I want to add feedback,
hi all
My script:
function stop()
{
$("#playbta").unbind("click").bind("click",function(){
play(pos);
sreturn false;
});
player.dostop();
}
function play(pos)
{
$("#playbta").unbind("click").bind("click",function(){
stop();
return false;
});
Hi again,
I have a form with products select menu. I would like to show and hide
product specific options as the user selects them. Now, I can show the
product options but I don't know how to hide them if the user selects
a different product.
My HTML is:
snip...
-Se
Hi again,
I have a form with products select menu. I would like to show and hide
product specific options as the user selects them. Now, I can show the
product options but I don't know how to hide them if the user selects
a different product.
My HTML is:
snip...
Hi again,
I have a form with products select menu. I would like to show and hide
product specific options as the user selects them. Now, I can show the
product options but I don't know how to hide them if the user selects
a different product.
My HTML is:
snip...
-Se
Hi again,
I have a form with products select menu. I would like to show and hide
product specific options as the user selects them. Now, I can show the
product options but I don't know how to hide them if the user selects
a different product.
My HTML is:
snip...
-Se
1 - 100 of 134 matches
Mail list logo