How do you call function lol() from outside the $(document).ready() for example:
$(document).ready(function(){
function lol(){
alert('lol');
}
});
Tried:
$(document).ready(function(){
lol();
});
And simply:
lol();
It must be called within an outside javascript like:
function dostuff(url){
lol(); // call ...
I have the following markup:
<div id ="selectable1">
<span id="layer6">
here are some words that needs to be splited
<span class="good">this should not be splitted<span>
this should be splitted
<span class="good">and this should not be spited<span>
</span>
</div>
I am trying to write a function that will split only the words that do n...
see this code
$(function() {
$('.do').deleteTable({
parent: $(".do").parentsUntil("#did")
});
});
its works
but if i make it
$(function() {
$('.do').deleteTable({
parent: $(this).parentsUntil("#did")
});
});
not works; why?
i replace $(".do") to $(this)
...
That's it folks.. any ideas?
...
I have a table that is laid out like this:
<table>
<tr>
<td>checkbox</td>
<td>text-text-text</td>
<td>dropdownlist</td>
<td>textbox</td>
</tr>
</table>
I'm trying to toggle visiblity of the dropdown list and textbox based on the check status of the checkbox. I've got a click event set up that does this correctly, ...
In the below code
var panel= '<div id="title" style="display:inline;font-size:150%;color:white;background:transparent;text-transform: none;width:150px;"> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</div>
<div name="images" id="name" style="display:inline;position: absolute; margin-left: auto;margin-right:auto;left: 0;right: 0;width:350px;hei...
I'm creating a module where in my main PHP file I've added a reference to a Javascript file. In that Javascript file, I do a jQuery call on dom ready that does an Ajax post to grab the initial content for a div. The URL that it posts to is another PHP file (gateway.php) that is part of my module. (This gateway.php does a call to a remote...
I am working on an interface that requires that the user can click on a button, and then I will show a floating div positioned relative to the button (you can kind of think of it as the area that shows when you click the down arrow on a dropdown).
How can I correctly position this floating element adjacent to the button which was clicke...
I am trying to get the selected option from a dropdown and populate another item with that text, as follows. IE is barking up a storm and it doesn't work in Firefox:
$('#ddlCodes').change(function() {
$('#txtEntry2').text('#ddlCodes option:selected').text();
});
What am I doing wrong?
...
What I want to achieve is as follows:
For example, there is a symbol which represents a table on a web page, a user can drag this element to any place on the web page, when the user looses the cursor, a dialogue box will pop up to ask the user to input values of attributes, for example,the number of columns, the number of rows, after th...
Hi
web page : http://sideradesign.com/eco-art/gallery/
This code works fine in all brwosers except IE8 (haven't tested IE6/7)
jQuery(function () {
jQuery("#main-content").append("<img src='../images/ajax-loader.gif' id='ajax-loader' />");
$ajaxSpinner = jQuery("#ajax-loader");
var thisTarget = jQuery('#thumbnail-nav ul li:eq(0) ...
var
// Will speed up references to window, and allows munging its name.
window = this,
// Will speed up references to undefined, and allows munging its name.
undefined,
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
// Map over the $ in case of overwrite
_$ = window.$,
jQuery = window.jQuery = window.$ = function( sel...
Hi ! I'm trying to use Uploadify in a ASP.NET webforms project. The problem is that my script is not calling the generic handler. Here is the script.
<input id="fileInput" name="fileInput" type="file" />
<script type="text/javascript">
$(document).ready(function() {
$('#fileInput').uploadify({
'uploader': '/Ferramenta/C...
Plugin: jQuery lazy()
I ask here because the project page itself seems to be dead.
What steps will reproduce the problem?
1. embed two jQuery-Plugins that are both using the $.getJSON function
results in a "too much recursion error" in firefox. If the same scripts are
referenced with lazy it works fine. Problem only persits in firefox...
Here is my test JavaScript for you to reproduce the problem:
You will see iframe width is just about half of dialog wide. It seems that jQuery change iframe width to 'auto' instead of using the value I indicate.
<html>
<head>
<link rel="stylesheet" href="./styles/smoothness/jquery-ui-1.7.2.custom.css" type="text/css" media="screen"...
I have a thumbnail image inside a div. I use another image as the background for the div so that it frames the thumbnail. I need to be able to change the position of the background image from bottom center to top center when I mouse over the thumbnail.
Here is the html:
<div class="image">
<a class="zoom1" title="Sample title" href=...
Hi All,
Been doing some playing call my service which is on a different domain using jQuery. The call to the service is successfully made (my debug point gets tripped), and the correct response is returned (I sniff the traffic).
My problem is mainly that the success and failure callbacks don't get fired. I have read some other posts ...
Hiya,
I'm trying to generate Outlook event files for my events, doing so on the fly as and when someone requests it by pressing a link on the page.
Here's what i've got so far, but I can't find out how to get the browser to download the content which is returned.
I know how I could do this if I sent everything via _GET, but I'd prefer...
In Sharepoint - EditForm.aspx, I am doing dynamic cascading drop-downs. Adding drop-down values dynamically using Jquery. Values are not there in the choices list of the drop-down.
When I click OK button I get "Invalid postback or callback argument.Event validation is enabled using in configuration or <%@ Page EnableEventValidation="tr...
Hi.
I have a AJAX post method that gets xml data from server.
But when user session is over server will response with login page.
And in that case I can't detect if response in not xml because $.post don't call callback function.
How can I detect if response is not xml ?
Thanks!
...