I have the following HTML:
...
<div id="panel">
<div class="abc">
<p class="xyz">Hello</p>
</div>
</div>
...
Question: What's the fastest way with JQuery for me to access the p.xyz element? I've read some performance reviews but they don't account for all different scenarios.
I could do the following, but don't know h...
I'm using jQuery.append() to add some elements dynamically.
Is there any way to get a jQuery collection or array of these newly inserted elements?
So I want to do this:
$("#myDiv").append(newHtml);
var newElementsAppended = // answer to the question I'm asking
newElementsAppended.effects("highlight", {}, 2000);
Thanks
...
There is a huge number of jQuery modal box plugins out there. Jitter lists 20 of them in this response (http://stackoverflow.com/questions/1656086/modal-windows-plugin-to-rails#1656105).
Which one do you use and why? If you use different ones in different cases, how can they be broken down categorically by use-case?
...
I have the following HTML:
<ul id="tabs">
<li><a href="...">One</a></li>
<li><a href="...">Two</a></li>
<li><a href="...">Three</a></li>
</ul>
I want to perform a unique action when someone clicks on each of the links.
I tried the following and it did not work
$("#tabs li").eq(1).live('click',function(){alert('ONE....');...
I'm trying to append a strings which end in newlines to a textarea using jQuery. However, different newline tokens show different behavior in Firefox3.5 and IE8, and I can't seem to find a way to use something that works for both browsers.
\n works in FF but not in IE
<br/> and \r\n work in IE but not in
FF
No luck using <pre></pre> ta...
So on our site we currently have a textarea for commenting on certain items. The site uses AJAX so the user can press the button and see their message fade in (Imagine a Facebook style commenting.)
The jQuery/AJAX:
$(function() {
$("input#comment_submit").click(function() {
var comment = $("#comment_box").val();
var dataString = 'comme...
Hello,
I have implemented lightbox-plugin for jQuery of krewenki in a masterpage including all images. This was working fine.
Till i put the images in a external page and load this external images page in the master document. Lightbox does not work anymore. Is this jQuery code fault, or is this a lightbox-plugin problem?
Main-html
<h...
I'm with trouble with a jquery plugin i've quickly playing around.
Its fades in when a start handle event of ajax is called and stops with complete handle.
Exemple:
start : function (e,o) {
target.mask();
target.showMaskAjax();
},
complete : function (e,o) {
target.hideMaskAjax();....
},
The question is..when I fire 2 ...
The code is:
<a href="#" style="color:black" onClick="Record($id)">Done</a>
I want this part becomes unclickable once if it is clicked, how to achieve this using Jquery or Javascript?
...
is it possible to get the width of the different tabs with different lengths of text inside?
for instance
| tab 1 | motion sickness | computer |
the tab 1 = 20px
motion sickness tab = 100px
computer tab = 60px
something like that
...
Hi,
Facing one major problem related to cache.
I have User Creation form in that , if i put value which is already used in textfield then it does not shows "Check Availability" hyper link. but if i put new text then it show hyper link on change of textfield value event.
Code is written in Jquery. I think it's issue of data cache .What...
Hi,
I have a web page with lengthy contents. I just want to put some message at the bottom of the browser window and this message should always be visible even if you scroll down the page.
can you guys tell me how to go that with simple css, html, jquery or in PHP
thanks
...
EDIT:
Thanks guys - perfect! I wish I could check more than one answer, since you both gave me the right answer. Quick response!
I have the following jQuery function:
$(document).ready(function(){
$('#login_btn').click(function(){
$("#message").text("button was pushed");
});
});
It works - the text of the me...
I've got a PHP page, with FedEx & UPS tracking numbers in a MySQL database echoing into ID's of DIVs with the class "trackingnumber". My JS each's through those divs and grabs the ID to then post to a PHP page that polls Fedex/UPS and echos the result from them. That works great, except for one thing. It randomly deletes the data after i...
I've tried a few ways but nothing seems to work. What I'd like to do is have my users post video's with the given embed code (example):
<object id="cnbcplayer" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="380" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">...
I have used jquery plugin for photo upload an validation of field in codeigniter it works my local server fine but when i upload it then it does not work. (I saw phpinfo() jqueryenable server). There is no problem with the url link of jquery its getting fine but not working how can i solve it?
link is http://www.bdshop247.com/StoneBollar...
Hi,
I want to break my <ul> into multiple <ul> tags, I have 10 <li> in my <ul> and I want to break into 2 <ul> (5 <li> each). To do the same, I am taking 5th <li> and appending </ul><ul> using $(this).after().
But Jquery automatically reverse the text and auto close the <ul>.
Any Idea how to disable to auto close?
Cheers,
Felix
...
Greetings,
I'm trying to think of a way to use an accordion widget (which I'm currently using, h3 is the trigger) that when an h3 is selected another div appears, then when a different h3 is selected, a new div appears and the other disappears and so on.
so I have a three column layout, left column is my accordion widget, when the...
Hi there, i have three div's on a page with same ID's
<div id="downloaded">1200</div>
Now when i call the function downloadThis("filename","divID"); i want that the value of every div with id "Downloaded" should change, i am using jquery. Kindly help.
...
Hello.
Is it possible to detect what width a browser window is and hide an element on page if its lower than 1024?
In JQuery perhaps? :-)
...