Access Raw CSS using jQuery/Javascript
Hello all, not too sure this pertains specifically to jQuery, but it's always a great place to start. I would like to be able to access the raw CSS code that has been loaded for the specific page. I'm not looking to change the code (I know how to use jQuery for CSS manipulation etc...) I just want to parse through it and extract some useful information. I considered just loading the stylesheet references in the page, then placing a request to the server for the .css file, but this feels messy even
Injecting a cache lookup (dataFilter) for 304 (Not Modified) responses
I'm asking here for input before I submit a feature request in case there is a better way to handle cache lookups for 304 response codes. We are implementing our own object cache because the ifModified support on different browsers feels rather flaky and it is very important to us that we optimize bandwidth for all clients. In order to do this somewhat transparently to the developers, our framework is injecting a beforeSend and dataFilter function into each $.ajax request. The problem is that the
jQuery LOAD Issues with IE
I am struggling with ajax load in Internet Explorer. It works in all of the other browsers I have tried. Have a look at: http://www.creativelunch.com/atesore/user/profile/rwap_software When the ajax.load function is called to load the Active Items content, I get an IE error: Line: 307642184 Error: Not implemented The code used to load this page is quite simple: //show loading bar function showLoading(activeTab){ $('#loading-' + activeTab) .css({visibility : "visible"}) .css({opacity
Striping Rows Pulled via AJAX
I have some ROW striping code that works really well (thanks to a tutorial here). <script type="text/javascript"> $("document").ready( function () { $(".data tr").mouseover(function() { $(this).addClass("over"); $}); $(".data tr").mouseout(function() { $(this).removeClass("over"); $}); }); </script> <table class="data"> <tr> <td>row one</td> </tr> <tr> <td>row two</td> </tr> </table> The issue I am having is when
jquery help with variables and click function
I'm creating a click function for a set of links that changes the background image of each of those links( different images for each link). What I have is this: $(document).ready(function(){ $('#nav a').click(function() { //$('#hlink').css({ backgroundImage : "url(images/home_animate.jpg)" }); });which all works fine, but what I want is this: $('\'#' + $element + '\'').css({ backgroundImage : "url(images/home_animate.jpg)" });where $element stores the id of the link clicked. any help would be great.
Differentiate Unload Events
Is there a way to differentiate the unload event? I would like to only execute on a window/tab close or domain change without executing on back/forward/refresh.
Stop Propagation of Space-Key
Hi there, as a little side-project, I want to make a search engine that behaves similar to the "Just Type"-Feature of Palm webOS: When the user presses a key somewhere on my site, a box scrolls in containing the typed letters and the search results. In order to realize that, I bound a "keydown" event to $(document). I have but one problem: the "space" key. It is correctly recognized, the space is concatenated to the search term; but then, the site scrolls down (found out it's the default action when
expand which api should I take?
Hello, I'm trying to do the following: If i hower over the first box (headline) it will expand to a bigger box and text above the headline will be shown! How can i do that? (it should has a slide effect on it). I tried to use .css() method but this hasnt any slide effect. Thanks and Best Regards!
If one div is shown, close the other when showing a new one
I have this code which when you click the delete button of a particular row, it shows up the div .delete over that particular row, and when clicking on the cancel button on the .delete div, it'll close that the .delete row revealing the .row div again (the .row div doesn't actually hide, I handle the overlay with z-index). However, I want it so that if one .delete div is already shown I want it to close it before revealing a new .delete div, so you can never have 2 .delete divs open at any given
JQuery + .NET + Ajax + Silverlight
I want to save the position of the dialogs on the page in the .net code behind. i have placed this inside an ajax script <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <Triggers> <asp:AsyncPostBackTrigger controlid="Button1" eventname="Click" /> </Triggers> <ContentTemplate> <asp:HiddenField ID="HiddenField1" runat="Server" Value="" />
Speed Up An Ajax "Search As You Type" Function
Hi everyone. I'm working on a 'live search' for some products in my database. I use a web method in an aspx page to hit the database up for data. The search fires off on each keyup event. Here's the code that is fired to get the search results: jQuery.ajax({ contentType : 'application/json; charset=utf-8', data : '{"searchString":"' + jQuery('#searchText').val() + '"}', dataType : 'json', error : function (response) { getSearchResultsFail(response); }, success : function
jquery carrousel plugin not working when i add items dinamically from xml file
hi, i'm trying to add items dinamically to a carousel jquery plugin.THe items are added bt the carousel ignores them. The carousel take the items to show from this: <div class="viewport"> <ul class="overview"> <li><img src="images/picture6.jpg" /></li> <li><img src="images/picture5.jpg" /></li> <li><img src="images/picture4.jpg" /></li> <li><img src="images/picture2.jpg" /></li> <li><img src="images/picture1.jpg" /></li> </ul> </div>
loop trough list of elements and update hidden field seperated by vertical line and comma
I can have a unlimited set of list items and form fields (limited) in li: <li id="apr1"> <textarea class="thisistext">blablabla</textarea> <input class="imgid" type="hidden" value="450"> <input class="order" type="hidden" value="1"> </li> <li id="apr2"> <textarea class="thisistext">bimbimbim</textarea> <input class="imgid" type="hidden" value="455"> <input class="order" type="hidden" value="2"> </li> etc What I want is, write the contents of of all field in hidden field for update to database: The
question on filtering <a> tag with click() function Please help!
Hi, could you help me? I have this code $("a").click(function() { $("#loadingGif").fadeIn("normal"); }); this works well in my case but the problem is that this works to all text link when clicked. I don't want this click event to effect on anchor with class="menuHead" such as: <a href="http://example.com" class="menuHead"></a> Is there a way I can put filter or exception on $("a") so that <a> tag with class=menuHead will not be affected? thank you in advance. I am new to jquery and am enjoying
attach click event to fieldset instead of disabled submit button?
Hi all, I have a disabled submit button sitting in the fieldset of a form. What I'd like to do is attach a click event to this button, but from what I understand this can't be done since you can't attach events to disabled elements. Is it possible to attach it to the fieldset? I'm not completely familiar with event bubbling but maybe it's possible to capture the element clicked? All help appreciated :)
jQuery validation
Hi Guys, I need to use jQuery for validation but I'm not entirely sure how. I have an input field just with a simple "what is 4+3" label but I want to make sure that the value entered is equal to 7, I think I need to use .val() in here to do this but not entirely sure how. Any advice greatly appreciated.
Simple routine works on static page but not on Tumblr -- seeking help
Hello forum, this is a newbie post but I can at least say I have something working. I adapted a bit of code that I found somewhere, to give me a conditionally fixed sidebar (it remains fixed unless you scroll all the way to the bottom of the page, where it gets bumped up by the footer). It works on a static page with self-contained code (HTML, CSS and Scripts in one page except for the call to JQuery 1.3.2): A Static version of the page is here, working It may not be the best written piece of code
Help updating two divs at the same time from long running PHP script
Hi people - fairly new to Ajax and JQuery, hoping someone can help here. I have a page which displays a "process monitor" div, loading its content in a continuous loop (until the process finishes) from a PHP / MySQL script. This works a treat. There is a button on the page which does three things (1) use .get to fetch the next process id from the MySQL database, (2) starts the process monitor refreshing itself to watch for updates in MySQL (using process_id value), and (2) starts the long-running
Past the value of the combobox
Hi this is my first post. My problem is when i'm using a combobox html and submit the text and the value. So the past values are the values of the previous request. Request: $('#form_vendedores', tab_corrente).ajaxForm({ beforeSubmit : function() { msgCarregando(); }, data: { tipo: 'consulta', nomeVendedor: $('#form_vendedores select[name=codmaq] option:selected').text() }, target:
How can i copy $(this).html() by value, NOT by reference?
Hi, i'm trying to copy the HTML-Content of an element to a variable, after that i want to change the HTML-Content of the element. How do i copy by value? Default it seems to be copied by reference, i.e. i copy the html-content to a variable, then i change the html-content, and it is changed in the new variable as well. Here's the code: $(function(){ var editedTarget = null; var currentTargetValue = 0; $(".editable-target").click(function(){ editedTarget = $(this); $(this).css("padding","0"); console.log($(this).html());
Why can't I see source (with view source) when jquery loads external html into a div?
I got some code that loads divs from other web pages into a particular div in my main page. In other words, I click on a button, and this tells jquery to load a fragment of a particular page into my main page. For instance if I have 5 web pages on rock stars, I could have 5 buttons, and each button could load one rock star's biography into a div on the main page (and replace whatever was there before). This works, and I do see the content that it loaded. But when I do 'view source' in IE, I
Move a div with mouse position
Hi, Here is my testpage's url : http://www.itch.fr/test/ I wrote this little code in order to move a div into another one, with mouse position. But my code works only when mouse is moving, as I want it to make the move continue when the mouse is to the left or to the right of the middle of the user's window. Here is the code : $(document).ready(function(){ //Taille du div container divwidth = $("#book_container").width(); milieu = divwidth/2; positionX=0; pixels=0; css=0;
remove(), replaceWith(), replace() problems
I am working with a webapp that contains jqGrid and prettyPhoto plugins. First round with selecting a row from the grid which fills specified divs with information works correctly. Pics and animations play as intended. But if my user would select another size of munitions (clicking on another menu drop-down) which would create a new jqGrid with new data. This is where I am having problems. In my onSelectRow sequences of jqGrid, I check for the presence of children on a certain div. If children
Multiple file upload using jQuery
Hi ,This is Venkat.I am new to Jquery.My requrirement is multiple file upload using single element using Jquery.My project is struts based one and I am used Jquery in Jsp. and all files are uploded to server through action class.Please give me the solution to how to add ordered list to action in Jquery.Here is my code... <%@page import="java.util.ArrayList"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
Problem with $.Deferred "then" callback
Hello, I may have found an issue with the jQuery Deferred object (or maybe I'm just using it wrong ;)). It was my understanding the "then" callback should fire off no matter if the Deferred (dfd) object was resolved or rejected. However, it appears as if then will not fire off if it is rejected. Here is a jsFiddle example (open your console): http://jsfiddle.net/Mrqf8/479/ Thank you! Joel
Streaming Deferred
I am writing a library that wraps a web service api. The API returns paginated results-- i.e. I have to make an ajax call per page. I'd like to present my library's users with the partial results as they come in rather than waiting until the end, but I'd also like to give them a Promise representing the end of the stream of pages (or error). I could have the library take a callback argument as a parameter, and then feed updates to the callback, but use a Promise for completion. This seems ugly to
Jquery Stop Function
When you run a jquery function, generally, if you have it click on a button or link, and than do an animation, it runs the last command of the animation over and over again, after the initial function has been run all the way through once. I have tried to stop this by using the break; method, but soon found that wasn't supported, so I went ahead and used the return false; method, and still, it continues to run the last command. What I am trying to accomplish is when you click a button, it performs
serialize() question
I'm trying to follow some of the examples in JQIA2, and can't seem to get the serialize() method to work as expected. On page 257, the authors talk about using the load() function and coercing it to initiate a GET request by passing $(this).serialize() as the request parameter data. I'm trying to create my own function to do the same but serialize() doesn't seem to do anything. I've created a fiddle: http://jsfiddle.net/earachefl/rxyzu/7/ which, in the most basic form, just triggers an alert which
howto to put multiple form using same function??
hi, got a problem with this form that will be displayed on the same page for each product/item. However it does not work only if i use it only once. What do i need to change in order to make it work for each form. I do realize that is has to be unique. But what should be done in the Function: $(function() { $('.error').hide(); $(".button").click(function() { $('.error').hide(); var name = $("input#name").val(); if (name == "") { $("label#name_error").show();
Custom download
Hi, I am using just three components of jquery - Datepicker, Slider and Autocomplete. To download jquery to client machine i use google CDN which downloads two js files which takes time to download and most of the data are not useful for me as i am using only 3 widgets of jquery. I want to download only the part of jquery relevent to my 3 widgets. How should i acheive this?
Run script between certain time
Hi. I want to run a script at a certain time. The page is on a big screen all day and the page is up on the screen all the time. Between 7:00 and 17:00 I want the page to update, but I don't want the page to update outside the time. Here is the script: <script> $(document).ready(function() { $("#news").load("news.php"); var refreshId = setInterval(function() { $("#news").load('news.php'); }, 20000); }); </script> Can anyone help me with this or point
Loadin content from php page
Hi to all, Newbie here :) Well, i have a lagre php page containing a lot of divs. Some functions take a lot of time in order to retrieve from db and then produce the html to be placed inside certain divs. So what i want is to first load the page without loading the html that requires time, and after the page is loaded then produce the html. Its all in the same page, so i am bit confused. I know i have to deal with the $(document).ready(function() but how can i first load some divs and then after
jquery in external .js file
Hi there, i have a little problem, tried googling it but there are more questions about this than answers, and nothing that i found isn't working for me. Ok. I want to place jquery code into external file, tried this way. But after adding this, other jquery functions on my site stops working too. Let's say i want to use this code, and i put it in /js/main.js: <script> $(document).ready(function() { $("div#box1").mouseover(function () { $(this).animate({ "border-color": "#0c71b1" }, 500);}); $("div#box1").mouseout(function
I have problem with sending ajax request
Hello, I wrote a login form where on submit the user is supposed to logged in, but it is not working. please let me know where is the error is, This is the form <form id ="loginform_" action=""> <a href=""id="slidedownclose">X</a> <h2> Login Form</h2> Username:<input type="text" id="uname" name="user_name" /><br/><br/> Password:<input type="password" id="password"
Image scroller 'lagging' when using background-size
Hi, I am currently building a fullheight thumbnail scroller with thumbnails of 700px. However I want these thumbnails to stretch the full height of the container, hence I want to use this: #scroller li.cover a,#scroller li.cover a div{background-position:top center;background-repeat:no-repeat;background-size:cover;}However this makes the scroller really laggy, you can see it at: my website When I remove the background-size from the css property, the problem is solved. However I do still want to stretch
Loading a div and reLoading an other div + alert [Beginner]
Hi, this is my process : 1/ I display containing div, 2/ I click on containing div area 3/ containing div is removed 4/ containing2 div is displayed 5/ I click on containing2 div area 6/ I print alert "containingCL2" The problem is between step 5 and 6 because the alert is never printed. I guess jquery does not manage to detect the click event onto the containing div2 as this div is not native but generated. This is my HTML code <div id="container"> <div id="containing" class="containingCL"> Blabla
remove string from string
Hi, I am trying to remove a string from a string. Here is the string: username1, username2 and username3 like this post. I would like to remove username1 from this list. I tried adding the list to an array using .split(', ') but I got an error. Im assuming because not every word has a , after it. Any help is appreciated. Thanks
$.ajax, $.post, $.get - not working
Hi everyone! I'm pretty new to jQuery and while trying to use some AJAX in my .js files I get nothing. I have index.php which includes 3 files(jquery.js and jquery-1.5.min.js and json.js) from js folder at the same level with index.php I have saveXML.php file. All I need to do is to send some data from index.php(from a template wich loads there) to saveXML.php(which should create .xml file, but this is not important). My jQuery code is as follows: jQuery('#saveXML').click(function() { jQuerymarking
Disable click on table rows
I'm trying to disable the onclick event on a ASP.NET gridview that generates following HTML markup: <table id="GridViewPP" > <tr > <th scope="col">PP</th> </tr> <tr class="SelectedRow" onclick="javascript:__doPostBack('GridViewPP','Select$0')"> <td align="center">N</td> </tr> </table>I used the following code, but the mouse click would still postback, triggering the SelectedIndexChanged event on the server-side: $("table#GridViewPP tr").click(function(event) {
jquery interactive slideshow
Hello, I've a question about a thing I'd like to to realize with jquery. Below you can see the attached picture which shows you the thing i would like to realize with jquery.It is a interactive slider which should allow you to hover over a tab at the left side (after that the tab will expand and show some content maybe some links..)This expanded box should push the other tabs up (…If you hover over the first tab the box expands to the top --> no pushing of other tabs needed). If you hover over such
Next Page