Hi,
in my blog some articles are very long. So I want the long articles to be collapsed when the page is loaded. It works for me for just one article but if I have more articles something seems to be broken.
Here's how I do it:
$('div#ttoggle').hide();
$('#btoggle').click( function() {
if($('div#btoggle p').text() == 'expand artic...
I get a textarea with a keyup function attached. When the user type something, I want this text to be rendered inside the blockquote tag. bloquote css is set towhite-space: pre-wrap;. In this way it take into account the newline. The problem now is that bloquote doesn't care of max-height property(200px). If itype in the textarea enter k...
Hello All,
I need help with displaying images from a MySQL database.
What I have is a an Dynamic PHP/HTML table that has multiple pages with a pagination link.
The table layout is: Book Title, Author, Publisher, Category and image.
I can connect to database with connection script - working OK.
I can see all the information for the table ...
I have made a generic function to show jQuery dialogs in my app. this function simply
Set the dialog title
make an ajax call to a server side function and populate the dialog with the html returned
open the dialog
Here is the function:
function loadDialog(action, id, title, onCloseHandler) {
$("#__gsl_DialogPanel").dialog("optio...
The following works as expected:
$(".foo").first().text("hi!")
...because first() returns a jQuery object.
However, if I want to work with the text() method for all matches, I need to do:
$(".foo").each( function(idx, obj) {
$(obj).text("hi!")
}
)
...because each() gives you DOM objects.
What is the design reason behind this ...
I currently use CKEditor on my website, however not every time users access the page CKEditor is needed. The flow is the following: user enters the page and see all the articles there; if users wants to edit the article he ou she opens editor and does that. Cureently CKEditor is loaded in the hidden div and not used 60% of time. Is there...
I'm trying to render a table of items that will be themeable using jquery ui css framework. I don't need a powerful grid like the jquery grid plugin, just make it themeable with themeroller. Here's what I tried so far:
<table class="ui-widget">
<thead class="ui-widget-header ui-widget-top">
<tr>
<th>Col 1</td>
...
Ok so i have an application that i use this jquery
$("#band_events").load("/load_events/"+ escape($('#request_artist').val()), successCallback );
It works great but if #request_artist is R.E.M. or somehthing with decimals or something weird rails has problems like
ActionController::RoutingError (No route matches "/load_events/R.E.M....
I have four divs with custom Attributes like:
<div marker="A">A1</div>
<div marker="A">A2</div>
<div marker="B">A3</div>
<div marker="B">A4</div>
Now I would like to use jquery to make each div drag- and drop-able.
Now when a user drags e.g. div A1 on div A2 (vice-verca would alos be possible), it shall compare the marker attribute an...
I'm calling this function but I need to slideup the parent div of the link that was clicked.
This function is called from a normal link:
function close(){
$(this).slideUp('slow', function() {
});
}
How do i reference the element that was clicked (link), then get it's grandparent?
I want to slideup not this links parent div, ...
I have a div with a form in it. After a user submits the form, I want to load new content into the div, replacing the form.
The new content will be static.
Do I need AJAX for this?
...
Hi Gang,
http://www.thebraproject.com/collection
If you slide the clothesline backwards every third item stops dead without completing the elastic animation. Can anyone see why that might be happening?
I'm using the AnythingSlider for jQuery to make it work.
Any input would be most welcome. Thanks!
...
I have just finished my new portfolio site visible at http://www.pepkarsten.com/artdirection.
It is a single page that loads images (with loader animation, preloading and keyboard shortcuts).
Here is the JavaScript code (using jQuery). How can it be optimized?
$(document).ready(function() {
function page(slide,width,height,color) ...
I can't figure out how to reset input fields that appear on a dialog box, after they've been submitted once already. Basically the jist of the problem is this:
I have a button on a page that triggers a dialog box. The dialog box contains 3 input fields and submit button. I fill in data and submit the form. That submit button trigger...
I have two datepickers where the user makes a selection. Then for each day in the selected interval I add an input textbox. I'm struggeling to get the jQuery Validate plugin working for the generated textboxes. It seems like if only the first is being validated.
When the page is loaded I add a custom validate method and set up the form ...
I have a page with lots of images on it, and only want to load extra images on demand. IE if the user clicks on it or mouses over, whatever. Most if not all of the sliders i've seen use the hidden attribute with all the elements getting loaded at once, which would cause undue burden in my case.
I liked: http://nivo.dev7studios.com/ ...
Hi to all,
I want to draw inside the DOM squared Divs, clicking a random point in the viewport then moving the mouse with this effect...
http://www.vegabit.com/test/example_create_div_on_mouse_move.jpg
in jQuery... and without any plugin...
Thank You in advance!
Max
...
Hi
I have two image elements:
<img src="/image1.gif" id="id1" /><img src="/image2.gif" id="id2" />
I'm trying to create a continuous loop in jQuery whereby image1.gif is shown for 1 second, then disappears and image2.gif is shown for 1 second and so on, alternating for N seconds.
I've just about hit a wall with it.
Has anyone got ...
There are more than 30 lists tags. When I hover over one of them, I want to keep the opacity of this li, and dim out or decrease opacity to 0.4.
I made following code. But I have two problmes.
When I hover over it repeats again and again like a broken accordion.
How to fix this problem?
Since I am changing opacity of all li, the...
Hoping someone can help. I need to grab any text node inside the body. Even if it is NOT contained within any other element.
I've tried:
$("p, div, html, body").each(function(){
$(this).contents().filter(function() {
var regExText = /(\w|\d|,|;|&)/;
if (this.nodeType == 3 ...