I'm using anchors for dealing with unique urls for an ajaxy website. However, I want to reload the content when the user hits the Browser's "back" button so the contents always matches the url.
How can I achieve this? Is there a jQuery event triggering when user clicks "Back"?
...
I have two native JavaScript objects:
var foo = { hello: 'world', holy: { shit: 'batman' } };
var bar = { ... };
I would like to compare the two (foo == bar).
...
I would like to detect when a specific HTML element on the page becomes hidden. This usually happens due to a parent element (maybe few levels up) becoming hidden. Is there a simple way to detect this. Or do I need to traverse the DOM and check each parent?
...
Hello,
I am new to jsTree and am having problems with a very simple example.
My html:
<ul id='categories'>
<li><a href"/Browse/1">Category 1</a>
<ul>
<li><a href="/Browse/3">Subcategory 1.1</a></li>
</ul>
</li>
<li><a href="/Browse/2">Category 2</a>
<ul>
<li><a href="/Browse/...
I'm using some basic jQuery at http://s329880999.onlinehome.us/ and I'm getting a "not implemented" error in Internet Explorer. I'm guessing that this is to do with my using top (var s2). How can I make it work in IE?
...
for example I call it via newDialog("This is title !", "this is my content");
function newDialog(mytitle, mycontent){
var $dialog = $('<div id="mydialog"></div>')
.html(mycontent)
.dialog({
autoOpen: false,
modal: false,
title: mytitle
});
$dialog.dialog('open');
...
Here is the JS:
$('#createReview').click(function () {
CKEDITOR.instances['ReviewText'].updateElement();
$.ajax({
type: 'POST',
cache: false,
url: '/Review/Create',
data: $('#reviewForm').serialize(),
dataType: 'html',
success: function (response) {
$('#bookReview').htm...
I have a very simple test with jQuery and a django view:
HTML - Includes jQuery.js
JavaScript - $(document).ready( $.get("/index/" ); )
Django urls.py:
(r'^index/', index_view ),
Django views.py:
def index_view(request): if request.GET: return HttpResponse( "RECEIVED GET" )
Debugging in browser, the javascript gets called ...
I have a RoR app running rails 2.3.8 which makes use of the Rails 3 style UJS to bind data-remote forms instead of using form_for_remote, the controller responds with a js.erb file from the server.
Works beautifully in FF, Chrome, and Safari, but when run in IE it prompts you to save a file and does not execute the JS. My research so f...
Hello,
I have a jQuery accordion that I am styling using the ui themes. My question is, how can I have a section that has no sub-sections and does not expand when mouse-overed? I am using mouseover as my trigger.
For example:
The Home section has nothing underneath it. I would like it to stay collapsed when hovered over. When clicke...
Hey, I know a little bit of jQuery now, but I'm still a bit confused with animations (especially when I have to add them to working script).
I have for example:
if (i = 1) {
i = i +1
$("#div p").css("left", "-" + width * i + "px");
}
How to animate() margin adding? I'm trying an...
I use a jQuery popup window to show a new page with a parameter in the query string.
<script language="javascript" type="text/javascript">
function ShowProfile(clickedItem) {
$.fn.colorbox({ html: '<iframe SCROLLING="Yes" frameborder="0" src="SiteVP.aspx?siteid="' + clickedItem + ' width="999" height="550" />', wi...
How would I go about creating an array containing each link title from the following? (Link 1, Link 2, Link 3) - I'm trying to pass this data through a load() command so it then pre-caches the results to reduce load time if the user decides to click on one of the links.. (each link calls to an api fetching data related to the title)
<ul...
Hey. I have a code like:
$("#clickMe").click(
function(){
if (i == 1) {
i = i+1
$("#div p").css("left", "-" + width * i + "px");
}
});
As you can see -margin changes when somebody clicks a button. What if I want it to happen j...
I was wondering lets say I have a form that you can save and preview changes before you save the changes, what will be the best way to preview the changes in a different page, the same page or a lightbox? Can you give me some live examples if possible?
...
I have an element that moves on hover up or down. I need to know the position on that block and see in an text
<script type="text/javascript">
var who = $(".back");
var pozitie = who.position();
$("p.pozitie").text("TOP:" + pozitie.top);
</script>
This script gives me only the start position. I need the position all the time. Can some...
var clicked = e.target;
$(clicked).attr("id") == #somemenu // this checks see if the clicked has id of somemenu.
now, my question is how can I determine whether this clicked element is a subset of somemenu ?
example html of somemenu:
<div id="somemenu">
<a href="something.php"> menu 1 </a>
//bunch of other elemnts here, can be anyth...
I need help with one website: http://www.lockerz.com/p/watch/all that contains videos to see, like YouTube, and the videos are divided in pages,but I want to display all videos in one page (or maybe you know some other way to get all videos links to listbox) and in the source of this page I got this part of the source:
input id="vid_cou...
It is really weird that the draggable works in all browsers but Firefox. I tried in IE6.0, Opera, Safari, all are ok. But Firefox prompted below error:
$("#draggable").draggable is not a function.
Here is my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt...
I have a bunch of tweets that are returned as plain text that I would like to go through and assign proper links tags to based on RegEx matches.
As an example here is a tweet where I would like @Bundlehunt to become <a href="http://twitter.com/bundlehunt">@Bundlehunt</a> and the http://bundlehunt.com should become <a href="http...