Jump to content

Eyad Syria-lover

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by Eyad Syria-lover

  1. In Fact I'am Kind Of Lost. Can You Provide Me With A Code Sir?... I Mean A Modified Copy Of My Code...
  2. Hello There. I'am Making What It Seems Like A Function To Animate The Background Color Of An Element,But I Have A Problem. This Is The Code: <script> function color(id,duration,r_start,g_start,b_start,r_end,g_end,b_end) { var element=document.getElementById(id); var parameter=setInterval(colorGradually,50*duration); function colorGradually() { if (r_start==r_end && g_start==g_end && b_start==b_end) { clearInterval(parameter); } else { for (var i=r_start,var j=g_start,var k=b_start; i<r_end && j<g_end && k<b_end;i++,j++,k++) { element.style.backgroundColor="rgb("+i+","+j+","+k+")"; } } } } </script> <div id="test" style="width:100%;height:200px;background-color:rgb(128,128,128)"></div> <input type="button" onclick="color('test',1,128,128,128,255,255,255)" value="Change"> The Script Isn't Working At All. I've Checked The Script With Esprisma Code Validator And The Code Was Syntactically Valid,But I Can't Recognize The Problem...
  3. I'am Sorry Sir,Maybe I've Asked In Such A Way That Was In-Appropriate. How Can I Pass A Variable In A Regular Expression?
  4. So,I'am Creating An Internal Search Engine Which Can Be Used To Search For A Specific Word In The Page You're Browsing. This Engine Makes The Background Color Is Yellow For The Word You're Searching. <!--Taken From W3Schools.com--> <p> The display property sets or returns the element's display type. Elements in HTML are mostly "inline" or "block" elements: An inline element has floating content on its left and right side. A block element fills the entire line, and nothing can be displayed on its left or right side. </p> <p> The display property also allows the author to show or hide an element. It is similar to the visibility property. However, if you set display:none, it hides the entire element, while visibility:hidden means that the contents of the element will be invisible, but the element stays in its original position and size. Tip: If an element is a block element, its display type can also be changed with the float property. </p> <script> var i; function searchFor(keyword) { for (i=0;i<document.querySelectorAll("p").length;i++) { document.querySelectorAll("p").innerHTML=document.querySelectorAll("p").innerHTML.replace(/keyword/gi,"<span style='background-color:yellow;'>"+keyword+"</span>"); } searchFor("display"); </script> How Can I Make It Possible To Pass A String As A Parameter To The searchFor() Function?
  5. In Fact,You Can Run JavaScript In Several Ways,You Can Create A Script Directly In Your Page Or Embed It From External Source Using The <script> Tag,Or You Can Add It Inline Using Events Like "onclick",So Actually There Is No Difference.
  6. You Should Increase The Width Of The <select> Element: <select style="width:100%;">
  7. Sir Can You Provide Me With A Code (If You Don't Mind)? Thanks In Advance...
  8. Hello. I've Tried To Create An Animation (A Shape Which Rotate),But I'am Unable To Make It Stop. Here's The Code: http://jsbin.com/zevotu/edit How Can I Make This Animation Stop Rotating After It Rotate 270 Degree?
  9. Sir I'am Using jQuery Mobile 1.4.5 With jQuery 1.12.4 . I'am Making A Popup And I Have Inserted A Select Menu Inside It,I've Also Used The data-native-menu="false" Attribute In Order To Use The Custom Dropdown From jQuery Mobile,So I'am Expecting To Use This Custom Dropdown,But When I Try It,It Shows Me The Default Dropdown (That One Which Is Generated By The Platform). I'am Not Getting Any Errors In The Browser's Console,I've Tried To Change The jQuery Version But That Didn't Work For Me.
  10. Sir You Can Do The Popup Effect Easily By Using CSS Display Property. First You Should Use The :hover Selector In CSS (I'am Assuming That You Have No Idea About JavaScript). You Should Create A Hidden Small-Box For Every Person You Have: .person-panel { display:block; width: /* Enter The Panel's Width Here */; height:/* Enter The Panel's Height Here*/; } Now You Have To Use The :hover Selector As Following: .person-panel:hover { display:block; }
  11. It's Returning So Many Numbers After Decimal... Like This: 10.925054550170898
  12. I Have Just Read About The performance.now() Standard,But I Felt Uncomfortable About It. Is There Any Other Way To Solve This?.
  13. I That Isn't Possible Sir Because You're Using !important Rule So Many Times. Can I Download w3.css Then Edit It And Make Some Changes To The Code?
  14. W3.CSS - Can I Make Some Modifications To W3.CSS Code?
  15. <div data-role="page" data-theme="b"> <div data-role="main" id="index"> <a href="#settings" data-rel="popup">Show Settings</a> </div> <div data-role="popup" id="settings" data-theme="b"> <select data-native-menu="false"> <option value="1">1</option> <option value="2">2</option> </select> </div> </div>
  16. This Code Isn't Working: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script> $(document).ready(function(){ $("#area").animate({ backgroundImage:"url('image2.png')" },2000); }); </script> <style> #area { width:100%; height:600px; background-image:url("image2.png"); } </style> <div id="area"></div>
  17. <script> var i; for (i in window.document.body.style) { document.write("window.document.body.style."+i+"<br>"); } </script> How Can We Perform This Task?
  18. I Suggest Adding A Page About HTML5 Web Notifications API.
×
×
  • Create New...