I am wanting to use two button form and created the following which works. It however breaks any other events on the page but I can't figure out why. Is there a better way?
window.addEvent('domready', function() {
$('vote1').addEvent('click',function() {
new Element('input', {
'type':...
I don´t know if I have forgotten how to do so or if it´s a bug, but I just can´t find the caller's reference using jQuery.
I´m doing the following:
$(document).ready(function() {
$('#parent a.item').click(doSomething);
});
function doSomething(e) {
// Alerts for demostrational purposes only
alert(e.target);
alert(e.cu...
Hello all,
I'm doing a drag and drop module now, and I need to get the position of the element on screen (don't really care if it is page, screen or offset or any thing else), but it has to be from the right as my project is in a RTL language....everything is RTL, so the data has to be saved like that to the DB because resolution and re...
Hi!
I'm using one index.tpl with navigation menu. Once the user click on the menu, it will direct to another page. The problem is, the selected menu is not in the selected state once it redirects to the new link. If there a way to keep the menu in the selected state even after it links to another page??
Thanks!
...
How do I bind events to a jQuery UI Toggle button? More specifically, how can I bind events that are going to fire?
The checkboxes are rendering to toggle buttons correctly, but any event handlers attached to them are not triggered when the state of the button changes. Is there something I'm missing?
CSS:
<input type='checkbox' id='...
In my webpage, I am using ajax + RoR to refresh the contents of the textbox using searchtool. All the value i am accessing, such like superset value for the current page. Means for example there is headquater and it has many stations. When I am trying to access the value of headquater at station then corresponding values changes at textb...
I've written an event listener for a form submit that is causing me a few issues. When pressing 'enter' inside the text field everything works fine. However, I have an span (with background-image) that submits the form as well via a click event. This is not working properly and I can't figure out why.
Here's the basic HTML:
<form name...
Hi All
I have a div section in which i have an image whose onlick event should execute a function called in it, but it is not executable in FF or chrome with my code, infact the image is not clickable at all . Could some one help me in get the thing done? below is the code i am working with
<div class="addtocart-popup-bg">
<div ...
I have a external js file handling deleteing some element. According to the result, I would determine whether I need to refresh the page or not.
var deleted = 0; // first assume not deleted
$(function() {
$("#action a.action-delete").click(function() {
var id = $(this).parent().parent().attr("id");
$.get("modify-s...
Possible Duplicates:
Firebug JS warning to jQuery 1.4.2 The 'charCode' property of a keyup event should not be used. The value is meaningless. To ignore it?
Firebug: The 'charCode' property of a keyup event should not be used. The value is meaningless.
I have this error when I start typing on my textbox:
The 'charCode' ...
I want to use onbeforeunload to give a message to users before leaving certain pages.
Is it possible to know which url they are supposed to jump to at the onbeforeunload event?
Thanks
...
Is there a way to know how much percentage of one image is already loaded? Kind of a onProgress event for the load? So if I would do something like this
$('<img/>').load(function(){
$(this).appendTo(some div);
})
.error()
.attr('src',some source);
I could have some progress bar indicating how much of the previous load is complete....
Hi
I need to add a color picker to some input elements.
I'm using
$(".element").colorPicker(){ ... }
This works perfectly.
The problem is that the page has a AJAX form, which - when submitted - will overwrite the previous form with a new one (new input fields etc). After that the colorPicker stops working.
So how can I fire that fun...
When I add any onkeyup event, it does not do what it's supposed to in Opera. It fires repeatedly while the key is held, not when it's released. This same event works correctly in Chrome and Firefox. I have no listeners for keydown or keypressed.
This simple code logs a stream of key events to the console in Opera when the key is held do...
Something should trigger, no?
I get not supported in IE8 and nothing happening in Fx 3.6.10
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.2.js"></script>
<script>
// modified from http://pragmatec.blogspot.com/2009/06/google-toolbar-style-and-tooltip.html
jQuery(function($){
$.fn.dommodhandler = function(opt...
I have two div-elements where one representing a post(status post) and one representing a delete-button for deletion of the post. The delete-button shall only be shown on mouseover event of div-element representing the post. It shall also be shown on mouseover event of the delete-button itself, because it lies within the post.
document....
hi there,
it seems that jquery validate plugin does not come with out of the box, success and failed callback options. how do i manage to launch some custom code when a form's validation fails?
we need to change certain layout elements not related to the fields itself when a player enters invalid data.
hope it is still possible
...
Is It Possible to get the text box position using the javascript
...
Hi All,
I have a text field have value http://localhost/Send/test.php?s/?a=1&o=2 . Another three text boxes . If we enter three values the above url will change like http://localhost/Send/test.php?s/?a=1&o=2&s1=a&s2=b&s3=c . The value for s1,s2 and s3 will not save anywhere . My question is how we check is the value ...
I'm building a touchscreen kiosk using Chrome (7.0.536.2 dev) in kiosk
mode on a Windows 7 PC with multi-touch display.
I can see that the ontouchstart event is available (by inspecting the
window object in Webkit Web Inspector) but it never fires. If I write
the following code, the onclick event fires when I touch the screen
but the on...