I have the code below that shows a throbber and makes a getJSON call to an MVC action when the user changes an entry in a select. This all works great except there is a default -- select -- element in the list for which I don't want the getJSON to run.
However, I can't work out how to apply conditional logic to hooking this event. The...
$('#start') executes the function myFunction() and $('#stop') end it. How do I stop myFunction() from executing?
function myFunction() {
$(document).mousemove(function(e) {
$('#field').html(e.pageY)
});
}
$('#start').click(function() {
myFunction();
});
$('#stop').click(function() {
//stop myFunction
})...
i can use this code to handle "ctrl + s" on firefox :
$(window).unbind('keypress').keypress(function(event) {
if (!(event.which == 115 && event.ctrlKey)) return true;
$('#save').click();
event.preventDefault();
return false;
});
but , it ca...
hi,
i'm having a global array which holds my css+js includes
and i'm looking for the easiest solution for the following issue:
a function which allows adding more includes (as string) - eg. addIncludes("script1.js,script2.js,style1.css,style2.css");
that function should automatically filter duplicate entries
example:
var myIncludes...
Hi there,
I'm trying out jquery as a javascript library over prototype. Now when it comes to event delegation in prototype I can do the following:
$('wrapper').observe('click', function(event) {
var foo = Event.findElement(event, '.foo1');
if (foo) // do something
var bar = Event.findElement(event, '.bar1');...
If I used the api to post, I would like to return back the Tumblr permalink for that site I sent it to.
...
How to handle a array response from .getjson. Following code handles ajax request.
function getinfo()
{
$query="select field_uname_value,field_uaddress_value,field_uphone_value from {content_type_udetails}";
$result= db_query($query);
$i=0;
while($item = db_fetch_object($result))
{
$info[$i++]=array...
How to display other sites content in our sites with out using iframe?
Is it possible to load one sites file details in our site with out using the iframe. any body knows the solution please help me with a sample code?
...
This is in my Javascript:
function doSomething(fieldActions) {
var Actions = fieldActions;
$(Actions).show("slow");
$(this).hide(); }
This is in my HTML:
<a onclick="doSomething('#date-actions');">edit</a>
The parameter needs to affect and DIV field. The ID of this field can be variable and there can be multiple on a page, so that...
Situation: We've got this DIV with thumbnails who need their src being changed on hover:
<div id="moreVideos">
<span class="mb">
<a href="#" onclick="javascript:loadAndPlayVideo('qrO4YZeyl0I');return false;" class="ml">
<img src="http://i.ytimg.com/vi/qrO4YZeyl0I/default.jpg" id="thumb_qrO4YZeyl0I" class="mvThumb" title="Lad...
Hi!
I have a page where ID is generated dynamically and be fetch from database and I put the result inside <a> tag :
<?php while($row = mysql_fetch_array($result))
{ ?>
<a href="<?php echo $row['id']; ?>" onclick="myfunc(); return false;">ID Number 1</a><br />
<a href="<?php echo $row['id']; ?>" onclick="myfunc(); return false;">ID...
I am using this Math for a bg color animation on hover:
var col = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')';
It produces a random rgb color. Very nice indeed but I look for something different.
Does anybody know a good Math that I can use to ha...
Hi to all Dear Coders,
i have opened this new question because i would like to make a simple script in Jquery or Javascript that read from very simple images the figures.
This is an example of image:
And this is an easy tutorial how to make: TUT Math Image
And then i have see this script that read all phrases: Megaupload auto-fill ...
I am trying to load HTML via JQuery, using the .load function. This is working as expected, but I want to process the loaded HTML afterwards. This only works when I either
a) set a breakpoint BEFORE said manipulation is done.
b) set an alert BEFORE said manipulation is done.
Of course I'd like this to work without having to set breakp...
Hi people,
I am trying to get this code working --
var loader;
$(function() {
loader = new air.HTMLLoader();
loader.addEventListener(air.Event.COMPLETE, complete);
loader.load(new air.URLRequest('http://www.lilpirate.net/blog'));
});
function complete() {
$(loader.window.document).ready(functio...
I want to focus an input field in the document's KeyDown event if it's not already focused.
In case that it is already focused, nothing is supposed to happen. If it's not focused yet, the text content is to be deleted and the pressed key – if its char code is in a specific range – to be added.
My current code only works in the newest br...
I have a Help page, help.php that I am loading inside an iframe in main.php
How can I get the height of this page once it has loaded in the iframe?
I am asking this because I can't style the height of to iframe to 100% or auto. That's why I think I need to use javascript..
I am using jQuery
CSS:
body { margin: 0; padding: 0; }...
I have this situation where i want to call a certain element depended on the click value. When the link contains an image i want to show the image, otherwise i want to load a html page. I've styled the bar to close the whole thing different when the html page is loaded as if the image is loaded. Say i have this css (which is the styling ...
I've been doing lot of trial and error but now need some help.
Page I'm working on: link
Questions:
Sliding tab content: When I hover the mouse over the three tabs, the div that moves along with the mouse is not getting evenly balanced between the three tab contents. There is a plugin that I used, tabbedcontentslider. I think it is...
I am calling a login form using jquery with.
<div class="session">
<?php if($current_user): ?>
<span>Welcome <?php echo $current_user['first_name']; ?></span>
<li><a href="logout.php" class="signout">Log Out</a></li>
<?php else: ?>
<span>Please Login or Register</span>
<li><a href="login.php" c...