I am using JQuery to append large amounts of text inside a tag. I find the more text currently within the tag the slower appending is, and for large amounts of text it is too slow.
Is there a more efficient way to append text? Such as for instance creating dummy child tags and setting the content of them rather than appending to the par...
HTML:
<a href="#">Show next element</a>
<div>content</div>
jQuery:
$('a').toggle(function () {
$(this).next().show();
},
function () {
$(this).next().hide();
});
How do I change the above jQuery so it also changes the "Show" in the link to "Hide" when the element is visible?
Thanks!
...
I need help with building page where information is entered on a form at the top of the page and then added to a grid below the form when the user clicks the "Add" button. The form will have drop-down boxes so the colums in the grid representing the selection should show the text of the drop-down and not the index/id. Once all data has b...
I want to convert html content as image, is it possible?
<div class='temp'>
<img class='tt'>
<div><img class='tt1' /></div>
</div>
I want to save whole div(class= 'temp') as a image with its content.
...
Hi guys.
I'm trying to create a function that will execute on a click, on the condition that a variable is set to 0;
However, the function will not execute, even if the variable is set to 0.
(I am using jquery)
var menuVisible = 0 ;
$('#links').click(function(){
if (menuVisible = 0)
{
$('#subMenu').show("slow") ;
...
Hello,
This is a simple jQuery code, what I want to do is hide #bling, but it does not
<script language="javascript">
$("document").ready(function() {
$('#bling').hide();
});
</script>
<div id="bling" style="background-color:#FFFF66; width:100px; height:100px;"></div>
Thanks
Dave
...
I'm trying to stop the default action when a link is clicked. Then I ask for confirmation and if confirmed I want to continue the event. How do I do this? I can stop the event but can't start it. Here's what I have so far:
$(document).ready(function(){
$(".del").click(function(event) {
event.preventDefault();
if (confirm('...
Hello,
Could you guys let me know what is wrong below, for some reason, when I click on the delete image, which is supposed to return the echo from dela.php file, but does not.
Thanks
Dave
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$('#del_form').ajaxForm({
target: '#del',
...
Hi All,
on click of a button I am changing window.location.href i.e. I am adding one query string parameter.This causes the page to be refreshed[as i am changing window.location.href].
I want to know is it possible to stop this page refresh and append the query string in the url?
...
I have tree-grid with autoloading nows. The goal is to sort the grid by tree column, right on client side.
But each time I click on sort column header, it issues ajax call for sorting – but all I need is on-place sorting using the local data.
Do I have incorrect grid parameters or tree doesn't work with client-side sorting on tree colu...
Hi,
I have noticed there is a difference in parameter orders between callback function of .each() and .grep() functions in jquery.
jQuery.grep( array, function(elementOfArray, indexInArray), [ invert ] )
jQuery.each( collection, callback(indexInArray, valueOfElement) )
Do you have any idea of the possible reasons that they preferred...
I get this error when I try and implement jSrollpane in Safari 4:
TypeError: Result of expression '$drag[0]' [undefined] is not an object.
Then i get this error when i try the same thing in Chrome:
Uncaught TypeError: Cannot read property 'offsetHeight' of undefined
But why? it works fine in FF.
Any ideas?
...
Hi,
I have a page with a few hidden fields in it. Those get filled with values by a script (JS/jQuery) when the user has finished selecting a couple of options.
Now, if I click a link on that page, go to the linked page and then hit the back-button, FF and Safari are able to read out the values of the hidden fields. So the function to ...
I can't seem to drag an element into sortable list that has initial state as hidden (ie. display:none).
Each row's html looks like this:
<div class="dragbox" id="item1" >
<h2>Expression 1<span id="exp1"></span></h2>
<div class="dragbox-content" >
<ul class="dragrow1"></ul>
<ul class="dragrow2"></ul>
</div>
</div>
But in...
Hey all,
I expect this is a newbie question despite smashing my head against the YUI documentation.
I have a page with a YUI Simple Editor (called 'myEditor'). It hooks to a text area called 'posttext'. New editing is fine, but the problem I am solving right now involves the user clicking on one or more existing elements, and putting...
The question that I am posting here is somewhat similar to question posted here but I am trying to set the properties upon the completion of ajax request.
The page displays all the feedbacks in 'ul li', each feedback has two voting elements 'voteup' and 'votedown'
Now when the user clicks voteup element the vote is recorded using jque...
hello i have this code
<ul>
<li id="1">
<li id="2">
<li id="3">
<li id="4">
<li id="5">
<li id="6">
<li id="7">
</ul>
i want to make a function that foreach time the function is called the first li at the top will be the last one so the first example will look like this
<ul>
<li id="2">
<li id="3">
<li id="4">
<li id="5">
<li id="6...
Do we need to change anything in main jquery library ever to use jquery noconflict?
...
normally we use something like this to identify Id using jquery
$("#PhotoId").html('some html');
here we get the html (say div) having id 'PhotoId'
what if the id is partially dynamic i.e.
lets say there are multiple photoes
each id would start with 'PhotoId'
EX.
$("#PhotoId" + result.Id).html(some html');
NOW,
i want to identi...
Hi All,
I am stuck with a problem here, please help. What my requirement is to get the index value of the div clicked. Have 2 lists, and i need to call a function doSomething(); only when the user clicks the first div set. Is there anyway that i can achieve it.
The scripts and HTML is as follows
$(document).ready(function() {
$(".lis...