I have a div with a scrollbar on the right when there is a lot of text in it. I tried to use this code to scroll to the bottom of a div when the page loads, but I am not having much luck. How can it be achieved?
Style:
div.messageScrollArea{width:100%; max-height:300px; overflow:auto;}
JavaScript code:
$(document).ready(function () ...
Why would when using this code in one place set the default as it should but not when moving first two statements into Master file and the last one into View file (ASP.NET MVC app)?
$(function () {
$(".editDate").datepicker({ dateFormat: 'dd.mm.yy' });
$(".editDate").datepicker($.datepicker.regional['sl']);
$("#IssueDate").datepicker('s...
I've made a jquery/ajax function that updates #courses, sending #fos's .val() and .text(), specifically of the one that is selected, like so:
$('#selling #fos').change(function() {
$.post('/ajax/courses',
{
fos_id: $('#selling #fos').val(),
name: $('#selling #fos :selected').text()
},
func...
I am using this jQuery countdown plugin here and it seems pretty straightforward but i must be missing something. Here is my code
$(document).ready(function(){
var austDay = new Date();
console.log(austDay.getFullYear() + 1);
austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26);
$('#countdown').countdown({until: au...
I am loading HTML page through ajax and then doing a bunch of searches using selectors:
$.ajax({
...
dataType: "html",
success: function(html) {
$("#id1", html);
$(".class", html);
//...
}
}
Should I extract $(html) into a variable and use it as a content, or it doesn't matter (from performance ...
My question is pretty much as the title suggests, I have a message board which constantly expands and pushes messages down when new ones are added. I want to be able to lock the scroll to a message for example so the page scroll bar moves when the message board extends to keep the same view of messages that you had initially. Is this pos...
Anyone know the proper syntax to write this statement?
$('.nav ul li')[0].children("a")
For some reason this is not working. The return is that its not a function. :(
...
I have almost solved a huge problem with png files and transparency in IE browsers on my website.
The problem is that only in IE6, this wont work.
I have this code called unitpngfix.js which displays transparent PNG images correctly on my website in IE browsers.
I have a DIV with a png image inside it like this:
<div id="pop" class="...
I'm using jQuery to write things like this:
$('#current_image').fadeOut(function(){
$('#current_image').attr('src',newImage).show();
});
This is lovely, once the fadeOut has completed, the nested bit executes.
I'd like to make my own function here that would replace fadeOut. What would my function look like so that th...
I am in the process of building a video sharing CMS that uses lots of jQuery and ajax for everything from rich UI effects to submitting and retrieving data to and from the database. When JavaScript is disabled it everything falls apart and 90% of the functionality doesn't work.
I am beginning to think its ok to not degrade gracefully fo...
I have a jquery ui dialog popup, and then inside are buttons to show/hide content. If one button is clicked, when the content expands... I simply call:
var position = $(selector).dialog( "option", "position" );
$(selector).dialog( "option", "position", 'center' );
To recenter the dialog on the screen.
The problem or question I have ...
I have this link that creates a few div's in which a form is loaded via load().
This form is in a separate php file. Now i want to use the ID value of my link to set the value of an input field, but how?
I know i need live() for that, but the setting of the value should be automatically, and not after an event.
It's a situation like be...
Hi,
i have this links:
<a id = "link_1" href = "#">Cars</a>
<a id = "link_2" href = "#">Colors</a>
<a id = "link_3" href = "#">Users</a>
<a id = "link_4" href = "#">News</a>
how to get the ID numbers on which I click?
For examples i push on link Cars, and i wish get 1, push on Users, get number 3.
Thanks
...
I've always used fancybox before but now it keeps saying it isn't a function and of course my links to the images don't show up in the lightbox like it should. Here is some source:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script src="http://code.jquery...
I usually go to the news of the story expanded, passes the variable with a while, as follows:
while ($noticias = @mysql_fetch_array($sql)) {
$sqll = mysql_query("SELECT * FROM categorias WHERE id='".$noticias['categoria']."'");
$datos = mysql_fetch_array($sqll);
<div class="leermas">[COLOR="red"]<a href="noticias.php?n='.$noticias['id']...
I'd like to use a jQuery Modal Dialog of some kind to present 4 or 5 options on a form to a user. When the user clicks Save, the dialogue would validate and then window.location.href somewhere else using values from the form in the arguments.
I can't find a good example of doing this; almost every sample is Ajax...
...
I'm working on an old site and i would avoid searching&replacing and i was wondering if it is possible to reaplce all alert massages function
alert('some msg');
with a jquery modal window...
i'm not asking how to do the modal window but if i can create a protoype to replace the function alert..
thanks
...
For context, this is a followup to an earlier question. Rather than digging through cssRules, I'd like to base the logic on jQuery selectors that search for the effects of those rules.
Given default properties of
.commentarea .author:before {
background-image: url(http://...);
background-position: -9999px -9999px;
/* ... */...
Fist all...i am not sure PROGRESS BAR is the appropriate word to describe what i actually want..but for lack of a more apt word, i am stuck with it :(
This is what i need.
I am working on an Application in which users of the application, depending on how they interact with the application, and the level of activity they get to earn poi...
I'm using serialize in .post request and it looks like this
$.post(this.action, $(this).serialize(), null, "script");
In the form there is a textarea with the name 'comment'. The problem is that when I put first string in double quotes, followed by end line and then some text server recieves only first string without quotes. For i...