Hello,
I am trying to make a jquery menu that when I click on one of the links (without reloading the page), it changes its class to "active" and removes this class when I click on another link.
here is my code :
<script type="text/javascript">
$(document).ready(function() {
$(".buttons").children().("a").click(function() {
$(".b...
Hi folks,
I must say that despite this being a newb question, I don't think I have totally mastered HTML a tags.
Whenever I want to open a link in a new tab I add target="_blank", works fine in chrome and firefox. Not in IE7-8.
I think the behaviour might have something to do with the DOCTYPE, but I'm not entirely sure. I'm currently ...
Say I have an anchor on a webpage like so:
<a name="comegetit"></a>
Is there a way of running a javascript if the page is arrived at by a link that lands on this anchor? (e.g. a link like <a href="http://myawesomewebpage.com/page#comegetit"></a>). I don't think there is but I would like there to be.
...
I have a div behind the main div. Sometimes it appears and sometimes it's occluded, and that's fine. But the link on that z-indexed div isn't showing up as a link. Which is to say, the browser doesn't turn the cursor to a pointer; and when you click on it, it doesn't request the href document.
Is there any way to keep the div so th...
<a href="facebook.com/sharer" target="_blank" >Share this</a>
How do I make this a certain width and height, in a new window, when the user clicks on it?
In firefox, the current code only opens up a new tab (not a new window)
...
Hai this is my jquery function,
function getRecordspage(curPage, pagSize) {
$.ajax({
type: "POST",
url: "Default.aspx/GetRecords",
data: "{'currentPage':" + curPage + ",'pagesize':" + pagSize + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(jso...
Here are my anchors,
<a ID="lnkbtn0" class="page-numbers" href="#">1</a>
<a ID="lnkbtn1" class="page-numbers" href="#">2</a>
<a ID="lnkbtn2" class="page-numbers" href="#">3</a>
<a ID="lnkbtn3" class="page-numbers" href="#">4</a>
And my click function i am adding a cssclass to show that it is the current anchor
$("a.page-numbers").cli...
Hai i am generating page numbers based on currentpage and lastpage using jquery ... Here is my function and as i am newbie i dont know how it can be done...
function generatePages(currentPage, LastPage) {
if (LastPage <= 5) {
var pages = '';
for(var i=1;i<=5;i++)
{
pages += "<a class='page-numbers...
I use Visual Studio .NET to develop internal applications. I create a Windows control that will display custom status bar information. Different developers will use the control to display the same information in many different applications. The control must always be displayed at the bottom of the parent form in every application. It mus...
Here is function ,
<script type="text/javascript">
$(document).ready(function() {
getRecordspage(1, 5);
$("a.page-numbers").click(function() {
alert(1);
getRecordspage($(this).text(), 5);
return false;
});
});
And in my page i am appending anchors dynamically to th...
My site has an iframe which is dynamically populated with html content. The html often contains named anchors, which work fine in IE/Chrome but in Firefox it reopens the entire page within the iframe.
Here's an example: load the page in firefox, scroll to the bottom of the iframe, click the "back to top" link, and you will see what I am...
Hi, I am new to javascript. I wrote the following function rollDice() to produce 5 random numbers and display them. I use an anchor with click event to call the function. Problem is, in Chrome it won't display, works fine in IE, in firefox the 5 values display and then the original page w/anchor appears! I am suspicious that my script ta...
This question is similar, but i need a replacement for window.open with anchor so that it opens a url on click of the button
How do i fire the anchor event using a method
GWT Popup window in new browser window
...
I have the following userjs which is intended to remove anchor part of the URL but still jump to it:
// ==UserScript==
// @name PurgeAnchor
// @include *
// ==/UserScript==
(function() {
var reg=/^(.*)\#(.*)$/;
var match=reg.exec(location);
function ObjectPosition(obj) {
var curtop = 0;
if(obj.offsetParent)
while(1)
...
I use json data with jquery... I have filepaths in json and i am iterating with jquery...
var divs='';
$.each(jsob.Table, function(i, user) {
divs += '<a class="download" href=' + user.resume_path + '/>'
});
$("#ResultsDiv").append(divs);
It works but how to make my anchor open file/save dialog ...
Consider i have an anchor which looks like this
<div class="res">
<a href="~/Resumes/Resumes1271354404687.docx">
~/Resumes/Resumes1271354404687.docx
</a>
</div>
NOTE: There wont be any id or class for the anchor...
I want to get either href/text in jquery onclick of that anchor ...
...
There's placeholder on the page that is loaded asynchronously using jQuery load method. Page URL might have anchor and I want to scroll to the anchor after content is loaded. What is the best way to do that?
Problem is similar to this: http://forum.jquery.com/topic/goto-anchor-after-load
But I don't like the solution. May be someone has...
http://mycloud.net/js/file.js#foo=bar
I'm trying to load a cross domain javascript file, and want to pass a variable along on the query string. I have seen the above '#' method used, but am unsure of how to extract the 'foo' value from within the file.js. Any clues how to handle this without the aid of server side help?
Thanks.
...
Hi, thanks for looking.
I know you can't redirect anchor URLs to another page, but is it possible to redirect a URL to only a single anchor?
So
http://www.example.com/video/{title}
always gets sent to
http://www.example.com/video.php?title={title}#player
The only thing that changes is the title, anchor is always the same... I ne...
Is the html <base> tag safe to use in terms of browser support? Or should I generate a root path with PHP which i then add like this <a href="<?=BASE?>somepage.html">somepage</a> which makes up a absolute url.
using the base tag like this <base href="<?=BASE?>" /> I am then able to use links like this
<a href="somepage.html">somepage<...