I have the following which i use in a traditional onclick event for a DIV tag
How would I go about implementing this using jquery?
$parameter = "onClick=\"selprice('" .
$price_options_array[$price_counter]['price'] . "','" .
$price_counter . "')" . "\"";
I use the above and just add it to my div like so:
<div class="price_row" <...
(CrossSlide)
(LightBox)
This is my header:
<script type="text/javascript" src="<?php echo ROOT.'sources/js/jquery.js'; ?>"></script>
<script type="text/javascript" src="<?php echo ROOT.'sources/js/contentSlider/jquery.cross-slide.js'; ?>"></script>
<link rel="stylesheet" href="<?php echo ROOT.'sources/css/lightbox.css'; ?>" type="text...
I am using YUI reset and jquery AutoGrow together on the same site. It works fine on firefox, but IE 7 behaves badly. The textarea grows way to big with even a small amount of text in it.
Below is an example that demonstrates the problem. If I comment out the reset stylesheet, the autogrow behaves properly.
I am hoping there is some si...
Well I'm having some really weird trouble, this is what happens:
This is the environment:
I have a modal panel that has to be able to hold several "steps", first you have to upload a file, then the file is processed and from this processing result, I have to generate some html to fill the next step.
This is what I do:
I'm uploading a ...
When using jQuery UI draggables and droppables, how do you change the dragged-and-dropped element on drop? I am trying to drag one DIV to another sortable DIV. On drop, I'd like to change the classes on the dropped DIV and change its innerHTML content.
After reading various StackOverflow questions, my code looks like this:
$(".column")...
I have a jQuery modal system that I have built and would like to trigger the modal to popup if the username or password entered by a user is invalid. I need to do these checks from the C# codebehind in ASP, and then if there is an invalid username or password trigger my javascript function: showModal("errorDiv").
Is this possible?
I do...
I have a situation where I'm appending a node inside an element and would like a reference to it right away.
At the moment I do something along these lines:
var children = $("#elem").append("<p>hello</p>").children();
var current = children[children.length -1]
Can this be done more cleanly with jQuery?
I know, I can write a helper...
Hello everybody.
I am very new to the JavaScript, and making only my first attempts to learn.
As a small exercise I am trying to so something simple.
Pretty much I am trying to reposition button that i have on page load.
What do i do wrong?
I would appreciate some help.
My code is bellow:
<style type="text/css">
.mybutton{
position:a...
What does it mean if fadeIn() goes from an opacity of 0% to 100% as soon as the fade timeperiod is up?
I've got this:
function ThreadPost(post, appendToElementId) {
if (post != null) {
$("#" + appendToElementId).append("<ol id='" + post.Id + "'></ol>");
$("#" + post.Id).hide().html(PostHtml(post)).fadeIn(5000);
...
Here is my code that sends a form via AJAX and then is meant to display a message back to the user
var postValues = {
name: $($nameObject).val(),
email: $($emailObject).val(),
message: $($messageObject).val(),
form: $(this).find('input[name=form]').val()
};
...
Possible Duplicates:
JavaScript query string
get querystring with jQuery
Is there an object/method in javascript to turn a string like this: "param1=2¶m2=1¶m3=5" into some sort of dictionary, so that I can refer to each element as mystring['param1'] or mystring[0]?
Can jQuery help here?
...
I have a bunch of HTML markup coming from an external source, and it is mainly h3 elements and ul elements.
I want to have the content flow in 3 columns. I know there is something coming in CSS3, but what options do I have to get this content to flow nicely into the 3 columns at the time being? I'm not that concerned about IE6 (as long ...
My CMS renders out the navigation as a UL. I want to take that UL and use only part of it for a side nav. What I'm trying to do is remove the parent UL and show only the nested UL that has the child pages. Here's an example
<ul id="mainnav">
<li> Main Nav 1 </li>
<li> Main Nav 2
<ul id="subnav1">
<li> Sub Nav 1 </li>
<li>...
Hello,
I am building a small apps which has to capture mouse click. I wrote the prototype in jquery.
Since it is a small apps focusing on speed, embedding jquery.js to use just one function would be an overkill.
I am not very experienced in pure javascript, would you show me some hints on writing pure javascript code to serve this fun...
Guys,
I want to create some text based on user input, and when user enter some text, the first word will automatically set backgroundcolor, but the other words still remain same (no background color), can I do this ?
Thanks
...
I'm using the jQuery autocomplete plugin which works great,i have a small question, if a user begins typing in one field where the autocomplete is attached to, but then while the suggest is still showing they move to another input field which is also attached to autocomplete, the first input field does not show suggestions.
Are there an...
Submitting an Ajax.Beginform while using the JQuery Validate plugin doesn't stop the submission. Is there a good way to ensure the Ajax.Beginform is not submitted?
I've also tried using the JQuery Forms plugin to 'ajaxify' my form. This works a treat. However, my form is a login form and if the user successfully logs in, I'd like the...
I'm trying to dynamically change the cursor style when the mouse is over an element. The cursor should be either "move" or "default" depending on a boolean returned by a method.
The code is something like this:
$("#elemId").mousemove(function(event) {
if(cursorShouldBeMove()) {
$(this).css({'cursor':'move'});
} else {
...
Hi,
I have a code below in my aspx page:
<div id="FormContainer">
<div id="leftSection">
<h1>
Contact Us</h1>
<div id="intro">
<p>
Contact PLI</p>
<p>
&n...
Hi, i'm new to jquery and I like to know how to do the following:
1) Dynamically create tabs with iFrame inside
2) ability to remove tabs on the fly without postback
3) tabs are unlimited and can shrink depending on the length of the browser
Sorry if this may be too much to ask, but i'd like to learn how to do this. A perfect example...