I seem to have an issue when creating copies of a template and tying the .click() method to them properly. Take the following javascript for example:
function TestMethod() {
var test = Array();
test[0] = 0;
test[1] = 1;
test[2] = 2;
// Insert link into the page
$("#test_div").html("<a href=\"#\"></a><br>");
...
Why doesn't this work in jQuery 1.4.2?
var $list = $([]);
for(var i=0; i<50; i++) {
$list.add( $('<div/>', { id: 'jake', class: 'test' }).data('test', { hi: 'hello' }) );
}
alert($list.size()); // 0
Thanks!
...
I want to make my component faster, I am using Javascript and JQuery to build that.
I am using JSON object to communicate with component and back-end is python.
Is there any suggestion to make component faster?
...
Hi
I am using a CKEditor in a Jquery Dialog... and in Safari the first time it loads it works but each subsequent time it is blank and no buttons or anything else works in the ckeditor...
I have looked at http://stackoverflow.com/questions/2539855/ckeditor-instance-in-a-jquery-dialog and added the suggested dialog-patch.js but it does...
For example if I wanted to select some elements with a certain class using jQuery, and for that reason only, is it always expected that those classes SHOULD be defined in the css?.
<div class="xyz">
something
</div>
<div class="xyz">
something else
</div>
//with example jQuery
$(".xyz").hide();
//is it wrong no element 'xyz' is defin...
I am using this plugin in wordpress
http://www.iwebix.de/front-slider-wordpress-plugin-demo/
As you can see in the demo above, the left and right arrow buttons are the controls for scrolling the thumbnails and the event is onmouseover and onmouseout.
I don't know how to change this to onclick instead so that the thumbnails will scroll...
$().ready(function () {
$('#remove').click(function () {
return !$('#FeatureLists option:selected').remove();
});
$("#add").click(function () {
var vals = $("#txtaddfeature").val();
if (vals != '')
$("#FeatureLists").prepend("<option value=" + vals + " selected='selected'>" + vals +...
Hi everybody.
i'm using jquery 1.3.2, and have a problem in situatsuin where i fill select via getJson
html :
<div id="dialDiv">
<select id="select_elem" name="select_elem" style="font-size: 1.4em; line-height: 1em; font-weight: bold; color: #333;">
<input type="button" name="lock" id="lock" value="Lock" onclick="LockTime();" ...
if i have a text field like this:
<input type="text" name="quantity" id="txtquantity">
what i am trying to figure out is how can i grab the value of that text field and append it to a link like this:
index.php?quantity=(the value)
if this is done with jquery how would i do it?
...
Hello,
How can I pass a large HTML tag data to my PHP using jQuery AJAX? When I'm receiving the result it is wrong.
Thanks in advance.
Cheers,
Mark
jQuery AJAX code:
$('#saveButton').click(function() {
// do AJAX and store tree structure to a PHP array
//(to be saved later in database)
var treeInnerHTML = $(...
I have multiple image galleries that use the following code (simply view the demo at the following link).
However, when one clicks on the thumbnails of one gallery to change the large image preview - all the galleries change automatically to that large preview as well.
In short, the question is:
"How do I seperate each gallery from ea...
I have a bunch of elements like this:
<div></div>
<span></span>
<table></table>
<div></div>
<span></span>
<div></div>
I need to check whether or not there's a table element in between the divs, and if so do something.
$('div').each(function () {
if ($(this).nextUntil('div').include('table')) {
$(this).addClass('got-a-table');
...
I am using ASP.NET MVC with jquery. I have the following MVC Action that returns a partial page on Success. On Application Error, I am not sure what to send it for correctly handling it at the client side.
public ActionResult LoadFilterSet(int filterSetId)
{
try
{
BreadCrumbManager bcManag...
Hey,
I have a table where the first td in the trs contains a link. I want this anchor to be triggered (clicked) no matter where i click in the containing tr.
I have read and tried alot of recents post and suggentions on this topic but i can't get this to work. I tried the trigger() and triggerHandle() functions, but it does not trigge...
Can't find a simple solution to this, I know it's easy and I've tried a few things but I can't quite get it to work. I'm currently working with a sidescrolling site and I want every time you click an image (contained in an li) it scrolls to the next li. I have jQuery plugin localscroll so it smoothly goes from one to the next, and that's...
first of all what is $('#gallery').gallerrax do?
is it anything to do with css. Else how can we use css tags in jquery?
...
Is jQuery's .load() supposed to be able to load <form> elements? Because it seems to be stripping them out. So I have some code like:
$('<div></div>').load($link.attr('href') + ' #divDlgContent', function(){ ... });
and when the $dialogcontents loads, I return some content with a <form> inside the DIV with the id 'divDlgContent'. A...
Hi ,
I am trying to change the value of an input depending on selection from a combo box, so is user selects "Yes" from combo box the input should contain "test" value and than
if user selects "No" the input should be empty , "test" value remove from it.
I tryed to do it runing the following code:
<h:inputText id="myInput" value="aaa"...
Hi, I am having a bit of trouble working out when an image has been loaded.
I have been told that the following function will work but it isn't doing anything.
$("#photos img:first").load(function (){
alert("Image loaded!");
});
There are no error's in my code. Everything else in my script works great.
My HTML looks like this.
...
Ok, let me try to clearly explain what I'm attempting to accomplish here.
Basically, I have a site that is using a liberal dose of jquery to retrieve partialviews into a consolidated 'single view'. So far so good - it all works great and is very performant.
However, I would like to have the ability to 'flag' (using a button) any such ...