Search Results

Search found 15712 results on 629 pages for 'location href'.

Page 85/629 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • Jquery adding and removing class dynamically

    - by user244394
    I am trying to add the class"selected" when a link is clicked and when the user click on the next link , I want to remove the previously "selected" class and add "selected" to the link clicked.. -Thanks in advance $(document).ready(function() { $('.news a').click(function(){ $(this).addClass("selected"); }); }); <div class="news-w"> <div class="news" id="getnews-1"> <a href="#" >topic</a> </div> <div class="news" id="getnews-2"> <a href="#">topic</a> </div> <div class="news" id="getnews-3"> <a href="#" >topic</a> </div> <div class="news" id="getnews-4"> <a href="#">topic</a> </div> <div class="news" id="getnews-5"> <a href="#">topic</a> </div> </div>

    Read the article

  • Jquery mobile spinner not loading in external links

    - by Jorge Zuverza
    I'm developing an application in which I have internal and external links. i noticed that Jquery mobile does not load the spinner when an external link is clicked: Example <a href = "/products">Spinner is shown </a> <a href = "othersite.com" rel = "external">Spinner is NOT shown </a> I have tried : $('a[href][rel=external]').click(function(){ //doesnt work $.mobile.showPageLoadingMsg(); } and: $('a[href][rel=external]').click(function(){ // shows the spinner but it gets stuck forever $.mobile.showPageLoadingMsg(); $('#loadingDiv').div("refresh"); } can someone help me show the spinner when the rel = external links are clicked? thanks!

    Read the article

  • html/php: how to handle absolute url's?

    - by YuriKolovsky
    Is the html 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</a> now I am fully aware that it would be much easier to just do this without using the base tag: <a href="/somepage.html">somepage</a> but how do I test locally then with a base url of http://localhost/testsite/ ???

    Read the article

  • center menu within the 960 grid

    - by Kyle Monti
    I have been working on 960 grid,(http://960.gs/) and I used an old style menu i've used in the past from a few years ago and for some reason with the 960 grid, the menu is floating left and I want it centered. ul#menu { width:940px; height:61px; background: url(../images/menu_bg.png) no-repeat; list-style:none; padding-top:0; padding-left:0; margin: 0; } ul#menu li { float:left; } ul#menu li a { background: url(../images/menu_splice_color.png) no-repeat scroll top left; display:block; height:61px; position:relative; } ul#menu li a.shel { width:135px; } ul#menu li a.golf { width:84px; background-position:-135px 0px; } ul#menu li a.pro { width:119px; background-position:-219px 0px; } ul#menu li a.event { width:94px; background-position:-338px 0px; } ul#menu li a.member { width:148px; background-position:-432px 0px; } ul#menu li a.bistro { width:91px; background-position:-580px 0px; } ul#menu li a.contact { width:115px; background-position:-671px 0px; } ul#menu li a span { background: url(../images/menu_splice_color.png) no-repeat scroll bottom left; display:block; position:absolute; top:0; left:0px; height:100%; width:100%; z-index:100; } ul#menu li a.shel span { background-position:0px -61px; } ul#menu li a.golf span { background-position:-135px -61px; } ul#menu li a.pro span { background-position:-219px -61px; } ul#menu li a.events span { background-position:-338px -61px; } ul#menu li a.member span { background-position:-432px -61px; } ul#menu li a.bistro span { background-position:-580px -61px; } ul#menu li a.contact span { background-position:-672px -61px; } and my generic html markup is <div class="container_16"> <!-- Navigation Start --> <div class="grid_16"> <ul id="menu"> <li><a href="#" class="shel"><span></span></a></li> <li><a href="#" class="golf"><span></span></a></li> <li><a href="#" class="pro"><span></span></a></li> <li><a href="#" class="events"><span></span></a></li> <li><a href="#" class="member"><span></span></a></li> <li><a href="#" class="bistro"><span></span></a></li> <li><a href="#" class="contact"><span></span></a></li> </ul> </div> <div class="clear"></div> </div> And I use jquery animations to roll over the images. $(function() { $("ul#menu span").css("opacity","0"); $("ul#menu span").hover(function () { $(this).stop().animate({ opacity: 1 }, "slow"); }, function () { $(this).stop().animate({ opacity: 0 }, "slow"); }); });

    Read the article

  • Why is this UL and inline JS giving errors during HTML validation?

    - by thor
    I've just run the homepage of a site I'm working on through the w3c HTML validator and it's come back with 3 errors and 2 warnings. I've taken a look at them but can't see why they would be causing a problem. I've pasted them in below (I've removed URL's/strings etc as the site isn't quite ready to be made public yet). This is being validated against XHTML Transitional by the way. The UL comes back with the following error: end tag for "ul" which is not finished <ul id='tabs'></ul> <ul id='tabs'> <li> <a href="/en/folder/folder/search?categories[]=cat1" class="tab1" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab1_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat2" class="tab2" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab2_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat3" class="tab3" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab3_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat4" class="tab4" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab4_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat5" class="tab5" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab5_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat6" class="tab6" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab6_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat7" class="tab7" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab7_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat8" class="tab8" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab8_text </span> </a> </li> </ul> For the inline javascript, I'm getting 2 errors and 2 warnings all for the same thing - I have a simple if statement with && and the validator appears to be seeing this as HTML rather than javascript: character "&amp;" is the first character of a delimiter but occurred as data and xmlParseEntityRef: no name <script type='text/javascript'> if (weather_data != null && weather_data['data'] != null){ display_weather(); } </script> The javascript is placed just before the body close tag at the end of the document. If you need to see the full source then let me know and I can send it over.

    Read the article

  • show tweets inside div from an asynchronous loop

    - by ak_47
    Am trying to laod tweets into a div after looping them from yahoo placemaker. They are loading on the div but the information shown by them is placemaker's last result. This is the code.. function getLocation(user, date, profile_img, text,url) { var templates = []; templates[0] = '<div><div></div><h2 class="firstHeading">'+user+'</h2><div>'+text+'</div><div><p><a href="' + url + '"target="_blank">'+url+'</a></p></div><p>Date Posted- '+date+'</p></div>'; templates[1] = '<table width="320" border="0"><tr><td class="user" colspan="2" rowspan="1">'+user+'</td></tr><tr><td width="45"><a href="'+profile_img+'"><img src="'+profile_img+'" width="55" height="50"/></a></td><td width="186">'+text+'<p><a href="' + url + '"target="_blank">'+url+'</a></p></td></tr></table><hr>'; templates[2] = '<div><div></div><h2 class="firstHeading">'+user+'</h2><div>'+text+'</div><div><p><a href="' + url + '"target="_blank">'+url+'</a></p></div><p>Date Posted- '+date+'</p></div>'; templates[3] = '<table width="320" border="0"><tr><td class="user" colspan="2" rowspan="1">'+user+'</td></tr><tr><td width="45"><a href="'+profile_img+'"><img src="'+profile_img+'" width="55" height="50"/></a></td><td width="186">'+text+'<p><a href="' + url + '"target="_blank">'+url+'</a></p></td></tr></table><hr>'; var geocoder = new google.maps.Geocoder(); Placemaker.getPlaces(text, function (o) { console.log(o); if (!$.isArray(o.match)) { var latitude = o.match.place.centroid.latitude; var longitude = o.match.place.centroid.longitude; var myLatLng = new google.maps.LatLng(latitude, longitude); var marker = new google.maps.Marker({ icon: profile_img, title: user, map: map, position: myLatLng }); var infowindow = new google.maps.InfoWindow({ content: templates[0].replace('user',user).replace('text',text).replace('url',url).replace('date',date) }); var $tweet = $(templates[1].replace('%user',user).replace(/%profile_img/g,profile_img).replace('%text',text).replace('%url',url)); $('#user-banner').css("visibility","visible");$('#news-banner').css("visibility","visible"); $('#news-tweets').css("overflow","scroll").append($tweet); function openInfoWindow() { infowindow.open(map, marker); } google.maps.event.addListener(marker, 'click', openInfoWindow); $tweet.find(".user").on('click', openInfoWindow); bounds.extend(myLatLng); } }); }

    Read the article

  • Access multiple objects/arrays in JSON in jQuery $.each

    - by user2880254
    I am trying to build a simple page to view messages saved in a mysql db via JSON and jQuery. My JSON IS {"unread_msgs":[{"id":"6","title":"33333","user1":"19","timestamp":"1383747146","client_id":"Generic"},{"id":"5","title":"42142","user1":"19","timestamp":"1383740864","client_id":"Generic"}],"read_msgs":[{"id":"4","title":"test to addnrow","user1":"19","timestamp":"1383676647","client_id":"Generic"},{"id":"2","title":"kll","user1":"19","timestamp":"1383675548","client_id":"Generic"},{"id":"1","title":"jkjljklj","user1":"19","timestamp":"1382539982","client_id":"Generic"}],"urm_t":2,"rm_t":3} My JS <script type="text/javascript"> function GetClientMsgs () { $.post("assets/server/client_msgs.php",{ client_id:local_client_id } ,function(data) { var MsgData = $.parseJSON(data); console.log("Msg json data parsed"); $.each(MsgData, function(key, value) { console.log(value); $('#unread_row').append('<td><a href="#read_pm" onClick="ReadMsg('+value.unread_msgs.id+'); return false;">'+value.unread_msgs.title+'</a></td><td><a href="#profile">'+value.unread_msgs.studioname+'</a></td><td>'+value.unread_msgs.timestamp+'</td><td><a href="#delete_msg" onClick="DeleteMsg('value.unread_msgs.id+'); return false;">X</a></td>'); $('#read_row').append('<td><a href="#read_pm" onClick="ReadMsg('+value.read_msgs.id+'); return false;">'+value.read_msgs.title+'</a></td><td><a href="#profile">'+value.read_msgs.studioname+'</a></td><td>'+value.read_msgs.timestamp+'</td><td><a href="#delete_msg" onClick="DeleteMsg('+value.read_msgs.id+'); return false;">X</a></td>'); }); }); } </script> PHP $msgs = array('unread_msgs' => $dn1s, 'read_msgs' => $dn2s, 'urm_t' => $unread_msgs, 'rm_t' => $read_msgs); $json = json_encode($msgs); I am trying to post values returned such as unread_msgs.title or .id and am not able to access any of the objects. I have searched on here and could not find something specific to my structure. Thanks alot.

    Read the article

  • Prevent jQuery Tabs to bind to <ul> elements below the main <ul> element.

    - by Shiki
    Hi, I have this HTML: <div id="mytabs"> <ul id="main-tabs"> <li><a href="">Link</a></li> <li><a href="">Link</a></li> <li class="filter"> <ul id="filter-controls"> <li><a href="">Filter by something</a></li> <li><a href="">Filter by something</a></li> <li><a href="">Filter by something</a></li> </ul> </li> </ul> </div> And I set it to a tabbed control: $('#mytabs').tabs(); My problem is jQuery UI also converts the <li> elements in <ul id="filter-controls"> into tabs. Is there a way to instruct jQuery UI to only set the <li> children of <ul id="main-tabs"> as the tabs? Note: I am currently in no position to change <ul id="filter-controls" into a non-ul element.

    Read the article

  • Get all link id from html source code using PREG_MATCH_ALL

    - by Jeremy Dicaire
    Hi there, I know i shouldn't do this that way but its just to retrieve all id of my links since i have a lot of them Here is the patern: <a href="mylink.php?get=123456">Click 1</a> <a href="mylink.php?get=222222">Click 2</a> <a href="mylink.php?get=81456">Click 3</a> <a href="mylink.php?get=1700">Click 4</a> I want to get all "get=" values (123456, 222222, etc.) And also the "Click 1", "Click 2", etc values using Preg_match_all() Any idea? Thanks a lot guys!!!

    Read the article

  • How to manipulate string to delete quotes?

    - by user1751581
    I am trying to manipulate a string so that any quotes (") within <a href> and <\a> get taken out... Sorry if its been asked before but I just can't get it to work! By the way, I am POSTing the data from a form and then manipulating the string. This is basically html but its in the form of a string, and I want to take out quotes on things like images and links... Another thing is, I do not want to escape the quotes because that would break the link... And the whole point is that the html can be used and work fine... But now, something is automatically creating a second set of quotes inside the normal quotes, like this: <a href="\"http://www.example.com/\""></a> Example input would be: <p><a href="http://www.example.com">example</a></p> Heres how it appears when I echo it however: <p><a href=\"http://www.example.com\">example</a></p> Heres how I want it to look: <p><a href="http://www.example.com">example</a></p> So I would actually be trying to get rid of the (/) my bad...

    Read the article

  • Finding and displaying image src attributes

    - by MIF
    Hi I have a problem and an try to find in one week. I need help :( I have a script work with : <script type="text/javascript"> var list_images = 'image1.jpg|image2.jpg|image3.jpg|image4.jpg|image5.jpg|image6.jpg|image7.jpg'; var images = list_images.split('|'); </script> but know in blogger always give more tab in my script <script type="text/javascript"> var list_images = ' <div></div> <a href="anything"><img src="image1.jpg"><a/> <a href="anything"><img src="image2.jpg"><a/> <a href="anything"><img src="image3.jpg"><a/> <a href="anything"><img src="image4.jpg"><a/> <a href="anything"><img src="image5.jpg"><a/> <li><img src="image6.jpg"></li> <li><img src="image7.jpg"></li> <br/> '; var images = list_images.split('|'); </script> I want remove all tabs and convert them like var list_images = 'image1.jpg|image2.jpg|image3.jpg|image4.jpg|image5.jpg|image6.jpg|image7.jpg'; Finding and displaying image src attributes - Old question http://manhualayout.blogspot.com/2011/03/httpcomic.html - Work good http://manhualayout.blogspot.com/2011/02/blog-post.html - My problem make my crazy in one week :( I Can't just edit the variable of the block HTML ...I want find a way to search and replace to remove all and got the link with the | Please help me . Very very thanks .. Me so stupid :(

    Read the article

  • How to Change Style of Parent <li> on Hover

    - by Stuart Haiz
    I have a WordPress site (on my localhost) that uses a <ul> for a custom menu. How can I change the CSS of a <li> on hover only if it has a <ul> sub-menu? All the main menu items have a border-radius and I want to remove this on the current item (Services, below) for example: <div class="main-nav"> <ul class="menu" id="menu-main-nav"> <li><a href="#">Home</a></li> <li><a href="#">Services</a> <ul class="sub-menu"> <li><a href="#">Item One</a></li> <li><a href="#>Item Two</a></li> </ul> </li> <li><a href="#>Contact</a></li> </ul> </div> I can't find a CSS solution and I've tried jQuery too: $('ul.sub-menu').parent().hover(function(){ $(this).addClass('no-radius'); });

    Read the article

  • PHP timeslot booking*

    - by boyee007
    regarding of this question.. PHP Booking timeslot I tried 'GROUP BY' id_timeslot still didnt work, as its only showing the booked timeslot not available i tried that solution, but give me an error and not quite understand how to use 'coelence' table timeslot (id_timeslot integer); table doctor (id_doctor integer); table bookslot (id_bookslot, id_doctor, id_timeslot integer); insert into doctor (id_doctor) values (1 = doc_A), (2 = doc_B), (3 = doc_C); insert into TimeSlot (id_timeslot) values (1 = 10:00:00), (2 = 10:15:00), (3 = 10:30:00), (4 = 10:45:00); insert into bookslot (id_doctor,id_timeslot) values (1,1), (1,5), (2,1), (2,4), (3,1); Join mysql table $q = $mysqli->query("SELECT * FROM bookslot RIGHT JOIN timeslot ON bookslot.id_timeslot = timeslot.id_timeslot LEFT JOIN doctor ON bookslot.id_doctor = doctor.id_doctor "); echoing result and checking if it matches todays date or else set available while($r = $q->fetch_array(MYSQLI_ASSOC)) : echo '<tr>'; echo '<td align="center">' . $r['times'] . '</td>'; if($r['booked_date'] == date('Y-m-d') && $r['id_doctor'] == 1): echo '<td><a href="#available" class="booked">booked</a></td>'; else : echo '<td><a href="#" class="available">available</a></td>'; endif; if($r['booked_date'] == date('Y-m-d') && $r['id_doctor'] == 2): echo '<td><a href="#available" class="booked">booked</a></td>'; else : echo '<td><a href="#" class="available">available</a></td>'; endif; if($r['booked_date'] == date('Y-m-d') && $r['id_doctor'] == 3): echo '<td><a href="#available" class="booked">booked</a></td>'; else : echo '<td><a href="#" class="available">available</a></td>'; endif; echo '</tr>'; endwhile; result from webpage and i want the result look like: id_timeslot doc_A doc_B doc_C ---------------------------------------------- 1 booked booked booked 2 available available available 3 available available available 4 available booked available 5 booked available available Any other solution please!

    Read the article

  • JQuery: Hover to show/hide individual object

    - by noe ruiz
    Basically I need to hover over an anchor to display the "data-meta" div. Works just fine but when there's multiple td and divs, one hover displays all of them. My question is how can I show/hide them individually? Code snippets below. <td> <a href="#">Item</a> <div class="data-meta"> <a href="#">Edit</a> | <a href="#">Disable</a> | <a href="#">Delete</a> </div> $(document).ready(function(){ $("td").hover( function () { $('.data-meta').show(); }, function () { $('.data-meta').hide(); }); });

    Read the article

  • IE8 Slide Toggle Issue

    - by jef2904
    Im having some trouble with jQuery's slideToggle function in IE8 for some reason the DIV its opening closes immediately after its opened heres the code im using $("h3 a").click(function(){ id = $(this).attr("href"); $(id).slideToggle("slow"); }); and the HTML <h3><a href="#promo-materials">Graphic and Pormotional Materials</a></h3> <div id="promo-materials" class="center gallery"> <a href="images/portfolio/bistro.png" rel="facebox"> <img src="images/portfolio/thumbs/bistro.png" alt="" /> </a> <a href="images/portfolio/direct-savings.png" rel="facebox"> <img src="images/portfolio/thumbs/direct-savings.png" alt="" /> </a> </div> Here is a link to the functional page it works in all other browsers including IE7

    Read the article

  • unrecognized selector sent to instance while trying to add an object to a mutable array

    - by madpoet
    I'm following the "Your Second iOS App" and I decided to play with the code to understand Objective C well... What I'm trying to do is simply adding an object to a mutable array in a class. Here are the classes: BirdSighting.h #import <Foundation/Foundation.h> @interface BirdSighting : NSObject @property (nonatomic, copy) NSString *name; @property (nonatomic, copy) NSString *location; @property (nonatomic, copy) NSDate *date; -(id) initWithName: (NSString *) name location:(NSString *) location date:(NSDate *) date; @end BirdSighting.m #import "BirdSighting.h" @implementation BirdSighting -(id) initWithName:(NSString *)name location:(NSString *)location date:(NSDate *)date { self = [super init]; if(self) { _name = name; _location = location; _date = date; return self; } return nil; } @end BirdSightingDataController.h #import <Foundation/Foundation.h> @class BirdSighting; @interface BirdSightingDataController : NSObject @property (nonatomic, copy) NSMutableArray *masterBirdSightingList; - (NSUInteger) countOfList; - (BirdSighting *) objectInListAtIndex: (NSUInteger) theIndex; - (void) addBirdSightingWithSighting: (BirdSighting *) sighting; @end BirdSightingDataController.m #import "BirdSightingDataController.h" @implementation BirdSightingDataController - (id) init { if(self = [super init]) { NSMutableArray *sightingList = [[NSMutableArray alloc] init]; self.masterBirdSightingList = sightingList; return self; } return nil; } -(NSUInteger) countOfList { return [self.masterBirdSightingList count]; } - (BirdSighting *) objectInListAtIndex: (NSUInteger) theIndex { return [self.masterBirdSightingList objectAtIndex:theIndex]; } - (void) addBirdSightingWithSighting: (BirdSighting *) sighting { [self.masterBirdSightingList addObject:sighting]; } @end And this is where I'm trying to add a BirdSighting instance to the mutable array: #import "BirdsMasterViewController.h" #import "BirdsDetailViewController.h" #import "BirdSightingDataController.h" #import "BirdSighting.h" @implementation BirdsMasterViewController - (void)awakeFromNib { [super awakeFromNib]; BirdSightingDataController *dataController = [[BirdSightingDataController alloc] init]; NSDate *date = [NSDate date]; BirdSighting *sighting = [[[BirdSighting alloc] init] initWithName:@"Ebabil" location:@"Ankara" date: date]; [dataController addBirdSightingWithSighting: sighting]; NSLog(@"dataController: %@", dataController.masterBirdSightingList); self.dataController = dataController; } .......... @end It throws NSInvalidArgumentException in BirdSightingDataController addBirdSightingWithSighting method... What am I doing wrong?

    Read the article

  • [JS] How to workaround same origin problem

    - by Ricky
    Hi guys: The following JS will fail if the URL in mainFrame from a.abc.com to b.abc.com. top.frames["mainFrame"].location.href = "/Users/xuenn.aspx?backUrl=" + top.frames["mainFrame"].location.href.split("?")[0]; This is the error message: Permission denied for http://a.abc.com to get property Location.href from http://b.abc.com. Anybody knows how could I workaround this or think of other solutions?

    Read the article

  • How to use a divider in a navigation with list elements?

    - by Kris
    I want to create a navigation which got divider between each list element. Here is a simple HTML/CSS Code/Template : <nav> <ul> <li><a href="#">A</a></li> <li><a href="#">B</a></li> <li><a href="#">C</a></li> <li><a href="#">D</a></li> <li><a href="#">E</a></li> </ul> </nav> nav ul { list-style:none; float:right; } nav ul li { float:left; padding-left:10px; } nav ul li a { color:#111; font-family:Verdana; font-size:15px; text-decoration:none; } nav ul li a:hover { color:#9F3039; } so just a simple looking navigation which floats from the right side on a logo which is not displayed in the code here. Now I want to at devider between each link - I know I could do it with border-right and just use another class on my last listelement which set the border-right off, BUT I want to use a special kind of divider - an image. How can I do it best ?

    Read the article

  • JavaScript Show/Hide as Filters to list of divs

    - by deconspray
    Looking to create Javascript that acts like a filter on a list of divs. For instance, here's the intended markup... <a href="#" onclick="">Filter Item 1</a> <a href="#" onclick="">Filter Item 2</a> <a href="#" onclick="">Filter Item 3</a> <a href="#" onclick="">Filter Item 4</a> <a href="#" onclick="">Filter Item 5</a> <div class="1">Item 1</div> <div class="1">Item 1</div> <div class="2">Item 2</div> <div class="3">Item 3</div> <div class="1">Item 1</div> <div class="4">Item 4</div> <div class="4">Item 4</div> <div class="1">Item 1</div> <div class="5">Item 5</div> I want to be able to click on the link for Item 1, and show only Item 1 divs and hide all other divs, click the link of Item 2, and show only Item 2 divs and hide all other divs and so on. I've seen several similar scripts but nothing that seemingly turns divs matching the class on/off in this manner. TIA.

    Read the article

  • displaying another html content in div on ajax success

    - by Manish
    gameLike.jsp <div class="gameLikeStatus"> <a href="likeit" class="likeitlink">likeit</a> </div> var dataString = 'elementId='+ '<s:property value="id"/>'+ '&elementType=' + 'games'; $(document).ready(function(){ $('a#likeitlink').bind('click',function(event){ event.preventDefault(); $.ajax({ type: "POST", url: "likeit", dataType: "text html", data: dataString, success: function() { $.post('isLiked',dataString, function(data) { alert(data);//1 $('#gameLikeStatus').html(data); }); } }); }); }); in second.jsp contains a link <a href="unlikeit" class="Unlikeitlink">likeit</a> Here I am liking the element and after like it should display <a href="unlikeit" class="Unlikeitlink">likeit</a> instead of <a href="likeit" class="likeitlink">likeit</a> at <div class="gameLikeStatus"></div> in gameLike.jsp, alert(data);//1 is showing <a href="unlikeit" class="Unlikeitlink">likeit</a> this data but $('#gameLikeStatus').html(data); showing nothing. How to resolve this?

    Read the article

  • jquery anchor click doesn't seem to work....

    - by Pandiya Chendur
    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 this div, <div id="pager" class="pager"> //my anchors will be present here... </div> i am appending anchors dynamically... All anchors will have class="page-numbers"... How it can be done... When inspected through firebug my pager div had this when i clicked 3, <div class="pager" id="pager"> <a class="page-numbers prev" href="#">Prev</a> <a class="page-numbers" href="#">1</a> <a class="page-numbers" href="#">2</a> <span class="page-numbers current">3</span> <a class="page-numbers" href="#">4</a> <a class="page-numbers next" href="#">Next</a></div>

    Read the article

  • jquery.post() not working

    - by Sarang
    Hello everyone, I am trying to fetch xml file using jquery.post() method. My code is : function getTitle() { jQuery.ajax({ type: "GET", url: "https://spreadsheets.google.com/feeds/spreadsheets/private/full.txt", dataType: "xml", success: function(xml) { var i=0; $(xml).find('entry').each(function(){ if($(this).find('title').text().toString() == "Sample Spreadsheet"){ var href = $(this).find('link')[1].getAttribute('href').toString(); var url="https://spreadsheets.google.com/feeds/worksheets/" + href.split('=')[1] + "/private/full"; alert(href.split('=')[1]); } i++; }); } }); } But, it is not giving me alert ! How do I solve ?

    Read the article

  • How do I display a sting, based on which id is set as selected?

    - by Cam
    I'd like to display a text string (to be positioned above ul) depending on which link is set to selected by the chgClass fuction. The ids for each display via an alert right now, but I can't seem to make them appear in "english". I know I can set up an array stating "id=text string" but when I do it seems to break the code I already have... <script type="text/javascript"> var Lst; function CngClass(obj){ if (typeof(obj)=='string') obj=document.getElementById(obj); if (Lst) Lst.className=''; obj.className='selected'; Lst=obj; alert(obj.id); } </script> </head> <body onload="CngClass('POSITION_WITHOUT_NOTIFY')"> <div class="slider"> <ul class="bar"> <li class="deny"><a onclick="CngClass(this);" id="POSITION_NOT_ALLOWED" href="#">Deny</a></li> <li class="askDeny"><a onclick="CngClass(this);" id="NOTIFY_POSITION_IF_GRANTED" href="#">Ask Deny</a></li> <li class="askAllow"><a onclick="CngClass(this);" id="NOTIFY_POSITION_IF_NO_RESPONSE" href="#">Ask Allow</a></li> <li class="notify"><a onclick="CngClass(this);" id="NOTIFY_POSITION" href="#">Notfiy</a></li> <li class="allow"><a onclick="CngClass(this);" id="POSITION_WITHOUT_NOTIFY" href="#">Allow</a></li> </ul> </div> </body> </html>

    Read the article

  • Get original element using .on

    - by RGraham
    When using jQuery's event delegation, is there a way to retrieve the element on which .on was called, as well as the element on which the event was called? jQuery: $(".item").on("click","a",function() { var link = $(this); // a tag var itemDiv = // what? }); HTML: <div class="item"> <a href="#">Link</a> <a href="#">Link</a> <a href="#">Link</a> <a href="#">Link</a> </div>

    Read the article

  • Is it possibile to modify a link value with Beautifulsoup without recreating the all link?

    - by systempuntoout
    Starting from an Html input like this: <p> <a href="http://www.foo.com" rel="nofollow">this is foo</a> <a href="http://www.bar.com" rel="nofollow">this is bar</a> </p> is it possible to modify the <a> node values ("this i foo" and "this is bar") adding the suffix "PARSED" to the value without recreating the all link? The result need to be like this: <p> <a href="http://www.foo.com" rel="nofollow">this is foo_PARSED</a> <a href="http://www.bar.com" rel="nofollow">this is bar_PARSED</a> </p> And code should be something like: from BeautifulSoup import BeautifulSoup soup = BeautifulSoup(html) for link_tag in soup.findAll('a'): link_tag.string = link_tag.string + '_PARSED' #This obviously does not work

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >