Search Results

Search found 3823 results on 153 pages for 'andy li'.

Page 26/153 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • how to change php functions send result to jquery ajax

    - by OpenCode
    I have many codes for user notifications, it do many mysql works, so it needs waiting times. jquery ajax works for php files. how can i use jquery for send php result to web page? current code : <? echo db_cache("main_top_naver_cache", 300, "naver_popular('naver_popular', 4)"))?> wanted code : but it shows errors... <div id='a'> <div id='b'> <script type="text/javascript"> $("#test1").html( " <? echo htmlspecialchars(db_cache("main_top_naver_cache", 300, "naver_popular('naver_popular', 4)"))?> " ); </script> IE debuger shows error ... SCRIPT1015:... <script type="text/javascript"> $("#test1").html( " &lt;style&gt; /* http://html.nhncorp.com/uio_factory/ui_pattern/list/3 */ .section_ol3{position:relative;border:1px solid #ddd;background:#fff;font-size:12px;font-family:Tahoma, Geneva, sans-serif;line-height:normal;*zoom:1} .section_ol3 a{color:#666;text-decoration:none} .section_ol3 a:hover, .section_ol3 a:active, .section_ol3 a:focus{text-decoration:underline} .section_ol3 em{font-style:normal} .section_ol3 h2{margin:0;padding:10px 0 8px 13px;border-bottom:1px solid #ddd;font-size:12px;color:#333} .section_ol3 h2 em{color:#cf3292} .section_ol3 ol{margin:13px;padding:0;list-style:none} .section_ol3 li{position:relative;margin:0 0 10px 0;*zoom:1} .section_ol3 li:after{display:block;clear:both;content:&quot;&quot;} .section_ol3 li .ranking{display:inline-block;width:14px;height:11px;margin:0 5px 0 0;border-top:1px solid #fff;border-bottom:1px solid #d1d1d1;background:#d1d1d1;text-align:center;vertical-align:top;font:bold 10px Tahoma;color:#fff} .section_ol3 li.best .ranking{border-bottom:1px solid #6e87a5;background:#6e87a5} .section_ol3 li.best a{color:#7189a7} .section_ol3 li .num{position:absolute;top:0;right:0;font-size:11px;color:#a8a8a8;white-space:nowrap} .section_ol3 li.best .num{font-weight:bold;color:#7189a7} .section_ol3 .more{position:absolute;top:10px;right:13px;font:11px Dotum, ??;text-decoration:none !important} .section_ol3 .more span{margin:0 2px 0 0;font-weight:bold;font-size:16px;color:#d76ea9;vertical-align:middle} &lt;/style&gt; &lt;div class=&quot;section_ol3&quot;&gt; &lt;ol style='text-align:left;'&gt; &lt;li class='best'&gt;&lt;span class='ranking'&gt;1&lt;/span&gt;&lt;a href='http://search.naver.com/search.naver?where=nexearch&amp;query=%B9%AB%C7%D1%B5%B5%C0%FC&amp;sm=top_lve' onfocus='this.blur()' title='????' target=new&gt;????&lt;/a&gt;&lt;span class='num'&gt;+42&lt;/span&gt;&lt;/li&gt;&lt;li class='best'&gt;&lt;span class='ranking'&gt;2&lt;/span&gt;&lt;a href='http://search.naver.com/search.naver?where=nexearch&amp;query=%B1%E8%C0%E7%BF%AC&amp;sm=top_lve' onfocus='this.blur()' title='???' target=new&gt;???&lt;/a&gt;&lt;span class='num'&gt;+123&lt;/span&gt;&lt;/li&gt;&lt;li class='best'&gt;&lt;span class='ranking'&gt;3&lt;/span&gt;&lt;a href='http://search.naver.com/search.naver?where=nexearch&amp;query=%C0%CC%C7%CF%C0%CC&amp;sm=top_lve' onfocus='this.blur()' title='???' target=new&gt;???&lt;/a&gt;&lt;span class='num'&gt;+90&lt;/span&gt;&lt;/li&gt;&lt;li &gt;&lt;span class='ranking'&gt;4&lt;/span&gt;&lt;a href='http://search.naver.com/search.naver?where=nexearch&amp;query=%BA%D2%C8%C4%C0%C7%B8%ED%B0%EE2&amp;sm=top_lve' onfocus='this.blur()' title='?????2' target=new&gt;?????2&lt;/a&gt;&lt;span class='num'&gt;+87&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; </div> " );

    Read the article

  • Changing name attr of cloned input element in jQuery doesn't work in IE6/7

    - by BalusC
    This SSCCE says it all: <!doctype html> <html lang="en"> <head> <title>Test</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#add').click(function() { var ul = $('#ul'); var liclone = ul.find('li:last').clone(true); var input = liclone.find('input'); input.attr('name', input.attr('name').replace(/(foo\[)(\d+)(\])/, function(f, p1, p2, p3) { return p1 + (parseInt(p2) + 1) + p3; })); liclone.appendTo(ul); $('#showsource').text(ul.html()); }); }); </script> </head> <body> <ul id="ul"> <li><input type="text" name="foo[0]"></li> </ul> <button id="add">Add</button> <pre id="showsource"></pre> </body> </html> Copy'n'paste'n'run it, click the Add button several times. On every click you should see the HTML code of the <ul> to show up in the <pre id="showsource"> and the expected code should roughly be: <li><input name="foo[0]" type="text"></li> <li><input name="foo[1]" type="text"></li> <li><input name="foo[2]" type="text"></li> <li><input name="foo[3]" type="text"></li> This works as expected in FF, Chrome, Safari, Opera and IE8. However, IE6/7 fails in changing the name attribute and produces like: <li><input name="foo[0]" type="text"> <li><input name="foo[0]" type="text"> <li><input name="foo[0]" type="text"> <li><input name="foo[0]" type="text"></li> I googled a bit and found this very similar problem, he fixed it and posted a code snippet how it should have look like. Unfortunately this is exactly what I already have done, so I suspect that he was only testing in IE8, not in IE6/7. Other than that particular topic Google didn't reveal much. Any insights? Or do I really have to grab back to document.createElement? Note: I know that I can use just the same name for each input element and retrieve them as an array, but the above is just a basic example, in real I really need to have the name attribute changed, because it not only contains the index, but also other information such as parentindex, ordering, etc. It's been used to add/rearrange/remove (sub)menu items. Edit: this is related to this bug, The jQuery (I'm using 1.3.2) does thus not seem to create inputs that way? The following does just work: $('#add').click(function() { var ul = $('#ul'); var liclone = ul.find('li:last').clone(true); var oldinput = liclone.find('input'); var name = oldinput.attr('name').replace(/(foo\[)(\d+)(\])/, function(f, p1, p2, p3) { return p1 + (parseInt(p2) + 1) + p3; }); var newinput = $('<input name="' + name + '">'); oldinput.replaceWith(newinput); liclone.appendTo(ul); $('#showsource').text(ul.html()); }); But I can't imagine that I am the only one who encountered this problem with jQuery. Even a simple $('<input>').attr('name', 'foo') doesn't work in IE6/7. Isn't jQuery as being a crossbrowser library supposed to cover this particular issue under the hoods?

    Read the article

  • DotNetNuke + XPath = Custom navigation menu DNNMenu HTML render

    - by Rui Santos
    I'm developing a skin for DotNetNuke 5 using the Component DNN Done Right menu by Mark Alan which uses XSL-T to convert the XML sitemap into an HTML navigation. The XML sitemap outputs the following structure: <Root > <root > <node id="40" text="Home" url="http://localhost/dnn/Home.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="0" > <node id="58" text="Child1" url="http://localhost/dnn/Home/Child1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="1" > <keywords >Child1</keywords> <description >Child1</description> <node id="59" text="Child1 SubItem1" url="http://localhost/dnn/Home/Child1/Child1SubItem1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="2" > <keywords >Child1 SubItem1</keywords> <description >Child1 SubItem1</description> </node> <node id="60" text="Child1 SubItem2" url="http://localhost/dnn/Home/Child1/Child1SubItem2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="0" only="0" depth="2" > <keywords >Child1 SubItem2</keywords> <description >Child1 SubItem2</description> </node> <node id="61" text="Child1 SubItem3" url="http://localhost/dnn/Home/Child1/Child1SubItem3.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="2" > <keywords >Child1 SubItem3</keywords> <description >Child1 SubItem3</description> </node> </node> <node id="65" text="Child2" url="http://localhost/dnn/Home/Child2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="1" > <keywords >Child2</keywords> <description >Child2</description> <node id="66" text="Child2 SubItem1" url="http://localhost/dnn/Home/Child2/Child2SubItem1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="2" > <keywords >Child2 SubItem1</keywords> <description >Child2 SubItem1</description> </node> <node id="67" text="Child2 SubItem2" url="http://localhost/dnn/Home/Child2/Child2SubItem2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="2" > <keywords >Child2 SubItem2</keywords> <description >Child2 SubItem2</description> </node> </node> </node> </root> </Root> My Goal is to render this XML block into this HTML Navigation structure only using UL's LI's, etc.. <ul id="topnav"> <li> <a href="#" class="home">Home</a> <!-- Parent Node - Depth0 --> <div class="sub"> <ul> <li><h2><a href="#">Child1</a></h2></li> <!-- Parent Node 1 - Depth1 --> <li><a href="#">Child1 SubItem1</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child1 SubItem2</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child1 SubItem3</a></li ><!-- ChildNode - Depth2 --> </ul> <ul> <li><h2><a href="#">Child2</a></h2></li> <!-- Parent Node 2 - Depth1 --> <li><a href="#">Child2 SubItem1</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child2 SubItem2</a></li> <!-- ChildNode - Depth2 --> </ul> </div> </li> </ul> Can anyone help with the XSL coding? I'm just starting now with XSL..

    Read the article

  • trying to make an accordion menu from a list - jquery indexhibit

    - by orionrush
    Hello - Im teaching my self javascript & jquery so this might be a bit of a low brow question or entirely too much code for anyone to wade through, but Im hoping for some feedback. I have looked around and haven't found a thread that looks like it will deals neatly with my question. Im using the cms indexhibit (cant create a new tag!) and trying to create an accordion style menu from the menu list it generates. I basically have the behaviour Im after, modifying an existing bit of work but there are quite a few foibles, which are no doubt a conflict between the .click and .toggle and a confused use if statements. I basically want to start from scratch and redo this so I can a) learn from my mistakes b) understand what's happening. Im having trouble now because I dont know where to go from here, or how to trouble shoot it. Can anyone give me a quick analysis how the the script in the head of the document work together? Also any insight into the nature of the conflicts Im seeing and what approach might take to remedy them? If you were going to start afresh what would be your approach? Here is a test to see it in action (warts and all): http://stillstatic.nfshost.com/ This script goes into the document head: <script type='text/javascript'> //im not entirely clear as to what this achieves path = 'path/to/script/'; $(document).ready(function() { setTimeout('move_up()', 1); expandingMenu(0); expandingMenu(1); expandingMenu(2); expandingMenu(3); expandingMenu(4); //etc }); </script> the generated list: <ul> <li class='section-title active_menu'>blogs</li> <li><a class="active" href='#' onclick="do_click();">3</a></li> </ul> <ul> //this menu section dose not have a label: class .section-title <li><a href='#' onclick="do_click();">1</a></li> <li><a href='#' onclick="do_click();">2</a></li> </ul> <ul> //this menu section is not the 'active menu' this is achieved by the jquery script <li class='section-title'>writing</li> <li><a href='#' onclick="do_click();">4</a></li> <li><a href='#' onclick="do_click();">5</a></li> </ul> The meat of in an external script: function expandingMenu(num) { var speed = 500; var menu_title = $("#menu ul").eq(num).children(":first"); // ie. first child be the title with the class .section-title unless the user turned it off var menu_items = $("#menu ul").eq(num).children().filter(function (index) { return index 0; }); // ie. any li NOT in position 0, below li.section-title if (menu_items.is(".active") == true) { menu_title.addClass("active_menu"); //Add a class to the active list so we can style it. } if (menu_title.is(".section-title") == true){ // this if prevents interference with users who turn off the section titling if ((menu_items.is(".active") == false) && (menu_items.is(":visible")) ) { menu_items.hide(0);// first we hide the inactive exhibits } $('li').click(function (){ if ( (menu_title.is(":visible") == true) ){ menu_items.hide(speed); } if ( (menu_items.is(":hidden") == true ) && (('')) ){// ?! without this second condition things break down. . . menu_items.show(speed); } }) menu_title.css({cursor:"pointer"}).toggle( // add click functions + pointer to menu_title function () { menu_items.show(speed);//Open it up }, function () { // this function could even be empty but without the if things get weird if (menu_items.is(".xx")) menu_items.hide(speed); //Take the menu item off of active duty! } ) } }

    Read the article

  • SQL server query not showing daily date result

    - by Andrew Jahn
    I have a simple user production report where daily quotas are tracked. The sql returns a weeks worth of data for all users and for each day it tracks their totals. The problem is if they are out for a day and have a zero production for that day then the result query just skips that day and leaves it out. I want to return days even if the table has no entries for the person on that day. table: user date andy 3/22/10 andy 3/22/10 andy 3/23/10 andy 3/24/10 andy 3/26/10 result: andy 3/22/10 2 3/23/10 1 3/24/10 1 3/25/10 0 3/26/10 1 So my question is how do I get the query to return that 3/25/10 date with a count of 0. (current query I'm using): SELECT A.USUS_ID as Processor, CONVERT(VARCHAR(10),A.CLST_STS_DTM,101) as Date, COUNT(A.CLCL_ID) as DailyTotal FROM CMC_CLST_STATUS A WHERE A.CLST_STS_DTM >= (@Day) AND DATEADD(d, 5, @Day) > A.CLST_STS_DTM GROUP BY A.USUS_ID, CONVERT(VARCHAR(10),A.CLST_STS_DTM,101) ORDER BY A.USUS_ID, CONVERT(VARCHAR(10),A.CLST_STS_DTM,101)

    Read the article

  • Wordpress advanced navigation [closed]

    - by codedude
    Ok, so I've made a site template in pure html and I need to convert it into wordpress. The navigation code looks like this: <div id="header"> <div class="wrap"> <ul id="leftnav"> <li><a href="about.html">About</a><span class="arrow"></span></li> <li><a href="work.html">Work</a><span class="arrow"/></li> </ul> <div id="logo"> <h1><a href="index.html">T.Wiersema</a></h1> <span class="arrow"></span> </div> <ul id="rightnav"> <li><a href="blog.html">Blog</a><span class="arrow"/></li> <li class="contact"><a href="#">Contact</a><span class="arrow"/></li> </ul> </div> </div> The leftnav is absolutely positioned to the left and right nav is absolutely positioned to the right with the logo centered between the two. Notice also how I have a span inside each li element. Is there a way to reproduce this in my wordpress theme without just manually copying this into it?

    Read the article

  • Position an icon on the right in the middle of a list item

    - by Andy
    I have the following code which prints an img if the current page is selected. The issue i have is if the list item is a varied height i cant position it in the middle of the list item on the far right... <li><?php echo $child->link($child->title); ?><?php echo (url_start_with($child->url) ? '<img src="images/ico-arrow.png" class="pointer">': null); ?></li> how can i ammend the "TOP" so that it will position itself vertically no matter what the height using css #bf-fest-list li { margin:0; padding:5px 25px; position:relative; } #bf-fest-list li a:hover { color:#ec1c23; text-decoration:none; } #bf-fest-list li.current { background:#a0a1a4; padding:10px 25px; } #bf-fest-list li.current a { color:#FFF; } #bf-fest-list li .pointer { position:absolute; top:10px; left:233px; }

    Read the article

  • jQuery Sortable .toArray with ASP.NET MVC ActionResult

    - by Stacey
    Third try at fixing this tonight - trying a different approach than before now. Given a jQuery Sortable List.. <ul id="sortable1" class="connectedSortable"> <li class="ui-state-default" id="item1">Item 1</li> <li class="ui-state-default" id="item2">Item 2</li> <li class="ui-state-default">Item 3</li> <li class="ui-state-default ">Item 4</li> <li class="ui-state-default">Item 5</li> </ul> <ul id="sortable2" class="connectedSortable"> </ul> And ASP.NET MVC ActionResult.. [AcceptVerbs(HttpVerbs.Post)] public ActionResult Insert( string[] items ) { return null; } Activated by JavaScript... $("#sortable1, #sortable2").sortable({ connectWith: '.connectedSortable', dropOnEmpty: true, receive: function () { var items = $(this).sortable('toArray'); alert(items); $.ajax({ url: '/Manage/Events/Insert', type: 'post', data: { 'items': items } }); } }).disableSelection(); The 'alert' DOES show the right items. It shows 'item1, item2' etc. But my ASP.NET MVC ActionResult gets nothing. The method DOES fire, but the 'items' parameter comes in null. Any ideas?

    Read the article

  • how to loop through menu and remove class and then add class to current menu item

    - by Jonathan Lyon
    Hi all I have this menu structure that is used to navigate through content slider panels. <div id="menu"> <ul> <li><a href="#1" class="cross-link highlight">Bliss Fine Foods</a></li> <li><a href="#2" class="cross-link">Menus</a></li> <li><a href="#3" class="cross-link">Wines</a></li> <li><a href="#4" class="cross-link">News</a></li> <li><a href="#5" class="cross-link">Contact Us</a></li> </ul> </div> I would like to loop through these elements and remove the highlight class and then add the highlight class to the current / last clicked menu item. Any ideas? Any help would be greatly appreciated. Thanks Jonathan

    Read the article

  • jquery set focus on dynamic content?

    - by Alan
    In jquery I've appended a <li> element to an unordered list. How do I focus on the newly created <li> ? If I do the following: $("ul").append('<li><input type="text">hi!</input></li>'); $("li:last").focus(); //doesn't work because new <li> isn't in dom yet the focus doesn't work, as noted above. I know jquery 1.4.2 has a live() event handler which allows you load event handlers to dynamically added elements, but I'm not sure what I'm doing wrong: $(document).ready(function () { $('li').live('load', function () { alert("hi!"); $("li:last").focus(); }); });

    Read the article

  • change the value of the button of the button clicked

    - by user269431
    On inserting the new <li>, I have to set the value of the button clicked to Delete. How can I do that? With the actual code, it`s working only once, and on adding other list, the button no more has the the value 'Delete'. $("#mylist :button").click( function() { var text = $(this).val(); if (text == "Delete") { $(this).parent().remove(); } else { $(this).val("Delete"); } }); $("#mylist li:last-child").live('click', function() { $(this).parent().append('<li>' + '<input type = "textbox">' + '<input type = "button" value= "Save">' + '</li>'); }); <div> <ul id="mylist"> <li id="1">1<button id="Button3">Delete</button> </li> <li id="2">2<button id="Button2">Delete</button></li> <li id="3">3<button id="another_entry">Save</button></li> </ul>

    Read the article

  • [jQuery] preload image and show a spinner while loading

    - by robertdd
    Hy, i use uploadify to upload some images, after i display all the images thumbs in a list, when i click on a image thumb a bigger image it's open in a div with this function $(".thumbs li a").click(function(){ var largePath = $(this).attr("href"); $('.thumbs li').removeClass('thumbac'); $(this).parent().addClass('thumbac'); $("#largeImg").attr({ src: largePath }); return false; }); here is my list of photos: <div class="upimage"> <ul id="upimagesQueue" class="thumbs"> <li id="liupimages"> <a href="uploads/0001.jpg"><img src="uploads/0001.jpg" alt="0001.jpg" id=""></a> </li> <li id="liupimages"> <a href="uploads/0002.jpg"><img src="uploads/0002.jpg" alt="0002.jpg" id=""></a> </li> <li id="liupimages"> <a href="uploads/0003.jpg"><img src="uploads/0003.jpg" alt="0003.jpg" id=""></a> </li> <script> $(".thumbs li a").click(function(){ var largePath = $(this).attr("href"); $('.thumbs li').removeClass('thumbac'); $(this).parent().addClass('thumbac'); $("#largeImg").attr({ src: largePath }); return false; }); </script> </ul> </div> this is the div where the images appear <div class="largeImg" > <img id="largeImg" src="" /> </div> how i can preload the image before it display?

    Read the article

  • Render html code in sql server client report (rdlc)

    - by masoud ramezani
    I am using the asp.net web application and microsoft visual studio reportviewer control and rdlc for creating a report ( not using sql server reporting). I used the Product table to view the result. It has five fields and I display all the itemsin the report. One field is Description and it store the html code as the value(eg: <div><ul><li>a</li><li>b</li></ul><b>aaaa</b></div> ). I want to disply the output of this html code in my report's description field. But in my report, it shows the html value that I stored in my table (: <div><ul><li>a</li><li>b</li></ul><b>aaaa</b></div> ). How can I render the html in my report. Please give me a solution.

    Read the article

  • HTML text input and using the input as a variable in a script(tcl)/sql(sqlite)

    - by Fantastic Fourier
    Hello all, I'm very VERY new at this whole web thing. And I'm just very confused in general. Basically, what I want to do is take an input via text using HTML and adding that input to database, table trans. Should be simple but I am lost. <li>Transaction Number</li> <li><input type=|text| name=|tnumber| </li> // do i need to use value? <li>Employee Name</li> <li><input type=|text| name=|ename| </li> <li><input type=|SUBMIT| value=|Add|></li> ...... ...... sqlite3 db $::env(ROOT)/database.db mb eval {INSERT INTO trans VALUES ($tnumber, $ename} mb close They are both in a same file and there are only two fields to the database to keep things simple. What I can see here is that tnumber and ename aren't declared as variables. So how do I do that so that the text input is assigned to respective variables?

    Read the article

  • Twitter Bootstrap 3 top nav dropdown covered by subnav bar

    - by Aaron Qian
    I'm creating a Twitter Bootstrap main nav and sub nav with a drop down menu on the main nav. The problem is that I can never get the drop down menu to be shown above the sub nav. Here is the HTML: <div class="mainnav navbar navbar-fixed-top navbar-inverse"> <div class="navbar-inner"> <div class="container"> <ul class="nav"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> Settings </a> <ul class="dropdown-menu"> <li><a>test 1</a></li> <li><a>test 2</a></li> </ul> </li> </ul> </div> </div> </div> <div class="subnav navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <ul class="nav"> <li><a>foo</a></li> <li><a>bar</a></li> </ul> </div> </div> </div> CSS: .subnav { top: 40px; } .mainnav .dropdown-menu { // how can I show this menu above the subnav??? }

    Read the article

  • css only menu popout?

    - by aslum
    I'd like to have a logo (say it's square for simplicity) with 4 links that pop up when it is moused over. These would be positioned Above, Below and to the sides of the menu/logo. Is this achievable with only CSS? Any suggestions for how one might go about doing it? Semantically I'd like to order them with in the page something like: <ul><li><a href="Homepage">Logo</a> <ul><li class="north"><a href="north">North</a></li> <li class="west"><a href="west">West</a></li> <li class="east"><a href="east">East</a></li> <li class="south"><a href="south">South</a></li> </ul> </li> </ul> But have them show up on the page like: North West Logo East South

    Read the article

  • Using YQL multi-query & XPath to parse HTML, how to escape nested quotes?

    - by Tivac
    The title is more complicated than it has to be, here's the problem query. SELECT * FROM query.multi WHERE queries=" SELECT * FROM html WHERE url='http://www.stumbleupon.com/url/http://www.guildwars2.com' AND xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span'; SELECT * FROM xml WHERE url='http://services.digg.com/1.0/endpoint?method=story.getAll&link=http://www.guildwars2.com'; SELECT * FROM json WHERE url='http://api.tweetmeme.com/url_info.json?url=http://www.guildwars2.com'; SELECT * FROM xml WHERE url='http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.guildwars2.com'; SELECT * FROM json WHERE url='http://www.reddit.com/button_info.json?url=http://www.guildwars2.com'" Specifically this line, xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span' It's problematic because of the quoting, I have to nest them three levels deep and I've run out of quote characters to use. I've tried the following variations without success: //no attribute quoting xpath='//li[@class=listLi]/div[@class=views]/a/span' //try to quote attribute w/ backslash & single quote xpath='//li[@class=\'listLi\']/div[@class=\'views\']/a/span' //try to quote attribute w/ backslash & double quote xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span' //try to quote attribute with double single quotes, like SQL xpath='//li[@class=''listLi'']/div[@class=''views'']/a/span' //try to quote attribute with double double quotes, like SQL xpath='//li[@class=""listLi""]/div[@class=""views""]/a/span' //try to quote attribute with quote entities xpath='//li[@class=&quot;listLi&quot;]/div[@class=&quot;views&quot;]/a/span' //try to surround XPath with backslash & double quote xpath=\"//li[@class='listLi']/div[@class='views']/a/span\" //try to surround XPath with double double quote xpath=""//li[@class='listLi']/div[@class='views']/a/span"" All without success. I don't see much out there about escaping XPath strings but everything I've found seems to be variations on using concat (which won't help because neither ' nor " are available) or html entities. Not using quotes for the attributes doesn't throw an error but fails because it's not the actual XPath string I need. I don't see anything in the YQL docs about how to handle escaping. I'm aware of how edge-casey this is but was hoping they'd have some sort of escaping guide.

    Read the article

  • jquery question - addclass to element depending on active image in rotating banner

    - by whitman6732
    I have a banner that rotates a series of three images. The active one has a display:block, while the inactive have display:none. I'm trying to match the class for the active image with an tag so that I can add an "active" class to the a tag. Having some trouble writing that function. It's adding all of the classes for each of the img elements, regardless of whether they're being displayed or not... The html markup looks like this: <div id="banner-area"> <div class="clearfix" id="promo-boxes-nav"> <ul id="banner-tabs"> <li> <ul id="page-tabs"> <li><a class="t39" href="#">1</a></li> <li><a class="t42" href="#">2</a></li> <li><a class="t49" href="#">3</a></li> </ul> </li> <li class="last">&nbsp;</li> </ul> </div> <div id="banner-content"> <img class="t39" src="http://localhost:8888/1.png" style="position: absolute; top: 0px; left: 0px; display: none; opacity: 0;"> <img class="t42" src="http://localhost:8888/2.png" style="position: absolute; top: 0px; left: 0px; display: block; opacity: 1;"> <img class="t49" src="http://localhost:8888/3.png" style="position: absolute; top: 0px; left: 0px; display: none;opacity: 0;"> </div> </div> The function in its current form looks like this: $j(document).ready(function() { $j('#banner-content') .cycle({ fx: 'fade', speed: 300, timeout: 3000, next: '.t1', pause: 1 }); if($j('#page-tabs a').attr('class')) { $j('#banner-content img').each(function() { if($j(this).attr('display','block')) { var bcClass = $j(this).attr('class'); } $j('#page-tabs li a').each(function() { if($j('#page-tabs li a').hasClass(bcClass)) { $j(this).addClass(bcClass); } }); }); } })

    Read the article

  • CSS animated menu

    - by Andrea
    I am trying to obtain something similar to the "share this on..." menu here but I don't quite understand how they are doing this, even after a look at their CSS. I refer to the fact that the images show up on hover. My first attempt would be something like <div id="share_on"> <ul> <li><a href="#"><img src="shareon-digg.png" /></a></li> <li><a href="#"><img src="shareon-reddit.png" /></a></li> ... <li><a href="#"><img src="shareon-stumbleupon.png" /></a></li> </ul> </div> and the CSS: #share_on {overflow: hidden} #share_on ul {margin-bottom: -16px} #share_on li {display: inline} #share_on li:hover {margin-top: -16px} Of course this does not work, which is why I am asking here. In the inactive state, only half of the icon shows up, which is the expected behaviour. But on hover, nothing changes. I also have tried some variations, like #share_on li:hover {margin-bottom: 16px} or #share_on li:hover {padding-bottom: 16px} but none of these works. Any ideas?

    Read the article

  • jquery navbar active state stays through refresh

    - by bob
    Hello, I am building a web application and because it has a layout. I don't want to have to create a seperate navigation bar for each page. I am wondering if I can assign an active class to a link that gets clicked on my navbar which will keep the active class even after a page refresh. html <div id="navbar"> <ul id = "main_nav"> <li><%= link_to '', root_path, :class => "home" %></li> <li><%= link_to '', junklists_path, :class => "buy" %></li> <li><%= link_to '', post_junk_path, :class => "sell" %></li> <li><%= link_to '', contact_path, :class => "contact" %></li> </ul> </div> jquery $("#main_nav li a").click(function(){ $("#main_nav li a.active").removeClass('active'); $(this).stop().addClass('active'); }) What options do I have? Thanks in advance!

    Read the article

  • Javascript Bookmarklet - Opening Multiple Links on a Page

    - by NessDan
    I want to make a bookmarklet so that when I go on Digg, I can simply click it and have the top 10 stories open up in new tabs. The HTML on the page looks like this: <div id="topten-list"> <div class="news-summary img-thumb"> <h3> <a href="/comics_animation/Pokemon_COMIC">Pokemon - (COMIC) <span> <em style="background-image: url(&quot;/comics_animation/Pokemon_COMIC/a.png&quot;);"> thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/comics_animation/Pokemon_COMIC"> <strong>1872</strong> </a> </li> </ul> </div> <div class="news-summary img-thumb"> <h3> <a href="/comedy/I_am_never_drinking_with_you_assholes_again_Pic"> I am never drinking with you assholes again [Pic] <span> <em style="background-image: url(&quot;/comedy/I_am_never_drinking_with_you_assholes_again_Pic/a.png&quot;);"> thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/comedy/I_am_never_drinking_with_you_assholes_again_Pic"> <strong>1650</strong> </a> </li> </ul> </div> <div class="news-summary news-thumb"> <h3> <a href="/comedy/xkcd_Hell">xkcd: Hell <span> <em style="background-image: url(&quot;/comedy/xkcd_Hell/a.png&quot;);"> thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/comedy/xkcd_Hell"> <strong>1407</strong> </a> </li> </ul> </div> <div class="news-summary news-thumb"> <h3> <a href="/arts_culture/6_Ridiculous_History_Myths_You_Probably_Think_Are_True"> 6 Ridiculous History Myths (You Probably Think Are True) <span> <em style="background-image: url(&quot;/arts_culture/6_Ridiculous_History_Myths_You_Probably_Think_Are_True/a.jpg&quot;);"> thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/arts_culture/6_Ridiculous_History_Myths_You_Probably_Think_Are_True"> <strong>1216</strong> </a> </li> </ul> </div> <div class="news-summary news-thumb"> <h3> <a href="/people/Why_Every_Chick_Flick_Is_Starting_to_Look_The_Same_CHART"> Why Every Chick Flick Is Starting to Look The Same [CHART] <span> <em style="background-image: url(&quot;/people/Why_Every_Chick_Flick_Is_Starting_to_Look_The_Same_CHART/a.jpg&quot;);"> thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/people/Why_Every_Chick_Flick_Is_Starting_to_Look_The_Same_CHART"> <strong>978</strong> </a> </li> </ul> </div> <div class="news-summary img-thumb"> <h3> <a href="/food_drink/WTF_World_of_FAST_FOOD_Graphic">WTF World of FAST FOOD! [Graphic] <span> <em style="background-image: url(&quot;/food_drink/WTF_World_of_FAST_FOOD_Graphic/a.jpg&quot;);"> thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/food_drink/WTF_World_of_FAST_FOOD_Graphic"> <strong>874</strong> </a> </li> </ul> </div> <div class="news-summary news-thumb"> <h3> <a href="/people/10_Things_You_Don_t_Know_About_My_Life_As_a_Dominatrix"> 10 Things You Don&#39;t Know About My Life As a Dominatrix <span> <em style="background-image: url(&quot;/people/10_Things_You_Don_t_Know_About_My_Life_As_a_Dominatrix/a.jpg&quot;);"> thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/people/10_Things_You_Don_t_Know_About_My_Life_As_a_Dominatrix"> <strong>751</strong> </a> </li> </ul> </div> <div class="news-summary img-thumb"> <h3> <a href="/odd_stuff/Star_Trek_Transporter_Mishap_pic">Star Trek Transporter Mishap (pic) <span> <em>thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/odd_stuff/Star_Trek_Transporter_Mishap_pic"> <strong>667</strong> </a> </li> </ul> </div> <div class="news-summary vid-thumb"> <h3> <a href="/pc_games/StarCraft_2_Beta_Breakup_Video">StarCraft 2 Beta Breakup (Video) <span> <em style="background-image: url(&quot;/pc_games/StarCraft_2_Beta_Breakup_Video/a.jpg&quot;);"> thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/pc_games/StarCraft_2_Beta_Breakup_Video"> <strong>627</strong> </a> </li> </ul> </div> <div class="news-summary news-thumb"> <h3> <a href="/politics/Jon_Stewart_FL_Doc_Won_t_Touch_Yr_Penis_If_You_Voted_Obama"> Jon Stewart: FL Doc Won&#39;t Touch Yr Penis If You Voted Obama <span> <em style="background-image: url(&quot;/politics/Jon_Stewart_FL_Doc_Won_t_Touch_Yr_Penis_If_You_Voted_Obama/a.jpg&quot;);"> thumb</em> </span></a> </h3> <ul class="news-digg"> <li class="digg-count"> <a href="/politics/Jon_Stewart_FL_Doc_Won_t_Touch_Yr_Penis_If_You_Voted_Obama"> <strong>508</strong> </a> </li> </ul> </div> </div> So within each div with the class "news-summary", there is a link. How can I get javascript to go through the div "topten-list" and open each one?

    Read the article

  • jquery ajax and php arrays

    - by sea_1987
    Hi There, I am trying to submit some data to a PHP script, however the PHP scripts expects the data to arrive in a specific format, like this example which is a dump of the post, Array ( [save] => Add to shortlist [cv_file] => Array ( [849709537] => Y [849709616] => Y [849709633] => Y ) ) The process is currently that a user selects the product they want using checkboxes and then clicks a submit button which fires the PHP scripts, The HTML looks like this, div class="row"> <ul> <li class="drag_check ui-draggable"> <input type="checkbox" id="inp_cv_849709537" name="cv_file[849709537]" class="cv_choice" value="Y"> </li> <li class="id"><a href="/search/cv/849709537">849709537</a></li> <div class="disp"> <li class="location">Huddersfield</li> <li class="status"> Not currently working </li> <li class="education">other</li> <li class="role"> Temporary </li> <li class="salary">£100,000 or more</li> <div class="s">&nbsp;</div> </div> </ul> <dl> <dt>Current Role</dt> <dd>Developer </dd> <dt>Sectors</dt><dt> </dt><dd> Energy &amp; Utilities, Healthcare, Hospitality &amp; Travel, Installation &amp; Maintenance, Installation &amp; Maintenance </dd> <dt>About Me</dt><dt> </dt><dd></dd> </dl> <div class="s"></div> </div> I am needing to use AJAX instead now, but I need to send the data to PHP in the format it expects here is what I have so far, $('#addshortlist').click(function() { var datastring = ui.draggable.children().attr('name')+"="+ui.draggable.children().val()+"&save=Add to shortlist"; alert(datastring); $.ajax({ type: 'POST', url: '/search', data:ui.draggable.children().attr('name')+"="+ui.draggable.children().val()+"&save=Add to shortlist", success:function(){ alert("Success"+datastring); }, error:function() { alert("Fail"+datastring); } }); return false; }); I would really appreciate any help

    Read the article

  • How can I write query to output this format in SQLite?

    - by GivenPie
    I would like to output in this format: e.EE_id e.FNAME e.LNAME SUPer_id s.FNAME s.LNAME --- --------- -------------- --- ------------- ------------------- 1 Ziqiao Li 2 Charlie Li 1 Ziqiao Li 3 George Pee 2 Charlie Li 4 Jason Dee 2 Charlie Li 5 Petey Wee 2 Charlie Li From this table created : I need to display the Primary key and foreign key in the same results while displaying the foreign key name values for the primary key names. Create table Employees( ee_id integer, fname varchar(20), lname varchar(20), super_id integer, Constraint emp_Pk Primary Key (ee_id), Constraint emp_Fk Foreign Key (super_id) references employees (ee_id) ); INSERT INTO Employees VALUES(1,'Charlie','Li',null); INSERT INTO Employees VALUES(2,'Ziqiao','Lee',1); INSERT INTO Employees VALUES(3,'George','Pee',2); INSERT INTO Employees VALUES(4,'Jason','Dee',2); INSERT INTO Employees VALUES(5,'Petey','Wee',2); Select ee_id, fname, lname, super_id from employees; ee_id fname lname super_id ---------- ---------- ---------- ---------- 1 Charlie Li 2 Ziqiao Lee 1 3 George Pee 2 4 Jason Dee 2 5 Petey Wee 2 Do I need to create a view?

    Read the article

  • JQuery select text next to an input checkbox?

    - by Rosdi
    Using JQuery, is there a simple way to select the text immediately after a checkbox? <li>bleh..</li> <li> <input type="checkbox" id="cbx1" value="10" />&nbsp;Very important text. </li> <li>bleh..</li> I want to use jquery to select that "Very important text." minus &nbsp;

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >