What does the following JQuery code mean and how would the HTML code look like using the following JQuery code?
Here is the JQuery code.
$("div.result").html(html);
Hi All,
I m using autocomplete from
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
jQuery Autocomplete plugin 1.1
i managed to get data from server in below form with sepaerator to id as "-", but i dont want to show this id in list while selecting but sending it as hidden data.Please suggest.
Exon: Supplier HJR/VAKJ -1
Just started with JQuery and I've managed to pass a parameter using POST, firebug confirms this:
Parameters
link [email protected]
Source
link=test1%40test.com
I don't know how to access the link parameter from the receiving page using JQuery, it must be so simple but everything I've been searching through (jquery website, SO, etc) mentions everything but this.
Thanks,
Alex
Hi, i'm using jQuery for sending ajax requests to the server, but i have some problems with the charset. In the ajax function documentation is written that data is always sent in UTF-8 according to the W3C XMLHTTPRequest standard, so i don't think that jQuery allows you to change the request charset (except if you load a script, but that's not my case).
So do you know a way to set the ISO-8859-1 charset for the ajax request in jQuery?
I was looking at some jQuery UI code, a found a weird behavior there:
jQuery.ui||(function(a){ /*... */ })(jQuery);;
The logical OR is clear for me, the function wrapper (still searching the correct name for it), too, but why two semicolons?
Thanks in advance
Vincent
I have a JQUERY Post call which is posting critical data to the server. Which if isn't posted successfully, results in a huge loss of important data.
I have a save banner UI show on the page before the JQUERY POST, after the JQUERY Post it has the Save Banner go away.
I'd like an inbetween state, where if the save is taking longer than 1 second, it updates from "saving" to "saving..."
but if it doesn't save within 4 seconds, it says "error, try again" something like that.
Any ideas on how to accomplish this with JQUERY?
I use the following piece of code to test if our server is running whilst the user is in a page. I've also started adding other functions that grab small amounts of data that are constantly changing and are to be relayed to the user (Files waiting for download, messages, reports etc).
I've noticed recently that if I leave any page open (all pages contain the same function), the browser takes up more and more system memory which I can only attribute to this regular task (overnight it reached 1.6 gb). Is there some way of clearing out the data that is being accumulated? Is this normal behaviour? As far as i can tell, every time I call the function it should overwrite the previously retrieved data?
function testServer(){
jQuery.ajax({
type:"HEAD",
url:"/media/d_arrow_blue.png",
error: function(msg)
{
jQuery.jGrowl("Server Disconnected");
}
});
//retrieves count of files awaiting download - move to seperate function
jQuery.get("/get_files/",{"type":"count"},function(data)
{
jQuery("#downloadList").children("div").text(data);
});
};
jQuery().doTimeout(6000,function() {
testServer();
return true;
});
Hello,
I have some code that if Javascript is available, it will remove a GIF image and replace it with a PNG image. The PNG is display:none and the GIF is visible.
Since IE6- browsers can't load PNG, I have loaded the jquery PNG fix. But it only seems to work if the image is already visible.
The other issue is I am trying to get the jquery.browser function to apply to less than version 6, and I am not having much luck.
<script type="text/javascript">
$(document).ready(function(){
$("#gif").hide();
jQuery.each(jQuery.browser, function(i, val) {
if($.browser.msie && jQuery.browser.version <="6"){
$("#png").show();
$('.png').pngFix()
}else{
$("#png").fadeIn("slow");
}
});
});
</script>
HTML
<img class="png" id="png" src="images/main_elements/one-2-flush-it-campus-challenge.png" style="display:none;" />
<img id="gif" src="images/main_elements/one-2-flush-it-campus-challenge.gif"/>
Hi Guys,
I am trying to use jQuery to basically wrap a bunch of CSS modifications via jQuery but on pages where the #IDs or Classes dont exist I get errors ? Like
jQuery(".class").css(random_stuff) is not a function
Any ideas what I can do to either "find" the elements and do nothing or ?
Hello Could find the google hosted version of javscripts
timeago.js - timeago: a jQuery plugin, version: 0.8.2
jquery.popup-min.js - ColorBox v1.3.6 - a full featured, light-weight, customizable lightbox based on jQuery 1.3
I'm writing a simple WYSIWYG editor in an iframe, but having trouble registering the "oninput" event to detect when the user modifies the text field such as pasting in data etc.
var txtArea = document.getElementById('txtArea');
txtArea.contentWindow.document.designMode="on";
txtArea.contentWindow.document.open();
txtArea.contentWindow.document.write("<head><style type='text/css'>body{font-size:13px;}</style></head><body>"+data.document+"</body>");
txtArea.contentWindow.document.close();
$([txtArea.contentWindow.document]).bind("click", updateCaretPosMouse); //fires
$([txtArea.contentWindow.document]).bind("keyup", updateCaretPosKeyboard); //fires
$([txtArea.contentWindow.document]).bind("input", textChanged); //doesn't fire
If I create a plain old element, and add the "input" event to this, then it works. Do 'input" events not work with iframes WYSIWYG editors?
i have tried this code to redirect a php page.but it s not working .can any body please tell me the solution(is there any changes needed in the body part of parent page?)....
/
/
here am pasting the code(header part)
/
<script type="text/javascript" src="jquery/jquery-latest.pack.js"></script>
<script type="text/javascript" src="jquery/jquery.timer.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// This will hold our timer
var myTimer = {};
// delay 3 seconds
myTimer = $.timer(3000, function() {
//redirect to home page
window.location = "http://sys3/shinshiva9/shin_shiva/booking_table.php";
});
});
</script>
I am having a couple problems trying to manually insert some jQuery features into a wordpress theme. I have a lightbox wordpress plugin that is jQuery based that is working fine.
So if I manually load the jQuery script into wordpress the functions seem to work but instead of say a slide being hidden it is revealed when it should still be hidden. Or a pop up that should work is already being shown instead of hidden. I don't think I'm supposed to manually include the jQuery into my skin but using the wp_enqueue_script('jquery'); doesn't seem to be resolving my issues either.
<script src="http://platform.twitter.com/anywhere.js?id=i5CnpkmwnlWpDdAZGVpxw&v=1" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".btn-slide").click(function(){
$("#twitpanel").slideToggle("slow");
$(this).toggleClass("active");
});
});
</script>
<div id="tweetit"><a class="btn-slide">Tell em'</a>
<div id="twitpanel"></div>
<script type="text/javascript">
twttr.anywhere(function (T) {
T("#twitpanel").tweetBox({
height: 100,
width: 225,
defaultContent: "Some Random Text"
});
});
</script>
</div></h2>
Like I said it works but in the reverse fashion that it should be.
I think I'm just loading in something wrong?
TIA,
Chase
Hello all,
I have been trying to convert my rails 2.2.2 app over to jQuery, and would like so without using jrails. The only reference material I can find on the subject is Railscasts Episode 136. Ryan goes over how to use jQuery to post a form and handle the response in a .js.erb file.
My questions is has anyone tried to use jQuery with .js.erb files with anchors as the trigger?
As a replacement for "link_to_remote".
I have gotten jQuery to do a .get to submit this link on click to the controller, but I cannot seem to get it to go into the .js.erb file.
Thanks
I used to use this script for jquery email obfuscation:
$(".replaceAt").replaceWith("@");
$(".obfuscate").each(function () {
$(this).attr("href", "mailto:"+$(this).text());
});
<a class="obfuscate">name<span class="replaceAt">-AT-</span>server.com</a>
But with jQuery 1.4.x, I now get this error:
uncaught exception: Syntax error, unrecognized expression: @
Looking this up on the net, it looks like jQuery thinks that the @ is a special character. I tried to "\@" it and a few other things with not luck. I'm not enough of a jQuery ninja to know how to fix this. Any ideas?
I have this code in jQuery..
$(document).ready(function(){
var fieldCounter = 0; ...
I have a jQuery function that increments this value.
This works, but I can't access this value on the page from a non-jQuery function? The reverse is also true, if I scope it in JavaScript e.g.
<script type="text/javascript">
var fieldCounter = 0;
I can access it from javascript but jQuery can't view it?
I'm probably doing something really dumb?
Now that Visual Studio 2010 has jQuery support, I'm wondering how I can update the release version? When you currently create a project, it automatically creates the 1.4.1 files, but there is now the 1.4.2 release on the jQuery.com website.
How can I tell VS2010 to use the more recent version of jQuery?
I'm trying to get all the input elements from a certain form from jQuery by providing only the name of the form and only knowing that those wanted fields are input elements.
Let's say:
<form action='#' id='formId'>
<input id='name' />
<input id='surname'/>
</form>
How do I access them individually with jQuery?
I tried something like $('#formId > input') with no success, in fact an error came back on the console "XML filter is applied to non-XML value (function (a, b) {return new (c.fn.init)(a, b);})"
Maybe I have to do it with .children or something like that? I'm pretty new at jQuery and I'm not really liking the Docs. It was much friendlier in Mootools, or maybe I just need to get used to it.
Oh and last but not least, I've seen it asked before but no final answer, can I create a new dom element with jQuery and work with it before inserting it (if I ever do) into de code? In mootools, we had something like var myEl = new Element(element[, properties]);
and you could then refer to it in further expressions, but I fail to understand how to do that on jQuery
Thanks in advance.
I'm currently developing a small WebApp that makes use of
Google Maps (front-end uses jquery-ui-maps)
jQuery Mobile with a fixed header & footer
Now I encountered a conflict that appears on touch enabled devices as well as on desktop/mouse controlled "click" events: When I "tap" or "click" the map to actually "pan" it, then my header/footer toggles it's visibility. As I want to keep the toggle behaviour, I can't simply deactivate it, but showing/hiding the header/footer on every "pan" of the map is odd. After thinking some time about it, I think I got a concept that should work:
Question: How I can I add a delay to the visibility toggle for the header/footer? So when I don't release the finger/mouse after XYms, the header/footer doesn't show/hide?
Example:
jQuery( '#map_page' ).live(
"pageinit"
,function()
{
// Att.: pseudo code
if ( $.mobile.taphold )
don't toggle fixed
if ( mousedown > XYms )
don't toggle fixed
}
);
Thanks!
This is how I load jQuery:
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
function OnLoad() {
insert jQuery goodness here
};
google.load("jquery", "1");
google.setOnLoadCallback(OnLoad);
</script>
But instead of function OnLoad() {, I'd like to use
$(document).ready(function() {}
so that it's like every example in every book and documentation snippet.
How can I define: $ = jQuery?
Does uploadify supports jQuery 1.4?
The site states that it needs:
jQuery v1.2.x or greater
... but the demo runs on 1.3.2 and I don't feel like trying to get everything to work just to realize that it's some feature I want later is not compatible with my version of jQuery.
I am using jQuery with ASP.NET in a project. Instead of using ASP.NET Ajax, I am using jquery's ajax functions. Is there any security risk if I do that? I mean, since I am using jquery's ajax calls, no view state information will be passed to the server so that it can verify the page's authenticity (though it saves a lot of bandwidth..).
I would also like to know what is the best/good practice here.
hy, i have a little, big problem here :)
after i upload some images i get a list with all the images. I have some jQuery function for rotate, duplicate, delete, shuffle images! when i select a image and hit delete i send a post to php with the alt="" value of the image,i identify the picture and edit.
I want to make a save button,
Instead of sending a post every time i rotate a image, better send a post after editing the list of images with an array that contains all data?
my php array after upload looks like this:
[files] => Array
(
[lcxkijgr] => lcxkijgr.jpg
[xcewxpfv] => xcewxpfv.jpg
[rtiurwxf] => rtiurwxf.jpg
[gsbxdsdc] => gsbxdsdc.jpg
)
say that I uploaded 4 pictures,
firs picture i rotate 90 degrees
second i want to duplicate
third i rotate 270 degrees
and the fourth image i delete
i can do all this only with jQuery, but on the server the images are the same, after a refresh the images are the same
this is the list with the images:
<div class="upimage">
<ul id="upimagesQueue">
<li id="upimagesHPVEJM">
<a href="javascript:jQuery('#upimagesHPVEJM').showlargeimage('HPVEJM')">
<img alt="lcxkijgr" src="uploads/s6id9r9icnp8q9102h8md9kfd7/lcxkijgr.jpg?1272087830477" id="HPVEJM" style="display: block;" >
</a>
</li>
<li id="upimagesSTCSAV">
<a href="javascript:jQuery('#upimagesSTCSAV').showlargeimage('STCSAV')">
<img alt="xcewxpfv" src="uploads/s6id9r9icnp8q9102h8md9kfd7/xcewxpfv.jpg?1272087831360" id="STCSAV" style="display: block;" >
</a>
</li>
<li id="upimagesBFPUEQ">
<a href="javascript:jQuery('#upimagesBFPUEQ').showlargeimage('BFPUEQ')">
<img alt="rtiurwxf" src="uploads/s6id9r9icnp8q9102h8md9kfd7/rtiurwxf.jpg?1272087832162" id="BFPUEQ" style="display: block;" >
</a>
</li>
<li id="upimagesRKXNSV">
<a href="javascript:jQuery('#upimagesRKXNSV').showlargeimage('RKXNSV')">
<img alt="gsbxdsdc" src="uploads/s6id9r9icnp8q9102h8md9kfd7/gsbxdsdc.jpg?1272087832957" id="RKXNSV" style="display: block;">
</a>
</li>
<ul>
</div>
is ok if i make one array like this:
array{
imgFromLi = array(img1,img2,img3,img4,img5,img6)
rotate = array{img1=90, img2=270, img3=90}
delete = array{img4,img5,img6}
duplicate = array{img2, img3}
}
how i can send/cache this array??
sorry for my very bad english