Search Results

Search found 5942 results on 238 pages for 'named anchor'.

Page 11/238 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • jQuery Text to Link Script?

    - by Elijah Manor
    Does anyone know of a script that can select all text references to URLs and automatically replace them with anchor tags pointing to those locations? For example: http://www.google.com would automatically turn into <a href="http://www.google.com">http://www.google.com</a> Note: I am wanting this because I don't want to go through all my content and wrap them with anchor tags.

    Read the article

  • RSpec and stubbing parameters for a named scope

    - by Andy Waite
    I'm try to write a spec for a named scope which is date dependent. The spec: it "should return 6 months of documents" do Date.stub!(:today).and_return(Date.new(2005, 03, 03)) doc_1 = Factory.create(:document, :date => '2005-01-01') Document.past_six_months.should == [doc_1] end The named scope in the Document model: named_scope :past_six_months, :conditions => ['date > ? AND date < ?', Date.today - 6.months, Date.today] The spec fails with an empty array, and the query in test.log shows why: SELECT * FROM "documents" WHERE (date > '2009-11-11' AND date < '2010-05-11') i.e. it appears to be ignoring my stubbed Date method. However, if I use a class method instead of a named scope then it passes: def self.past_six_months find(:all, :conditions => ['date > ? AND date < ?', Date.today - 6.months, Date.today]) end I would rather use the named scope approach but I don't understand why it isn't working.

    Read the article

  • Parse multiple named command line parameters

    - by scholzr
    I need to add the ability to a program to accept multiple named parameters when opening the program via the command line. i.e. program.exe /param1=value /param2=value and then be able to utilize these parameters as variables in the program. I have found a couple of ways to accomplish pieces of this, but can't seem to figure out how to put it all together. I have been able to pass one named parameter and recover it using the code below, and while I could duplicate it for every possible named parameter, I know that can't be the preffered way to do this. Dim inputArgument As String = "/input=" Dim inputName As String = "" For Each s As String In My.Application.CommandLineArgs If s.ToLower.StartsWith(inputArgument) Then inputName = s.Remove(0, inputArgument.Length) End If Next Alternatively, I can get multiple unnamed parameters from the command line using My.Application.CommandLineArgs But this requires that the parameters all be passed in the same order/format each time. I need to be able to pass a random subset of parameters each time. Ultimately, what I would like to be able to do, is separate each argument and value, and load it into a multidimentional array for later use. I know that I could find a way to do this by separating the string at the "=" and stripping the "/", but as I am somewhat new to this, I wanted to see if there was a "preffered" way for dealing with multiple named parameters?

    Read the article

  • Building a Hashtag in Javascript without matching Anchor Names, BBCode or Escaped Characters

    - by Martindale
    I would like to convert any instances of a hashtag in a String into a linked URL: #hashtag - should have "#hashtag" linked. This is a #hashtag - should have "#hashtag" linked. This is a [url=http://www.mysite.com/#name]named anchor[/url] - should not be linked. This isn&#39;t a pretty way to use quotes - should not be linked. Here is my current code: String.prototype.parseHashtag = function() { return this.replace(/[^&][#]+[A-Za-z0-9-_]+(?!])/, function(t) { var tag = t.replace("#","") return t.link("http://www.mysite.com/tag/"+tag); }); }; Currently, this appears to fix escaped characters (by excluding matches with the amperstand), handles named anchors, but it doesn't link the #hashtag if it's the first thing in the message, and it seems to grab include the 1-2 characters prior to the "#" in the link. Halp!

    Read the article

  • Modify QueryString on PostBack to include an anchor bookmark without breaking subsequent events and

    - by roosteronacid
    Consider the following pseudo-code: // sorts the dataset used by the table void ClickEvent() { } foreach (column in table) { // create new LinkButton var lb = new LinkButton(); // hook sort event lb.Click += ClickEvent; // add LinkButton to table table.Controls.add(lb); } How can I modify the QueryString to include an anchor bookmark without breaking subsequent events and without using the dreaded PostBackUrl property on the LinkButtons?

    Read the article

  • jQuery Accordion adding non-expanding anchor

    - by Daniel
    I would like to add an anchor that would be styled to look like the other items(with some minor changes), but instead of animating, would just go to the set link. is there a way of doing this, or should I just switch to this accordion menu and redo the css to include the images?

    Read the article

  • IE6 Bug - Div within Anchor tag: inline images not links

    - by thorn100
    I'm trying to get everything in the anchor tag to be a clickable link. Unfortunately, in IE6 (which is the only browser I'm concerned with currently), the only thing that isn't a clickable link are the inline images. I know that it's not valid html to put a div inside of an anchor but it's not my markup and I've been asked to avoid changing it. Any suggestions to altering the CSS to enable the images as clickable links? If changing the markup is the only solution... any suggestions there? My initial thought was to set the image as a background of it's parent (.ph-item-featured-img), although I'm unclear if that will solve the problem. Thanks! <div class="tab-panel-init clear ui-tabs-panel ui-widget-content ui-corner-bottom" id="ph-flashlights"> <a href="#" class="last ph-item-featured clear"> <div class="ph-item-featured-img"> <img src="#"> &nbsp; </div> <strong> PRODUCT CODE </strong> <p> PRODUCT CODE Heavy Duty Aluminum Led Flashlight </p> <span>Learn more &gt;</span> </a> <a href="#" class="last ph-item-featured clear"> <div class="ph-item-featured-img"> <img src="#"> &nbsp; </div> <strong> PRODUCT CODE </strong> <p> PRODUCT CODE Heavy Duty Aluminum Led Flashlight </p> <span>Learn more &gt;</span> </a> </div>

    Read the article

  • How can i scroll to an anchor?

    - by strakastroukas
    First of all, I have bound a datapager control to a listview. I would like to scroll to the first item of the listview control on the DataPager click. I guess by using javascript, but it seems that the datapager does not allow that... So what option do i have? How can i scroll, onto a specific anchor, when clicking on the DataPager?

    Read the article

  • how to get an html anchor effect with JQuery

    - by frosty
    I have a click handler, which has "event.preventDefault". There is whole lot of logic that occurs within this function. At the end of this logic i would like the page to scroll up to the top. ie the same effect as an anchor. ie " $('.vod-playlist-film a').bind("click", function(event) { // some logic // now i need the browser to goto the top of the page event.preventDefault(); });

    Read the article

  • CSS Rollovers: how to maintain "hit area" size when hidden image is larger than anchor area

    - by nukefusion
    I have a small problem and I don't think what I want to do can be achieved with just pure CSS, but I figured I'd ask anyway. Basically, I have one DIV which contains a hyperlinked element that is smaller in size to it's parent DIV. So in effect I have a square within a square with the inner square being the "hit area". When I mouse over this inner square I want the background of the outer square to change. I know it's not possible to change the parent DIV's background on a:hover, but I figured I could give the illusion of it happening by nesting a hidden image inside the anchor. This works great until I want to "roll off". The problem is that I want the image to disappear when I leave the area of the anchor tag, not the larger hidden image. Is this possible? For the benefit of everyone I've provided an example to demonstrate what I mean: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Test Rollover</title> <link href="main.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="d1"> <a href="#nogo"> <b id="b1"></b> <b id="b2"></b> </a> </div> </body> And the css: #b1 { width: 200px; height: 200px; top: 100px; left: 100px; background-color:aqua; position: absolute; z-index: 100; } #b2 { width: 400px; height: 400px; background-color:lime; position: absolute; display: none; z-index: 90; } #d1 { width: 400px; height: 400px; background-color:fuchsia; position: relative; } #d1 a:hover #b2 { display: block; } In this example I want the green outer square to disappear when I leave the bounds of the hidden inner blue square.

    Read the article

  • CSS Rollovers: how to main "hit area" size when hidden image is larger than anchor area

    - by nukefusion
    I have a small problem and I don't think what I want to do can be achieved with just pure CSS, but I figured I'd ask anyway. Basically, I have one DIV which contains a hyperlinked element that is smaller in size to it's parent DIV. So in effect I have a square within a square with the inner square being the "hit area". When I mouse over this inner square I want the background of the outer square to change. I know it's not possible to change the parent DIV's background on a:hover, but I figured I could give the illusion of it happening by nesting a hidden image inside the anchor. This works great until I want to "roll off". The problem is that I want the image to disappear when I leave the area of the anchor tag, not the larger hidden image. Is this possible? For the benefit of everyone I've provided an example to demonstrate what I mean: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Test Rollover</title> <link href="main.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="d1"> <a href="#nogo"> <b id="b1"></b> <b id="b2"></b> </a> </div> </body> And the css: #b1 { width: 200px; height: 200px; top: 100px; left: 100px; background-color:aqua; position: absolute; } #b2 { width: 400px; height: 400px; background-color:lime; position: absolute; display: none; } #d1 { width: 400px; height: 400px; background-color:fuchsia; position: relative; } #d1 a:hover #b2 { display: block; } In this example I want the green outer square to disappear when I leave the bounds of the hidden inner blue square.

    Read the article

  • Detect if selected element is an anchor on right click

    - by Yawn
    I'm writing a small firefox addon to grab urls and send them to a site. What I want to do is be able to right click on a link (but not have to actually highlight it) and be able to click send and the links href value is grabbed and sent. The bit I'm having trouble with is detecting if the selected element is an anchor and grabbing it's href. Many thanks for any help given :)

    Read the article

  • How to link to specific anchor in table with jquery

    - by LisaH
    I am using this jquery plugin: http://www.jankoatwarpspeed.com/post/2009/07/20/Expand-table-rows-with-jQuery-jExpand-plugin.aspx I have anchors in the code such as: <a name="art" id="art2"></a> Articles How can I open that particular row then? In other words, when a user clicks a link from another page to this landing page I would like the appropriate row to open up based on the anchor tag. Thanks in advance!

    Read the article

  • Javascript get anchor href on click

    - by Infinity
    Hello guys! How can I get the href of an anchor when I click on it using javascript? I did the following: document.onClick = myFunc(); function myFunc() { } But how to extend the function to respond only to clicks on anchors and get the href?

    Read the article

  • asp.net dropdown list postback to anchor

    - by The Talking Walnut
    How can I go to an anchor tag on the page when the myDropDownList_SelectedIndexChanged() event fires? I am using regular ASP.NET Forms. Update: The following is valid for an ASP.NET Button. I would like to achieve the same functionality (going to #someAnchor) when I select an option from the Dropdown list. <asp:Button ID="btnSubmit" runat="server" Text="Do IT" Width="186px" PostBackUrl="#myAnchor" CausesValidation="false" />

    Read the article

  • codeIgnitor helper file problem wont see anchor function

    - by user369616
    Hi everyone im new to a PHP framework codeIgniter, I am going over the user guide iv ran in to a problem, I am on the part where you load helper file but for some reason my code just isnt working I keep getting this error: Fatal error: Call to undefined function anchor() in /home/fresherd/public_html/CI/system/application/views/blogview.php on line 17 now im not 100% sure that it is loading the helper file this could be causing the but I am not sure how to detect the file has been loaded any advice will help many thanks, Alan

    Read the article

  • rails - named scoped help

    - by sameera207
    Hi All, I want to write a named scoped to get a record from its id. Ex: I have a model called Event and its same as doing Event.find(id) (I dont want to use find inside my controller and I want my controller to use a named scoped (for future flexibility)) So I have written a named scoped named_scope :from_id, lambda { |id| {:conditions = ['id= ?', id] } } and I'm calling it from my controller like Event.from_id(id) But my problems is it returns Event object array not only one object Ex: if I want to get event name I have to write event = Event.from_id(id) event[0].name instead I want to write event = Event.from_id(id) event.name Am I doing something wrong here.. thanks in advance cheers sameera

    Read the article

  • Scala regex Named Capturing Groups

    - by Brent
    In scala.util.matching.Regex trait MatchData I see that there support for groupnames (Named Capturing Groups) But since Java does not support groupnames until version 7 as I understand it, Scala version 2.8.0.RC4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6. gives me this exception: scala> val pattern = """(?<login>\w+) (?<id>\d+)""".r java.util.regex.PatternSyntaxException: Look-behind group does not have an obvio us maximum length near index 11 (?<login>\w+) (?<id>\d+) ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.group0(Pattern.java:2488) at java.util.regex.Pattern.sequence(Pattern.java:1806) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) So the question is Named Capturing Groups supported in Scala? If so any examples out there? If not I might look into the Named-Regexp lib from clement.denis.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >