i have an array of numbers
var projects = [ 645,629,648 ];
and a number 645
i need to get the next(629) and prev(648) numbers?
can i do it with jquery?
Hi to all.
I'm searching for a trip in jQuery for changing the background-image of the body (or of a 100%-height "wrapper" div) on a click event of a class element, with a cross-fade transition effect.
Is it possible?
Thank you in advance.
I've tried many jQuery twitter feed plugins and they all seem to suffer from the same problem. Nothing loads for unless I refresh several times and then it will load once. I then need to refresh several more times before it loads again.
Is there some sort of limitation on Twitters side or does this only happen to me?
Example - This is the test site but it is basically ready to go live except for this issue.
<span>
<img src="img/icon.png" alt="" />
<label><input type="radio" name="" /> Label here</label>
</span>
I want the whole <span> to be clickable, not just the radio input. How do I do it with jQuery?
I am in need of some help with trying to figure out how to go about checking the users session and seeing if they are still logged in or not.
The problem being is because i have a static page that pretty much loads everything into "tabs" using jquery. So when the user navigates the page, it really never leaves that same page they started out on. Hints my problem in trying to determine if they are still logged in or not when they click on update their information on their profile or whatnot.
Using jquery's $.ajax function, I'm not able to parse the results. For example, I used it like this
$.ajax({
url : "http://api.twitter.com/1/users/show.json?screen_name=techcrunch",
dataType : "json",
success : function(data)
{
// parse the JSON here
},
error : function()
{
alert("Failure!");
},
});
This doesn't work. Do I need a callback function?
Is there any way to reorder or manipulate a set of inputs before posting to a script for processing?
I'm able to reorder the elements in the DOM no problem, but getting this to happen after the user presses the submit button and before the browser makes the POST is a bit tricky. I'm using the ajaxForm plugin in jQuery. There is a beforeSubmit callback, but this doesn't seem to allow me to reorded the inputs.
I am using asp.net mvc and jquery to make ajax requests and when the session times out after an ajax request the full sigin page gets loaded into my ajax div.
How can I display a modal popup instead of making a redirect when a session times out?
I want to get the object of this code ,
<input class="radio"
id="conversation_sub_kind_id_208"
name="conversation[sub_kind_id]"
onclick="set_department_name('department_name208')"
type="radio"
value="208" />
I want to use jQuery Framework to get the object, like the document.getElementbyTagName("conv..."); what should i do in here?
Thank you, and best regards!
I've looked at free javascript html editors, and I haven't found any that I feel handle links intuitively. I like the way the gmail editor does it (also the same way blogger.com) does it.
Does anyone know if there is an open source editor that handles linking that way? Jquery would be preferable.
I load jquery into my greasemonkey script and when the user clicks the start button the script makes a bunch of ajax calls. I then empty body and append data. When i click on something and hit back instead of getting the page post script i lose all the data and need to run the ajax calls again (it can take seconds to run). How do i make it not lose the changes?
I'm trying to display an map inside an iframe that has a needle which on mouseover shows some information about a certain company, the thing is once you click the link the page opens up inside the iframe which ruins the experience, so i was wondering is it possible to make the links inside an iframe open up in a new window instead perhaps using jquery or something similiar?
the code i have atm is
http://www.jsfiddle.net/rkd59/1/
Is it possible to do this:
myfile.js:
function foo() {
alert(<my-function-name>);
// pops-up "foo"
// or even better: "myfile.js : foo"
}
I've got the dojo and jquery frameworks in my stack, so if either of those make it easier, they're available.
There is an annoying website out there that foils attempts to "open in new tab" by using <div onclick=> instead of <a href=>. I've written a bookmarklet, using jQuery, that creates a wrapper <a> tag and inserts it within the <div> around its content.
How can I remove the original onclick handler?
I am having trouble understanding the meaning and more importantly the concept of an object as it relates to jQuery. I understand the basics that its a collection of data that comes in two forms, properties and methods but I kind of get lost on how it works beyond that. Can anyone point me to some good tutorials that maybe helped you understand? I'm hoping to "Get it" once and for all.
Many many thanks for your help! =]
For example in the jQuery documentation I find both JSON and JSONP mentioned. What is the difference exactly? How can I see which is which? Which one should be used for what?
And what does the PHP function json_encode generate?
Hi,
General javascript question here, which would also be good to know how(if possible) to do in jquery.
Can you trigger a click event when hovering over an item?
I know there will be people asking why, but please just humour me.
Many thanks,
C
Hi everyone,
I'm looking to find the Javascript Event I need to put into jQuery's .bind function in order to have the function triggered when a selection is made from a <select> element.
At the moment I'm using .bind('change',function() { ...}) but I need the event to trigger when the selected option is chosen again.
Any suggestions?
In my page if the text of a Label has been Changed I need to fire some function using JQuery as .Change() is restricted to only <input> and <select> I use a function like
$("#ctl00_ContentPlaceHolder1_lblMsg").html("Duplicate record can't be saved.")
.trigger('labelchanged')
$("#ctl00_ContentPlaceHolder1_lblMsg").on('labelchanged', function () {
alert('changed!');
}
});
but the above function is not triggered when the text of the label has been changed kindly anyone point me what could be I am missing in the above function
i have an html page where i have a table of items (one item per row) where each item is a html link that says "Add" and there is a textbox next to each link with a number in it.
the text link and the textbox are in the same td inside the row of the table.
how do i, using jquery, capture the value from the textbox that is to the right of the link i click on.
I want to detect the presence of a scroll bar in a DIV using jQuery. I was thinking to use $('div').scrollTop() but that returns 0 in both cases when the scroll bar is at the top and when there is no scroll bar at all.
Any ideas guys?
i have a question.
I need to detect using javacript (or JQuery) when a div is contained inside another and when is not contained anymore.
I need something like this:
if(div #result).contains (div #dbResults) then{#explainMsg.hide, #errorMsg.hide;
if(div #result).not contains (div #dbResults) anymore then {#errorMsg.show}.
the "not contains anymore" part is because the div's are added dynamically server side.
Obliviously is not the code, but what i need to obtain.
thanks
I have inlcuded a JQuery Lightbox plugin on my first site and for some reason it is not showing the gallery images on click. the first one works but the others are blank.
I built the site in Dreamweaver and it worked fine in testing on Safari and Firefox but the live version isn't playing ball.
Any suggestions.
I'm looking for a way to trigger for a different function on each individual image. I'm using the Galleria Jquery plugin and have it set up on my site. The problem is i want to display a div with information depending on which image is loaded. I can't figure out how to capture which image is displayed and how to create a condition based on it.
Hi,
I'd like to monitor my textarea's changes with jQuery. I can do this with the keyup event and it works perfectly. But what event I can get when a user click on the textarea (right mouse click), then choose paste?
Click event occur only when the user click with the left mouse button on the textarea.
How can I handle this situation?