I'm totally new to GreaseMonkey, but I'm trying to make a little script.
// ==UserScript==
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==
(function() {
$ = unsafeWindow.jQuery;
alert($); // this gives 'undefined'
}());
Why does the alert give undefined and how to fix this?
UPD...
Duplicate:
Paging Through Records(json data) Using jQuery…
Good jquery pagination plugin to use with json Data…
My json Data looks like this
{"Table" : [{"Emp_Id" : "3","Identity_No" : "","Emp_Name" : "Jerome","Address" : "Madurai","Date_Of_Birth" : "","Desig_Name" : "Supervisior","Desig_Description" : "Supervisior of th...
if a user types in an input say 3 into a text box three small text boxes should be shown below or in a popup through javascript or jquery .How can this be done...
<input type="text" name="order">3</input>
Thanks..
...
So... very excited as first post on stackoverflow
I have this page, clicking a button will call editIEPProgram(). editIEPProgram counts how many specific divs exists, adds another div, loads it with html from '/content/mentoring/iep_program.php' and then calls $("textarea.tinymce").tinymce to add a rich text editor to the newly added te...
Hello
<div id="servisesmenu">
<span class="services" title="Сервисы">Сервисы</span>
</div>
<div id="services_menu" class="hiddenmenu">
<div class="framemenu">
<div class="itemmenu"><a href="/flights_booking/" class="u" title="Покупка авиабилетов онлайн">Покупка авиабилетов онлайн</a></div>
<div class="...
Not sure if you can do this, but I want to select the first of two classes of an element with jQuery and return it's first class only.
<div class="module blue">
I want to return 'module'.
tried this:
var state = $('body').attr('class').first();
but none of that seems to work, thanks for any advice.
...
I need my javascript to only do the callback when I OPEN a section on the accordion, as of right now it does a callback when I open OR close a section because I'm only using a click function. Is there a way I can modify my existing click function to only run when the given section is activated?
My current click function:
$("a#mimetype...
I have the following code that works on firefox and chrome
$("#adicionarItem").click(function(){
$.ajax({
type: 'GET',
url: $("#formAdicionaItem").attr("action"),
data: $("#formAdicionaItem").serialize(),
success: function(response){
alert($("div#errors", response).size());
}
}...
Hello,
I am using JQuery to execute an operation within a web service. After writing data back to my databaes, the service returns a JSON response. My request looks like the following:
$.ajax({
url: "/services/myService.svc/PostMessage",
type: "POST",
contentType: "application/json; charset=utf-8",
data: '{"message":"testing","...
One can use matchedset.find(selector) / matchedset.parents(selector) to get the descendants/ancestors of the current matched set filtered by a selector, but that doesn't include the matched set itself (if it happens to match the selector too). Is there a better (more concise and/or faster) way to get it than
matchedset.find(selector).ad...
I have a text for example
"The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps
over the lazy dog."
When i click on word i must get data from XML or from mysql about this word.
How i can make every word active for click and se...
hello
does Display:none or jquery Hide function speed up my website, i mean i'm developing a website where i have a DIV but it's not always needed so if a give him CSS property Display:none or using jquery .Hide will that speed up my website ? if not how to do that?
Thanks
...
Hello,
I have the following HTML:
<ul actualpage=0>
<li/>
<li/>
....
</ul>
<ul actualpage=0>
<li/>
<li/>
....
</ul>
Im trying to get the value of actualpage of each ul and create a new attribute. Its easy but not in one jquery sentence... Its possible? Until now i have the following line (between ## simbols the missing part that i ...
The code below gets the username/password and runs it thru the backend.php script.
<?php session_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
...
I have this code that changes the opacity of the div on hover.
$("#navigationcontainer").fadeTo("slow",0.6);
$("#navigationcontainer").hover(function(){ $("#navigationcontainer").fadeTo("slow",
1.0); // This sets the opacity to 100% on hover },function(){
$("#navigationcontainer").fadeTo("slow",
0.6); // This sets the opacit...
Hi,
I am using the JQuery Form extension to submit a form with AJAX. I have the following code:
var options = {
beforeSubmit: showRequest, // pre-submit callback
success: showResponse, // post-submit callback
// other available options:
//url: url // override for form's 'action' attribute
...
I have the following jQuery which I want to output a list of images. The problem is that I cannot get 'this' to find the source. It currently is an object which outputs as an HTMLImageElement. How can I get the image source from this object?
$("#imgs li.images img").each(function(i) {
$("#list").append("<li><img src=\""+this.attr("...
I feel like a bonehead: I want to assign index=i to each LI I have selected, with i incrementing. It appears to assign them all at once though, and they all get index=1. Thoughts?
$("#window ul li").each(function(){
var i = 1;
$(this).attr("index", i);
i++;
});
...
Can someone shed some light on the problem please:
I have the following:
$(document).ready(function () {
$("#txtFirstContact").autocomplete({url:'http://localhost:7970/Home/FindSurname' });
});
On my Asp.Net page. The http request is a function on an MVC Controller and that code is here:
Function FindSurname(ByVal surna...
<script type="text/javascript">
$(document).ready(function(){
$("#toggle").toggle(
function(){
$("#box1").slideToggle(800,function(){
$("#box2").slideToggle();
});
},
function(){
...